aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-wash.el
diff options
context:
space:
mode:
authorGravatar David Edmondson <dme@dme.org>2010-11-17 13:32:33 +0000
committerGravatar Carl Worth <cworth@cworth.org>2010-12-07 14:10:43 -0800
commitb9d4af4641b659693ac6c225fe8143a11b69f3af (patch)
tree82deef553bdf984dabcb29610dddf61952b44290 /emacs/notmuch-wash.el
parent5d05d5434dc5de0d484e334ddf109385e9a56cf3 (diff)
emacs: Remove over-eager regular expressions from notmuch-wash-tidy-citations.
The removed expressions, which were used to ensure that citations were both preceded and followed by a blank line, were poorly implemented and caused a regexp stack overflow on messages more than a few thousand lines long.
Diffstat (limited to 'emacs/notmuch-wash.el')
-rw-r--r--emacs/notmuch-wash.el14
1 files changed, 2 insertions, 12 deletions
diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
index cfcfb21c..c4a7a410 100644
--- a/emacs/notmuch-wash.el
+++ b/emacs/notmuch-wash.el
@@ -190,7 +190,7 @@ is what to put on the button."
(defun notmuch-wash-tidy-citations (depth)
"Improve the display of cited regions of a message.
-Perform four transformations on the message body:
+Perform several transformations on the message body:
- Remove lines of repeated citation leaders with no other
content,
@@ -214,17 +214,7 @@ Perform four transformations on the message body:
;; text.
(goto-char (point-min))
(while (re-search-forward "\\(^>[> ]*\n\\)\\(^$\\|^[^>].*\\)" nil t)
- (replace-match "\\2"))
-
- ;; Insert a blank line before a citation if there isn't one.
- (goto-char (point-min))
- (while (re-search-forward "\\(^[^>]+\\)\n>" nil t)
- (replace-match "\\1\n\n>"))
-
- ;; Insert a blank line after a citation if there isn't one.
- (goto-char (point-min))
- (while (re-search-forward "\\(^>.+\\)\n\\([^>]\\)" nil t)
- (replace-match "\\1\n\n\\2")))
+ (replace-match "\\2")))
;;