* gnus-sum.el (gnus-summary-limit-to-author): Use default value instead
authorTassilo Horn <tassilo@member.fsf.org>
Mon, 9 Jul 2012 12:05:08 +0000 (14:05 +0200)
committerTassilo Horn <tassilo@member.fsf.org>
Mon, 9 Jul 2012 12:05:08 +0000 (14:05 +0200)
of initial input when reading the author to restrict the summary to.

lisp/ChangeLog
lisp/gnus-sum.el

index 6cf41e6..2bf2c71 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-09  Tassilo Horn  <tassilo@member.fsf.org>
+
+       * gnus-sum.el (gnus-summary-limit-to-author): Use default value instead
+       of initial input when reading the author to restrict the summary to.
+
 2012-07-09  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * mm-decode.el (mm-shr):
index afc0231..b7711da 100644 (file)
@@ -8239,14 +8239,17 @@ If NOT-MATCHING, excluding articles that have subjects that match a regexp."
   "Limit the summary buffer to articles that have authors that match a regexp.
 If NOT-MATCHING, excluding articles that have authors that match a regexp."
   (interactive
-   (list (read-string (if current-prefix-arg
-                         "Exclude author (regexp): "
-                       "Limit to author (regexp): ")
-                     (let ((header (gnus-summary-article-header)))
-                       (if (not header)
-                           ""
-                         (car (mail-header-parse-address
-                               (mail-header-from header))))))
+   (list (let* ((header (gnus-summary-article-header))
+               (default (and header (car (mail-header-parse-address
+                                          (mail-header-from header))))))
+          (read-string (concat (if current-prefix-arg
+                                   "Exclude author (regexp"
+                                 "Limit to author (regexp")
+                               (if default
+                                   (concat ", default \"" default "\"): ")
+                                 "): "))
+                       nil nil
+                       default))
         current-prefix-arg))
   (gnus-summary-limit-to-subject from "from" not-matching))