From: Andrew G Cohen Date: Sun, 13 Mar 2022 23:59:25 +0000 (+0800) Subject: Use completion when mark limiting in gnus summary buffers X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9acfb7662c5c25fe9bfa7156da9916f58dfde9a5;p=emacs.git Use completion when mark limiting in gnus summary buffers * lisp/gnus/gnus-sum.el (gnus-summary-limit-to-marks) (gnus-summary-limit-exclude-marks): Use completing-read to complete on marks in the current summary buffer. --- diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index f13db8d9167..9a632922deb 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -8501,7 +8501,15 @@ If UNREPLIED (the prefix), limit to unreplied articles." If REVERSE, limit the summary buffer to articles that are marked with MARKS. MARKS can either be a string of marks or a list of marks. Returns how many articles were removed." - (interactive "sMarks: " gnus-summary-mode) + (interactive + (list + (completing-read "Marks:" + (let ((mark-list '())) + (mapc (lambda (datum) + (cl-pushnew (gnus-data-mark datum) mark-list)) + gnus-newsgroup-data) + (mapcar 'char-to-string mark-list))) + current-prefix-arg) gnus-summary-mode) (gnus-summary-limit-to-marks marks t)) (defun gnus-summary-limit-to-marks (marks &optional reverse) @@ -8510,7 +8518,15 @@ If REVERSE (the prefix), limit the summary buffer to articles that are not marked with MARKS. MARKS can either be a string of marks or a list of marks. Returns how many articles were removed." - (interactive "sMarks: \nP" gnus-summary-mode) + (interactive + (list + (completing-read "Marks:" + (let ((mark-list '())) + (mapc (lambda (datum) + (cl-pushnew (gnus-data-mark datum) mark-list)) + gnus-newsgroup-data) + (mapcar 'char-to-string mark-list))) + current-prefix-arg) gnus-summary-mode) (prog1 (let ((data gnus-newsgroup-data) (marks (if (listp marks) marks