diff options
Diffstat (limited to 'init.org')
-rw-r--r-- | init.org | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |