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.
This commit is contained in:
Andrew G Cohen 2022-03-14 07:59:25 +08:00
parent 69f2036554
commit 9acfb7662c

View file

@ -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