From e2c8bff298e6f4bfc2eb19850af886c16fcd20bc Mon Sep 17 00:00:00 2001 From: sabof Date: Wed, 5 Feb 2014 20:24:05 +0000 Subject: [PATCH] Moved citation regexps to a variable --- mu4e/mu4e-utils.el | 2 +- mu4e/mu4e-vars.el | 5 +++++ mu4e/mu4e-view.el | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mu4e/mu4e-utils.el b/mu4e/mu4e-utils.el index 76b22bd6..fefa7c68 100644 --- a/mu4e/mu4e-utils.el +++ b/mu4e/mu4e-utils.el @@ -1094,7 +1094,7 @@ used in the view and compose modes." ;; prefixes, starting with 0 for 'no citation' (beginning-of-line 1) ;; consider only lines that heuristically look like a citation line... - (when (looking-at "[[:blank:]]*[^[:blank:]\n]*[[:blank:]]*>") + (when (looking-at mu4e-cited-regexp) (let* ((level (how-many ">" (line-beginning-position 1) (line-end-position 1))) (face diff --git a/mu4e/mu4e-vars.el b/mu4e/mu4e-vars.el index 888cd196..a1269b7f 100644 --- a/mu4e/mu4e-vars.el +++ b/mu4e/mu4e-vars.el @@ -181,6 +181,11 @@ view buffer." :type 'boolean :group 'mu4e) +(defcustom mu4e-cited-regexp "^[[:blank:]]*[^[:blank:]\n]*[[:blank:]]*>" + "Regular expression that determines whether a line is a citation." + :type 'string + :group 'mu4e) + (defcustom mu4e-completing-read-function 'ido-completing-read "Function to be used to receive input from the user with completion. This is used to receive the name of the maildir diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index 2e30c2b2..12e68709 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -779,7 +779,7 @@ Also number them so they can be opened using `mu4e-view-go-to-url'." (save-excursion (let ((inhibit-read-only t)) (goto-char (point-min)) - (flush-lines "^[:blank:]*>") + (flush-lines mu4e-cited-regexp) (setq mu4e~view-cited-hidden t))))