From 206e383b9779521052d9ac3f98c9acfe415275c1 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Mon, 9 Jul 2012 14:05:08 +0200 Subject: [PATCH] * gnus-sum.el (gnus-summary-limit-to-author): Use default value instead of initial input when reading the author to restrict the summary to. --- lisp/ChangeLog | 5 +++++ lisp/gnus-sum.el | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6cf41e6bc..2bf2c715f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-07-09 Tassilo Horn + + * 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 * mm-decode.el (mm-shr): diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index afc023158..b7711dada 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -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)) -- 2.25.1