diff options
author | Andrew G Cohen <cohen@andy.bu.edu> | 2022-03-14 07:59:25 +0800 |
---|---|---|
committer | Andrew G Cohen <cohen@andy.bu.edu> | 2023-04-01 09:51:42 +0800 |
commit | 9acfb7662c5c25fe9bfa7156da9916f58dfde9a5 (patch) | |
tree | ab61c05f6b99760cd448ae48ff05b1329f6e6da1 | |
parent | 69f20365543f30263b9c6856071d5a8610490a24 (diff) | |
download | emacs-9acfb7662c5c25fe9bfa7156da9916f58dfde9a5.tar.gz |
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.
-rw-r--r-- | lisp/gnus/gnus-sum.el | 20 |
1 files changed, 18 insertions, 2 deletions
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 |