emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/mail/rmailsum.el


From: Alex Schroeder
Subject: [Emacs-diffs] Changes to emacs/lisp/mail/rmailsum.el
Date: Sun, 08 Jan 2006 15:17:45 +0000

Index: emacs/lisp/mail/rmailsum.el
diff -u emacs/lisp/mail/rmailsum.el:1.139 emacs/lisp/mail/rmailsum.el:1.140
--- emacs/lisp/mail/rmailsum.el:1.139   Sat Sep 24 13:43:58 2005
+++ emacs/lisp/mail/rmailsum.el Sun Jan  8 15:17:45 2006
@@ -132,7 +132,15 @@
 but if WHOLE-MESSAGE is non-nil (prefix arg given),
  look in the whole message.
 SUBJECT is a string of regexps separated by commas."
-  (interactive "sTopics to summarize by: \nP")
+  (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" "")
+                         "): ")))
+     (list (read-string prompt nil nil subject) current-prefix-arg)))
   (rmail-new-summary
    (concat "about " subject)
    (list 'rmail-summary-by-topic subject whole-message)
@@ -568,17 +576,11 @@
 With prefix argument N, do this N times.
 If N is negative, go backwards."
   (interactive "p")
-  (let (subject search-regexp  i found
-       (forward (> n 0)))
-    (save-excursion
-      (set-buffer rmail-buffer)
-      (setq subject (mail-fetch-field "Subject"))
-      (setq i rmail-current-message))
-    (if (string-match "Re:[ \t]*" subject)
-       (setq subject (substring subject (match-end 0))))
-    (setq search-regexp (concat "^Subject: *\\(Re: *\\)?"
-                               (regexp-quote subject)
-                               "\n"))
+  (let ((forward (> n 0))
+       search-regexp i found)
+    (with-current-buffer rmail-buffer
+      (setq search-regexp (rmail-current-subject-regexp)
+           i rmail-current-message))
     (save-excursion
       (while (and (/= n 0)
                  (if forward




reply via email to

[Prev in Thread] Current Thread [Next in Thread]