diff options
author | Glenn Morris <rgm@gnu.org> | 2015-05-26 21:04:19 -0400 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2015-05-26 21:04:19 -0400 |
commit | d3155315c85212f224fc5df0239182dafdfd6284 (patch) | |
tree | 1e576b7f9b3d6cf7c44ca621f57398701051ff15 /lisp/mail/rmailsum.el | |
parent | 5e9756e4c68a199f051c2b9998c07a683ff479ff (diff) | |
download | emacs-d3155315c85212f224fc5df0239182dafdfd6284.tar.gz emacs-d3155315c85212f224fc5df0239182dafdfd6284.tar.bz2 emacs-d3155315c85212f224fc5df0239182dafdfd6284.zip |
* lisp/mail/rmailsum.el: Commas no longer separate regexps. (Bug#19026)
(rmail-summary-by-recipients, rmail-summary-by-topic)
(rmail-summary-by-senders): No longer use mail-comma-list-regexp.
* doc/emacs/rmail.texi (Rmail Make Summary): Update for this change.
; * etc/NEWS: Mention this.
Diffstat (limited to 'lisp/mail/rmailsum.el')
-rw-r--r-- | lisp/mail/rmailsum.el | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 7097fef9ada..ed4d58c9505 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -287,23 +287,20 @@ LABELS should be a string containing the desired labels, separated by commas." (mail-comma-list-regexp labels) "\\)\\(,\\|\\'\\)"))) -;; FIXME "a string of regexps separated by commas" makes no sense because: -;; i) it's pointless (you can just use \\|) -;; ii) it's broken (you can't specify a literal comma) -;; rmail-summary-by-topic and rmail-summary-by-senders have the same issue. ;;;###autoload (defun rmail-summary-by-recipients (recipients &optional primary-only) "Display a summary of all messages with the given RECIPIENTS. Normally checks the To, From and Cc fields of headers; but if PRIMARY-ONLY is non-nil (prefix arg given), only look in the To and From fields. -RECIPIENTS is a string of regexps separated by commas." +RECIPIENTS is a regular expression." (interactive "sRecipients to summarize by: \nP") (rmail-new-summary (concat "recipients " recipients) (list 'rmail-summary-by-recipients recipients primary-only) 'rmail-message-recipients-p - (mail-comma-list-regexp recipients) primary-only)) + (replace-regexp-in-string "\\`[ \t]*\\(.*?\\)[ \t]*\\'" "\\1" recipients) + primary-only)) (defun rmail-message-recipients-p (msg recipients &optional primary-only) (rmail-apply-in-message msg 'rmail-message-recipients-p-1 @@ -370,7 +367,7 @@ Emacs will list the message in the summary." "Display a summary of all messages with the given SUBJECT. Normally checks just the Subject field of headers; but with prefix argument WHOLE-MESSAGE is non-nil, looks in the whole message. -SUBJECT is a string of regexps separated by commas." +SUBJECT is a regular expression." (interactive ;; We quote the default subject, because if it contains regexp ;; special characters (eg "?"), it can fail to match itself. (Bug#2333) @@ -383,7 +380,8 @@ SUBJECT is a string of regexps separated by commas." (concat "about " subject) (list 'rmail-summary-by-topic subject whole-message) 'rmail-message-subject-p - (mail-comma-list-regexp subject) whole-message)) + (replace-regexp-in-string "\\`[ \t]*\\(.*?\\)[ \t]*\\'" "\\1" subject) + whole-message)) (defun rmail-message-subject-p (msg subject &optional whole-message) (if whole-message @@ -395,13 +393,13 @@ SUBJECT is a string of regexps separated by commas." ;;;###autoload (defun rmail-summary-by-senders (senders) "Display a summary of all messages whose \"From\" field matches SENDERS. -SENDERS is a string of regexps separated by commas." +SENDERS is a regular expression." (interactive "sSenders to summarize by: ") (rmail-new-summary (concat "senders " senders) (list 'rmail-summary-by-senders senders) 'rmail-message-senders-p - (mail-comma-list-regexp senders))) + (replace-regexp-in-string "\\`[ \t]*\\(.*?\\)[ \t]*\\'" "\\1" senders))) (defun rmail-message-senders-p (msg senders) (string-match senders (or (rmail-get-header "From" msg) ""))) |