aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Stallman2018-06-18 00:20:45 -0700
committerPaul Eggert2018-06-18 00:21:22 -0700
commit3e2215642bbca3d1335155278eace39d0a87c267 (patch)
treeea99ee4520d021bbc66322c2aa6362f679f71c0e
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.
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/mail/rmailsum.el13
2 files changed, 15 insertions, 2 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 87c3950b1e3..5568e29eb8e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -522,6 +522,10 @@ been removed. Use 'encode-coding-string', 'decode-coding-string', and
522If this option is non-nil, messages appended to an output file by the 522If this option is non-nil, messages appended to an output file by the
523'rmail-output' command have their Deleted flag reset. 523'rmail-output' command have their Deleted flag reset.
524 524
525*** The command 'rmail-summary-by-senders' with an empty argument
526selects the messages to summarize with a regexp that matches the
527sender of the current message.
528
525* New Modes and Packages in Emacs 27.1 529* New Modes and Packages in Emacs 27.1
526 530
527+++ 531+++
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))