summaryrefslogtreecommitdiff
path: root/lisp/mail/rmailsum.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mail/rmailsum.el')
-rw-r--r--lisp/mail/rmailsum.el26
1 files changed, 14 insertions, 12 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 667b72b1b34..f8adf774002 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -390,8 +390,17 @@ SUBJECT is a regular expression."
;;;###autoload
(defun rmail-summary-by-senders (senders)
"Display a summary of all messages whose \"From\" field matches SENDERS.
-SENDERS is a regular expression."
- (interactive "sSenders to summarize by: ")
+SENDERS is a regular expression. The default for SENDERS matches the
+sender of the current messsage."
+ (interactive
+ (let* ((def (rmail-get-header "From"))
+ ;; We quote the default argument, because if it contains regexp
+ ;; special characters (eg "?"), it can fail to match itself.
+ (sender (regexp-quote def))
+ (prompt (concat "Senders to summarize by (regexp"
+ (if sender ", default this message's sender" "")
+ "): ")))
+ (list (read-string prompt nil nil sender))))
(rmail-new-summary
(concat "senders " senders)
(list 'rmail-summary-by-senders senders) 'rmail-message-senders-p senders))
@@ -1306,11 +1315,7 @@ advance to the next message."
(select-window rmail-buffer-window)
(prog1
;; Is EOB visible in the buffer?
- (save-excursion
- (let ((ht (window-height)))
- (move-to-window-line (- ht 2))
- (end-of-line)
- (eobp)))
+ (pos-visible-in-window-p (point-max))
(select-window rmail-summary-window)))
(if (not rmail-summary-scroll-between-messages)
(error "End of buffer")
@@ -1333,10 +1338,7 @@ move to the previous message."
(select-window rmail-buffer-window)
(prog1
;; Is BOB visible in the buffer?
- (save-excursion
- (move-to-window-line 0)
- (beginning-of-line)
- (bobp))
+ (pos-visible-in-window-p (point-min))
(select-window rmail-summary-window)))
(if (not rmail-summary-scroll-between-messages)
(error "Beginning of buffer")
@@ -1626,7 +1628,7 @@ original message into it."
(defun rmail-summary-reply (just-sender)
"Reply to the current message.
-Normally include CC: to all other recipients of original message;
+Normally include Cc: to all other recipients of original message;
prefix argument means ignore them. While composing the reply,
use \\[mail-yank-original] to yank the original message into it."
(interactive "P")