summaryrefslogtreecommitdiff
path: root/init.org
diff options
context:
space:
mode:
Diffstat (limited to 'init.org')
-rw-r--r--init.org4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.org b/init.org
index a08d7f2..f7a82f6 100644
--- a/init.org
+++ b/init.org
@@ -206,7 +206,9 @@ Emacs doesn’t deal well with very long lines. I often produce very long lines
#+BEGIN_SRC elisp
(defun my/comint-shorten-long-lines (text)
- (let* ((regexp "^\\(.\\{80\\}\\).*?\\(\"?\\)$")
+ ;; Use \x22 here instead of straight double quotes because that would
+ ;; break the regular expression for prettifying Org src blocks.
+ (let* ((regexp "^\\(.\\{380\\}\\).*?\\(\x22?\\)$")
(shortened-text (replace-regexp-in-string regexp "\\1\\2" text)))
(if (string= shortened-text text)
text