]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-summary-by-topic): Don't use rmail-current-subject-regexp.
authorAlex Schroeder <alex@gnu.org>
Fri, 20 Jan 2006 00:42:58 +0000 (00:42 +0000)
committerAlex Schroeder <alex@gnu.org>
Fri, 20 Jan 2006 00:42:58 +0000 (00:42 +0000)
(rmail-message-subject-p): Use rmail-header-get-header instead of
mail-fetch-field.
(rmail-summary-by-senders): Default to current sender.

lisp/mail/ChangeLog
lisp/mail/rmailsum.el

index b10f263f6952d2bd3a28526968d0e923f355552f..4fb8bbae380bb3af084772b018144c8e1fd0a2cd 100644 (file)
@@ -5,6 +5,10 @@
        (rmail-summary-update-attribute): Deleted.
        (rmail-summary-update): Simple defun regenerates the entire
        summary line.
+       (rmail-summary-by-topic): Don't use rmail-current-subject-regexp.
+       (rmail-message-subject-p): Use rmail-header-get-header instead of
+       mail-fetch-field.
+       (rmail-summary-by-senders): Default to current sender.
 
        * rmailkwd.el (rmail-set-label): Call rmail-summary-update at the
        end.
index fa85e2067ea4402514dd1d0069b0a90c6524bb2d..343d70b0553a4dafb6f61d26f3a825b9594fbe2e 100644 (file)
@@ -143,8 +143,6 @@ SUBJECT is a string of regexps separated by commas."
   (interactive
    (let* ((subject (with-current-buffer rmail-buffer
                     (rmail-current-subject)))
-         (subject-re (with-current-buffer rmail-buffer
-                       (rmail-current-subject-regexp)))
          (prompt (concat "Topics to summarize by (regexp"
                          (if subject ", default current subject" "")
                          "): ")))
@@ -167,18 +165,26 @@ non-nil otherwise."
      (rmail-desc-get-end msg))
     (goto-char (point-min))
     (if whole-message
-        (re-search-forward subject nil t)
-      (string-match subject
-                   (let ((subj (mail-fetch-field "subject")))
-                     (if subj
-                         (funcall rmail-summary-line-decoder subj)
-                       ""))))))
+       (re-search-forward subject nil t))
+    (string-match subject
+                 (let ((subj (rmail-header-get-header "subject")))
+                   (if subj
+                       (funcall rmail-summary-line-decoder subj)
+                     "")))))
 
 ;;;###autoload
 (defun rmail-summary-by-senders (senders)
   "Display a summary of all messages with the given SENDERS.
 SENDERS is a string of names separated by commas."
-  (interactive "sSenders to summarize by: ")
+  (interactive
+   (let* ((sender (when rmail-current-message
+                   (rmail-desc-get-sender rmail-current-message)))
+         (sender-re (with-current-buffer rmail-buffer
+                      (regexp-quote sender)))
+         (prompt (concat "Senders to summarize by (regexp"
+                         (if sender ", default current sender" "")
+                         "): ")))
+     (list (read-string prompt nil nil sender))))
   (rmail-new-summary
    (concat "senders " senders)
    (list 'rmail-summary-by-senders senders)