Commit 7d897818 authored by Alex Schroeder's avatar Alex Schroeder
Browse files

(rmail-summary-by-topic): Use

rmail-current-subject and rmail-current-subject-regexp.
(rmail-summary-next-same-subject): Ditto.
parent fc23c3c6
......@@ -132,7 +132,15 @@ Normally checks the Subject field of headers;
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")
(let* ((subject (with-current-buffer rmail-buffer
(subject-re (with-current-buffer rmail-buffer
(prompt (concat "Topics to summarize by (regexp"
(if subject ", default current subject" "")
"): ")))
(list (read-string prompt nil nil subject) current-prefix-arg)))
(concat "about " subject)
(list 'rmail-summary-by-topic subject whole-message)
......@@ -568,17 +576,11 @@ With prefix argument N moves backward N messages with these labels."
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)))
(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)
(let ((forward (> n 0))
search-regexp i found)
(with-current-buffer rmail-buffer
(setq search-regexp (rmail-current-subject-regexp)
i rmail-current-message))
(while (and (/= n 0)
(if forward
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment