aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard Stallman2018-06-18 00:20:45 -0700
committerPaul Eggert2018-06-18 00:21:22 -0700
commit3e2215642bbca3d1335155278eace39d0a87c267 (patch)
treeea99ee4520d021bbc66322c2aa6362f679f71c0e /lisp
parentba2ddadb5378351e8003c8e172b52bfabaa27554 (diff)
downloademacs-3e2215642bbca3d1335155278eace39d0a87c267.tar.gz
emacs-3e2215642bbca3d1335155278eace39d0a87c267.zip
rmail-summary-by-senders defaults to sender
* etc/NEWS: Mention this. * lisp/mail/rmailsum.el (rmail-summary-by-senders): Offer From field of current message as a default argument.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mail/rmailsum.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 3dd486a792a..e5363d2198c 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -390,8 +390,17 @@ SUBJECT is a regular expression."
390;;;###autoload 390;;;###autoload
391(defun rmail-summary-by-senders (senders) 391(defun rmail-summary-by-senders (senders)
392 "Display a summary of all messages whose \"From\" field matches SENDERS. 392 "Display a summary of all messages whose \"From\" field matches SENDERS.
393SENDERS is a regular expression." 393SENDERS is a regular expression. The default for SENDERS matches the
394 (interactive "sSenders to summarize by: ") 394sender of the current messsage."
395 (interactive
396 (let* ((def (rmail-get-header "From"))
397 ;; We quote the default argument, because if it contains regexp
398 ;; special characters (eg "?"), it can fail to match itself.
399 (sender (regexp-quote def))
400 (prompt (concat "Senders to summarize by (regexp"
401 (if sender ", default this message's sender" "")
402 "): ")))
403 (list (read-string prompt nil nil sender))))
395 (rmail-new-summary 404 (rmail-new-summary
396 (concat "senders " senders) 405 (concat "senders " senders)
397 (list 'rmail-summary-by-senders senders) 'rmail-message-senders-p senders)) 406 (list 'rmail-summary-by-senders senders) 'rmail-message-senders-p senders))