Do `interactive' mode markup in all Gnus files

This commit is contained in:
Lars Ingebrigtsen 2021-02-14 14:14:48 +01:00
parent 869cdcf4e7
commit c0221990c4
30 changed files with 932 additions and 828 deletions

View file

@ -310,7 +310,7 @@ You can control what lines will be unwrapped by frobbing
`gnus-outlook-deuglify-unwrap-min' and `gnus-outlook-deuglify-unwrap-max',
indicating the minimum and maximum length of an unwrapped citation line. If
NODISPLAY is non-nil, don't redisplay the article buffer."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(let ((case-fold-search nil)
(inhibit-read-only t)
(cite-marks gnus-outlook-deuglify-cite-marks)
@ -430,7 +430,7 @@ NODISPLAY is non-nil, don't redisplay the article buffer."
(defun gnus-article-outlook-repair-attribution (&optional nodisplay)
"Repair a broken attribution line.
If NODISPLAY is non-nil, don't redisplay the article buffer."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(let ((attrib-start
(or
(gnus-outlook-repair-attribution-other)
@ -442,7 +442,7 @@ If NODISPLAY is non-nil, don't redisplay the article buffer."
(defun gnus-article-outlook-rearrange-citation (&optional nodisplay)
"Repair broken citations.
If NODISPLAY is non-nil, don't redisplay the article buffer."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(let ((attrib-start (gnus-article-outlook-repair-attribution 'nodisplay)))
;; rearrange citations if an attribution line has been recognized
(if attrib-start
@ -455,7 +455,7 @@ If NODISPLAY is non-nil, don't redisplay the article buffer."
Treat \"smartquotes\", unwrap lines, repair attribution and
rearrange citation. If NODISPLAY is non-nil, don't redisplay the
article buffer."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
;; apply treatment of dumb quotes
(gnus-article-treat-smartquotes)
;; repair wrapped cited lines
@ -467,7 +467,7 @@ article buffer."
;;;###autoload
(defun gnus-article-outlook-deuglify-article ()
"Deuglify broken Outlook (Express) articles and redisplay."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-outlook-deuglify-article nil))
(provide 'deuglify)

File diff suppressed because it is too large Load diff

View file

@ -168,7 +168,7 @@ So the cdr of each bookmark is an alist too.")
;;;###autoload
(defun gnus-bookmark-set ()
"Set a bookmark for this article."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-bookmark-maybe-load-default-file)
(if (or (not (derived-mode-p 'gnus-summary-mode))
(not gnus-article-current))
@ -483,7 +483,7 @@ Gnus bookmarks names preceded by a \"*\" have annotations.
(defun gnus-bookmark-bmenu-toggle-infos (&optional show)
"Toggle whether details are shown in the Gnus bookmark list.
Optional argument SHOW means show them unconditionally."
(interactive)
(interactive nil gnus-bookmark-bmenu-mode)
(cond
(show
(setq gnus-bookmark-bmenu-toggle-infos nil)
@ -649,14 +649,14 @@ reposition and try again, else return nil."
(defun gnus-bookmark-bmenu-show-details ()
"Show the annotation for the current bookmark in another window."
(interactive)
(interactive nil gnus-bookmark-bmenu-mode)
(let ((bookmark (gnus-bookmark-bmenu-bookmark)))
(if (gnus-bookmark-bmenu-check-position)
(gnus-bookmark-show-details bookmark))))
(defun gnus-bookmark-bmenu-mark ()
"Mark bookmark on this line to be displayed by \\<gnus-bookmark-bmenu-mode-map>\\[gnus-bookmark-bmenu-select]."
(interactive)
(interactive nil gnus-bookmark-bmenu-mode)
(beginning-of-line)
(if (gnus-bookmark-bmenu-check-position)
(let ((inhibit-read-only t))
@ -668,7 +668,7 @@ reposition and try again, else return nil."
(defun gnus-bookmark-bmenu-unmark (&optional backup)
"Cancel all requested operations on bookmark on this line and move down.
Optional BACKUP means move up."
(interactive "P")
(interactive "P" gnus-bookmark-bmenu-mode)
(beginning-of-line)
(if (gnus-bookmark-bmenu-check-position)
(progn
@ -683,7 +683,7 @@ Optional BACKUP means move up."
(defun gnus-bookmark-bmenu-backup-unmark ()
"Move up and cancel all requested operations on bookmark on line above."
(interactive)
(interactive nil gnus-bookmark-bmenu-mode)
(forward-line -1)
(if (gnus-bookmark-bmenu-check-position)
(progn
@ -695,7 +695,7 @@ Optional BACKUP means move up."
"Mark Gnus bookmark on this line to be deleted.
To carry out the deletions that you've marked, use
\\<gnus-bookmark-bmenu-mode-map>\\[gnus-bookmark-bmenu-execute-deletions]."
(interactive)
(interactive nil gnus-bookmark-bmenu-mode)
(beginning-of-line)
(if (gnus-bookmark-bmenu-check-position)
(let ((inhibit-read-only t))
@ -708,7 +708,7 @@ To carry out the deletions that you've marked, use
"Mark bookmark on this line to be deleted, then move up one line.
To carry out the deletions that you've marked, use
\\<gnus-bookmark-bmenu-mode-map>\\[gnus-bookmark-bmenu-execute-deletions]."
(interactive)
(interactive nil gnus-bookmark-bmenu-mode)
(gnus-bookmark-bmenu-delete)
(forward-line -2)
(if (gnus-bookmark-bmenu-check-position)
@ -720,7 +720,7 @@ To carry out the deletions that you've marked, use
You can mark bookmarks with the
\\<gnus-bookmark-bmenu-mode-map>\\[gnus-bookmark-bmenu-mark]
command."
(interactive)
(interactive nil gnus-bookmark-bmenu-mode)
(if (gnus-bookmark-bmenu-check-position)
(let ((bmrk (gnus-bookmark-bmenu-bookmark))
(menu (current-buffer)))
@ -730,13 +730,13 @@ command."
(bury-buffer menu))))
(defun gnus-bookmark-bmenu-select-by-mouse (event)
(interactive "e")
(interactive "e" gnus-bookmark-bmenu-mode)
(mouse-set-point event)
(gnus-bookmark-bmenu-select))
(defun gnus-bookmark-bmenu-load ()
"Load the Gnus bookmark file and rebuild the bookmark menu-buffer."
(interactive)
(interactive nil gnus-bookmark-bmenu-mode)
(if (gnus-bookmark-bmenu-check-position)
(save-excursion
(save-window-excursion
@ -745,7 +745,7 @@ command."
(defun gnus-bookmark-bmenu-execute-deletions ()
"Delete Gnus bookmarks marked with \\<Buffer-menu-mode-map>\\[Buffer-menu-delete] commands."
(interactive)
(interactive nil gnus-bookmark-bmenu-mode)
(message "Deleting Gnus bookmarks...")
(let ((hide-em gnus-bookmark-bmenu-toggle-infos)
(o-point (point))

View file

@ -342,7 +342,7 @@ it's not cached."
"Enter the next N articles into the cache.
If not given a prefix, use the process marked articles instead.
Returns the list of articles entered."
(interactive "P")
(interactive "P" gnus-summary-mode)
(let (out)
(dolist (article (gnus-summary-work-articles n))
(gnus-summary-remove-process-mark article)
@ -363,7 +363,7 @@ Returns the list of articles entered."
"Remove the next N articles from the cache.
If not given a prefix, use the process marked articles instead.
Returns the list of articles removed."
(interactive "P")
(interactive "P" gnus-summary-mode)
(gnus-cache-change-buffer gnus-newsgroup-name)
(let (out)
(dolist (article (gnus-summary-work-articles n))
@ -388,7 +388,7 @@ Returns the list of articles removed."
(defun gnus-summary-insert-cached-articles ()
"Insert all the articles cached for this group into the current buffer."
(interactive)
(interactive nil gnus-summary-mode)
(let ((gnus-verbose (max 6 gnus-verbose)))
(cond
((not gnus-newsgroup-cached)
@ -401,7 +401,7 @@ Returns the list of articles removed."
(defun gnus-summary-limit-include-cached ()
"Limit the summary buffer to articles that are cached."
(interactive)
(interactive nil gnus-summary-mode)
(let ((gnus-verbose (max 6 gnus-verbose)))
(if gnus-newsgroup-cached
(progn

View file

@ -335,7 +335,7 @@ lines matches `message-cite-prefix-regexp' with the same prefix.
Lines matching `gnus-cite-attribution-suffix' and perhaps
`gnus-cite-attribution-prefix' are considered attribution lines."
(interactive (list 'force))
(interactive (list 'force) gnus-article-mode gnus-summary-mode)
(with-current-buffer (if same-buffer (current-buffer) gnus-article-buffer)
(gnus-cite-parse-maybe force)
(let ((buffer-read-only nil)
@ -459,7 +459,7 @@ frame width.
Sections that are heuristically interpreted as not being
text (i.e., computer code and the like) will not be folded."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(with-current-buffer gnus-article-buffer
(let ((buffer-read-only nil)
(inhibit-point-motion-hooks t)
@ -529,7 +529,8 @@ text (i.e., computer code and the like) will not be folded."
See the documentation for `gnus-article-highlight-citation'.
If given a negative prefix, always show; if given a positive prefix,
always hide."
(interactive (append (gnus-article-hidden-arg) (list 'force)))
(interactive (append (gnus-article-hidden-arg) (list 'force))
gnus-article-mode gnus-summary-mode)
(gnus-set-format 'cited-opened-text-button t)
(gnus-set-format 'cited-closed-text-button t)
(with-current-buffer gnus-article-buffer
@ -661,7 +662,8 @@ percent and at least `gnus-cite-hide-absolute' lines of the body is
cited text with attributions. When called interactively, these two
variables are ignored.
See also the documentation for `gnus-article-highlight-citation'."
(interactive (append (gnus-article-hidden-arg) '(force)))
(interactive (append (gnus-article-hidden-arg) '(force))
gnus-article-mode gnus-summary-mode)
(with-current-buffer gnus-article-buffer
(gnus-delete-wash-type 'cite)
(unless (gnus-article-check-hidden-text 'cite arg)
@ -689,7 +691,7 @@ See also the documentation for `gnus-article-highlight-citation'."
(defun gnus-article-hide-citation-in-followups ()
"Hide cited text in non-root articles."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(with-current-buffer gnus-article-buffer
(let ((article (cdr gnus-article-current)))
(unless (with-current-buffer gnus-summary-buffer

View file

@ -337,7 +337,8 @@ category."))
(defun gnus-group-customize (group &optional topic)
"Edit the group or topic on the current line."
(interactive (list (gnus-group-group-name) (gnus-group-topic-name)))
(interactive (list (gnus-group-group-name) (gnus-group-topic-name))
gnus-group-mode)
(let (info
(types (mapcar (lambda (entry)
`(cons :format "%v%h\n"
@ -485,7 +486,7 @@ form, but who cares?"
(defun gnus-group-customize-done (&rest _ignore)
"Apply changes and bury the buffer."
(interactive)
(interactive nil gnus-custom-mode)
(let ((params (widget-value gnus-custom-params)))
(if gnus-custom-topic
(gnus-topic-set-parameters gnus-custom-topic params)
@ -829,7 +830,7 @@ eh?")))
"Customize score file FILE.
When called interactively, FILE defaults to the current score file.
This can be changed using the `\\[gnus-score-change-score-file]' command."
(interactive (list gnus-current-score-file))
(interactive (list gnus-current-score-file) gnus-summary-mode)
(unless file
(error "No score file for %s" gnus-newsgroup-name))
(let ((scores (gnus-score-load file))
@ -1000,7 +1001,7 @@ articles in the thread.
(defun gnus-agent-customize-category (category)
"Edit the CATEGORY."
(interactive (list (gnus-category-name)))
(interactive (list (gnus-category-name)) gnus-custom-mode)
(let ((info (assq category gnus-category-alist))
(defaults (list nil '(agent-predicate . false)
(cons 'agent-enable-expiration

View file

@ -76,10 +76,10 @@ DELAY is a string, giving the length of the time. Possible values are:
The value of `message-draft-headers' determines which headers are
generated when the article is delayed. Remaining headers are
generated when the article is sent."
(interactive
(list (read-string
"Target date (YYYY-MM-DD), time (hh:mm), or length of delay (units in [mhdwMY]): "
gnus-delay-default-delay)))
(interactive (list (read-string
"Target date (YYYY-MM-DD), time (hh:mm), or length of delay (units in [mhdwMY]): "
gnus-delay-default-delay))
message-mode)
;; Allow spell checking etc.
(run-hooks 'message-send-hook)
(let (num unit year month day hour minute deadline) ;; days

View file

@ -214,7 +214,7 @@ There are currently two built-in format functions:
(defun gnus-summary-sort-by-schedule (&optional reverse)
"Sort nndiary summary buffers by schedule of appointments.
Optional prefix (or REVERSE argument) means sort in reverse order."
(interactive "P")
(interactive "P" gnus-summary-mode)
(gnus-summary-sort 'schedule reverse))
(defvar gnus-summary-misc-menu) ;; Avoid byte compiler warning.
@ -322,7 +322,7 @@ This function checks that all NNDiary required headers are present and
valid, and prompts for values / correction otherwise.
If ARG (or prefix) is non-nil, force prompting for all fields."
(interactive "P")
(interactive "P" gnus-summary-mode)
(save-excursion
(mapcar
(lambda (head)

View file

@ -124,7 +124,8 @@ filenames."
(mapcar
;; don't attach directories
(lambda (f) (if (file-directory-p f) nil f))
(nreverse (dired-map-over-marks (dired-get-filename) nil))))))
(nreverse (dired-map-over-marks (dired-get-filename) nil)))))
dired-mode)
(let ((destination nil)
(files-str nil)
(bufs nil))
@ -178,7 +179,8 @@ filenames."
If ARG is non-nil, open it in a new buffer."
(interactive (list
(file-name-sans-versions (dired-get-filename) t)
current-prefix-arg))
current-prefix-arg)
dired-mode)
(mailcap-parse-mailcaps)
(if (file-exists-p file-name)
(let (mime-type method)
@ -216,7 +218,8 @@ that name. If PRINT-TO is a number, prompt the user for the name
of the file to save in."
(interactive (list
(file-name-sans-versions (dired-get-filename) t)
(ps-print-preprint current-prefix-arg)))
(ps-print-preprint current-prefix-arg))
dired-mode)
(mailcap-parse-mailcaps)
(cond
((file-directory-p file-name)

View file

@ -71,7 +71,7 @@
(defun gnus-draft-toggle-sending (article)
"Toggle whether to send an article or not."
(interactive (list (gnus-summary-article-number)))
(interactive (list (gnus-summary-article-number)) gnus-summary-mode)
(if (gnus-draft-article-sendable-p article)
(progn
(push article gnus-newsgroup-unsendable)
@ -83,7 +83,7 @@
(defun gnus-draft-edit-message ()
"Enter a mail/post buffer to edit and send the draft."
(interactive)
(interactive nil gnus-summary-mode)
(let ((article (gnus-summary-article-number))
(group gnus-newsgroup-name))
(gnus-draft-check-draft-articles (list article))
@ -109,7 +109,7 @@
(defun gnus-draft-send-message (&optional n)
"Send the current draft(s).
Obeys the standard process/prefix convention."
(interactive "P")
(interactive "P" gnus-summary-mode)
(let* ((articles (gnus-summary-work-articles n))
(total (length articles))
article)

View file

@ -104,7 +104,7 @@ The optional LAYOUT overrides the `edit-form' window layout."
(defun gnus-edit-form-done ()
"Update changes and kill the current buffer."
(interactive)
(interactive nil gnus-edit-form-mode)
(goto-char (point-min))
(let ((form (condition-case nil
(read (current-buffer))
@ -115,7 +115,7 @@ The optional LAYOUT overrides the `edit-form' window layout."
(defun gnus-edit-form-exit ()
"Kill the current buffer."
(interactive)
(interactive nil gnus-edit-form-mode)
(let ((winconf gnus-prev-winconf))
(kill-buffer (current-buffer))
(set-window-configuration winconf)))

View file

@ -132,11 +132,12 @@ For instance, to insert an X-Face use `gnus-random-x-face' as FUN
Files matching `gnus-x-face-omit-files' are not considered."
(interactive)
(gnus--random-face-with-type gnus-x-face-directory "\\.pbm$" gnus-x-face-omit-files
(lambda (file)
(gnus-shell-command-to-string
(format gnus-convert-pbm-to-x-face-command
(shell-quote-argument file))))))
(gnus--random-face-with-type
gnus-x-face-directory "\\.pbm$" gnus-x-face-omit-files
(lambda (file)
(gnus-shell-command-to-string
(format gnus-convert-pbm-to-x-face-command
(shell-quote-argument file))))))
;;;###autoload
(defun gnus-insert-random-x-face-header ()
@ -231,8 +232,8 @@ FILE should be a PNG file that's 48x48 and smaller than or equal to
Files matching `gnus-face-omit-files' are not considered."
(interactive)
(gnus--random-face-with-type gnus-face-directory "\\.png$"
gnus-face-omit-files
'gnus-convert-png-to-face))
gnus-face-omit-files
'gnus-convert-png-to-face))
;;;###autoload
(defun gnus-insert-random-face-header ()
@ -277,7 +278,6 @@ colors of the displayed X-Faces."
(defun gnus-grab-cam-x-face ()
"Grab a picture off the camera and make it into an X-Face."
(interactive)
(shell-command "xawtv-remote snap ppm")
(let ((file nil))
(while (null (setq file (directory-files "/tftpboot/sparky/tmp"
@ -289,13 +289,11 @@ colors of the displayed X-Faces."
(format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | ppmnorm 2>%s | pnmscale -width 48 | ppmtopgm | pgmtopbm -threshold -value 0.92 | pbmtoxbm | compface"
file null-device)
(current-buffer))
;;(sleep-for 3)
(delete-file file)
(buffer-string))))
(defun gnus-grab-cam-face ()
"Grab a picture off the camera and make it into an X-Face."
(interactive)
(shell-command "xawtv-remote snap ppm")
(let ((file nil)
(tempfile (make-temp-file "gnus-face-" nil ".ppm"))
@ -312,7 +310,6 @@ colors of the displayed X-Faces."
(gnus-fun-ppm-change-string))))
(setq result (gnus-face-from-file tempfile)))
(delete-file file)
;;(delete-file tempfile) ; FIXME why are we not deleting it?!
result))
(defun gnus-fun-ppm-change-string ()

View file

@ -125,7 +125,7 @@ callback for `gravatar-retrieve'."
(defun gnus-treat-from-gravatar (&optional force)
"Display gravatar in the From header.
If gravatar is already displayed, remove it."
(interactive "p")
(interactive "p" gnus-article-mode gnus-summary-mode)
(gnus-with-article-buffer
(if (memq 'from-gravatar gnus-article-wash-types)
(gnus-delete-images 'from-gravatar)
@ -135,7 +135,7 @@ If gravatar is already displayed, remove it."
(defun gnus-treat-mail-gravatar (&optional force)
"Display gravatars in the Cc and To headers.
If gravatars are already displayed, remove them."
(interactive "p")
(interactive "p" gnus-article-mode gnus-summary-mode)
(gnus-with-article-buffer
(if (memq 'mail-gravatar gnus-article-wash-types)
(gnus-delete-images 'mail-gravatar)

View file

@ -1160,7 +1160,7 @@ The following commands are available:
(defun gnus-mouse-pick-group (e)
"Enter the group under the mouse pointer."
(interactive "e")
(interactive "e" gnus-group-mode)
(mouse-set-point e)
(gnus-group-read-group nil))
@ -1241,7 +1241,8 @@ Also see the `gnus-group-use-permanent-levels' variable."
(or
(gnus-group-default-level nil t)
(gnus-group-default-list-level)
gnus-level-subscribed))))
gnus-level-subscribed)))
gnus-group-mode)
(unless level
(setq level (car gnus-group-list-mode)
unread (cdr gnus-group-list-mode)))
@ -1292,7 +1293,7 @@ Also see the `gnus-group-use-permanent-levels' variable."
(defun gnus-group-list-level (level &optional all)
"List groups on LEVEL.
If ALL (the prefix), also list groups that have no unread articles."
(interactive "nList groups on level: \nP")
(interactive "nList groups on level: \nP" gnus-group-mode)
(gnus-group-list-groups level all level))
(defun gnus-group-prepare-logic (group test)
@ -1866,7 +1867,7 @@ If FIRST-TOO, the current line is also eligible as a target."
(defun gnus-group-mark-group (n &optional unmark no-advance)
"Mark the current group."
(interactive "p")
(interactive "p" gnus-group-mode)
(let ((buffer-read-only nil)
group)
(while (and (> n 0)
@ -1891,13 +1892,13 @@ If FIRST-TOO, the current line is also eligible as a target."
(defun gnus-group-unmark-group (n)
"Remove the mark from the current group."
(interactive "p")
(interactive "p" gnus-group-mode)
(gnus-group-mark-group n 'unmark)
(gnus-group-position-point))
(defun gnus-group-unmark-all-groups ()
"Unmark all groups."
(interactive)
(interactive nil gnus-group-mode)
(save-excursion
(mapc #'gnus-group-remove-mark gnus-group-marked))
(gnus-group-position-point))
@ -1905,7 +1906,7 @@ If FIRST-TOO, the current line is also eligible as a target."
(defun gnus-group-mark-region (unmark beg end)
"Mark all groups between point and mark.
If UNMARK, remove the mark instead."
(interactive "P\nr")
(interactive "P\nr" gnus-group-mode)
(let ((num (count-lines beg end)))
(save-excursion
(goto-char beg)
@ -1914,12 +1915,12 @@ If UNMARK, remove the mark instead."
(defun gnus-group-mark-buffer (&optional unmark)
"Mark all groups in the buffer.
If UNMARK, remove the mark instead."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-group-mark-region unmark (point-min) (point-max)))
(defun gnus-group-mark-regexp (regexp)
"Mark all groups that match some regexp."
(interactive "sMark (regexp): ")
(interactive "sMark (regexp): " gnus-group-mode)
(let ((alist (cdr gnus-newsrc-alist))
group)
(save-excursion
@ -2028,7 +2029,7 @@ number of the earliest articles in the group.
If the optional argument NO-ARTICLE is non-nil, no article will
be auto-selected upon group entry. If GROUP is non-nil, fetch
that group."
(interactive "P")
(interactive "P" gnus-group-mode)
(let ((no-display (eq all 0))
(group (or group (gnus-group-group-name)))
number active marked entry)
@ -2062,7 +2063,7 @@ If ALL is a positive number, fetch this number of the latest
articles in the group.
If ALL is a negative number, fetch this number of the earliest
articles in the group."
(interactive "P")
(interactive "P" gnus-group-mode)
(when (and (eobp) (not (gnus-group-group-name)))
(forward-line -1))
(gnus-group-read-group all t))
@ -2081,7 +2082,7 @@ buffer. If GROUP is nil, use current group.
This might be useful if you want to toggle threading
before entering the group."
(interactive "P")
(interactive "P" gnus-group-mode)
(require 'gnus-score)
(let (gnus-visual
gnus-score-find-score-files-function
@ -2092,7 +2093,7 @@ before entering the group."
(defun gnus-group-visible-select-group (&optional all)
"Select the current group without hiding any articles."
(interactive "P")
(interactive "P" gnus-group-mode)
(let ((gnus-inhibit-limiting t))
(gnus-group-read-group all t)))
@ -2101,7 +2102,7 @@ before entering the group."
You will actually be entered into a group that's a copy of
the current group; no changes you make while in this group will
be permanent."
(interactive)
(interactive nil gnus-group-mode)
(require 'gnus-score)
(let* (gnus-visual
gnus-score-find-score-files-function gnus-apply-kill-hook
@ -2333,7 +2334,8 @@ specified by `gnus-gmane-group-download-format'."
(list
(gnus-group-completing-read "Gmane group")
(read-number "Start article number: ")
(read-number "How many articles: ")))
(read-number "How many articles: "))
gnus-group-mode)
(unless range (setq range 500))
(when (< range 1)
(error "Invalid range: %s" range))
@ -2367,8 +2369,7 @@ Valid input formats include:
;; - The URLs should be added to `gnus-button-alist'. Probably we should
;; prompt the user to decide: "View via `browse-url' or in Gnus? "
;; (`gnus-read-ephemeral-gmane-group-url')
(interactive
(list (gnus-group-completing-read "Gmane URL")))
(interactive (list (gnus-group-completing-read "Gmane URL")) gnus-group-mode)
(let (group start range)
(cond
;; URLs providing `group', `start' and `range':
@ -2543,7 +2544,8 @@ If PROMPT (the prefix) is a number, use the prompt specified in
(or (and (stringp gnus-group-jump-to-group-prompt)
gnus-group-jump-to-group-prompt)
(let ((p (cdr (assq 0 gnus-group-jump-to-group-prompt))))
(and (stringp p) p)))))))
(and (stringp p) p))))))
gnus-group-mode)
(when (equal group "")
(error "Empty group name"))
@ -2612,7 +2614,7 @@ Return nil if GROUP is not found."
If N is negative, search backward instead.
Returns the difference between N and the number of skips actually
done."
(interactive "p")
(interactive "p" gnus-group-mode)
(gnus-group-next-unread-group n t nil silent))
(defun gnus-group-next-unread-group (n &optional all level silent)
@ -2624,7 +2626,7 @@ such group can be found, the next group with a level higher than
LEVEL.
Returns the difference between N and the number of skips actually
made."
(interactive "p")
(interactive "p" gnus-group-mode)
(let ((backward (< n 0))
(n (abs n)))
(while (and (> n 0)
@ -2641,14 +2643,14 @@ made."
"Go to previous N'th newsgroup.
Returns the difference between N and the number of skips actually
done."
(interactive "p")
(interactive "p" gnus-group-mode)
(gnus-group-next-unread-group (- n) t))
(defun gnus-group-prev-unread-group (n)
"Go to previous N'th unread newsgroup.
Returns the difference between N and the number of skips actually
done."
(interactive "p")
(interactive "p" gnus-group-mode)
(gnus-group-next-unread-group (- n)))
(defun gnus-group-next-unread-group-same-level (n)
@ -2656,7 +2658,7 @@ done."
If N is negative, search backward instead.
Returns the difference between N and the number of skips actually
done."
(interactive "p")
(interactive "p" gnus-group-mode)
(gnus-group-next-unread-group n t (gnus-group-group-level))
(gnus-group-position-point))
@ -2664,14 +2666,14 @@ done."
"Go to next N'th unread newsgroup on the same level.
Returns the difference between N and the number of skips actually
done."
(interactive "p")
(interactive "p" gnus-group-mode)
(gnus-group-next-unread-group (- n) t (gnus-group-group-level))
(gnus-group-position-point))
(defun gnus-group-best-unread-group (&optional exclude-group)
"Go to the group with the highest level.
If EXCLUDE-GROUP, do not go to that group."
(interactive)
(interactive nil gnus-group-mode)
(goto-char (point-min))
(let ((best 100000)
unread best-point)
@ -2711,7 +2713,7 @@ If EXCLUDE-GROUP, do not go to that group."
(defun gnus-group-first-unread-group ()
"Go to the first group with unread articles."
(interactive)
(interactive nil gnus-group-mode)
(prog1
(let ((opoint (point))
unread)
@ -2727,13 +2729,13 @@ If EXCLUDE-GROUP, do not go to that group."
(defun gnus-group-enter-server-mode ()
"Jump to the server buffer."
(interactive)
(interactive nil gnus-group-mode)
(gnus-enter-server-buffer))
(defun gnus-group-make-group-simple (&optional group)
"Add a new newsgroup.
The user will be prompted for GROUP."
(interactive (list (gnus-group-completing-read)))
(interactive (list (gnus-group-completing-read)) gnus-group-mode)
(gnus-group-make-group (gnus-group-real-name group)
(gnus-group-server group)
nil nil))
@ -2749,7 +2751,8 @@ server."
(interactive
(list
(gnus-read-group "Group name: ")
(gnus-read-method "Select method for new group (use tab for completion)")))
(gnus-read-method "Select method for new group (use tab for completion)"))
gnus-group-mode)
(when (stringp method)
(setq method (or (gnus-server-to-method method) method)))
@ -2794,7 +2797,7 @@ server."
(defun gnus-group-delete-groups (&optional arg)
"Delete the current group. Only meaningful with editable groups."
(interactive "P")
(interactive "P" gnus-group-mode)
(let ((n (length (gnus-group-process-prefix arg))))
(when (gnus-yes-or-no-p
(if (= n 1)
@ -2809,8 +2812,8 @@ server."
If OLDP (the prefix), only delete articles that are \"old\",
according to the expiry settings. Note that this will delete old
not-expirable articles, too."
(interactive (list (gnus-group-group-name)
current-prefix-arg))
(interactive (list (gnus-group-group-name) current-prefix-arg)
gnus-group-mode)
(let ((articles (gnus-uncompress-range (gnus-active group))))
(when (gnus-yes-or-no-p
(format "Do you really want to delete these %d articles forever? "
@ -2829,9 +2832,8 @@ doing the deletion.
Note that you also have to specify FORCE if you want the group to
be removed from the server, even when it's empty."
(interactive
(list (gnus-group-group-name)
current-prefix-arg))
(interactive (list (gnus-group-group-name) current-prefix-arg)
gnus-group-mode)
(unless group
(error "No group to delete"))
(unless (gnus-check-backend-function 'request-delete-group group)
@ -2865,7 +2867,8 @@ and NEW-NAME will be prompted for."
"Rename group to: "
(gnus-group-real-name group))
method (gnus-info-method (gnus-get-info group)))
(list group (gnus-group-prefixed-name new-name method))))
(list group (gnus-group-prefixed-name new-name method)))
gnus-group-mode)
(unless (gnus-check-backend-function 'request-rename-group group)
(error "This back end does not support renaming groups"))
@ -2911,7 +2914,7 @@ and NEW-NAME will be prompted for."
(defun gnus-group-edit-group (group &optional part)
"Edit the group on the current line."
(interactive (list (gnus-group-group-name)))
(interactive (list (gnus-group-group-name)) gnus-group-mode)
(let ((part (or part 'info))
info)
(unless group
@ -2950,12 +2953,12 @@ and NEW-NAME will be prompted for."
(defun gnus-group-edit-group-method (group)
"Edit the select method of GROUP."
(interactive (list (gnus-group-group-name)))
(interactive (list (gnus-group-group-name)) gnus-group-mode)
(gnus-group-edit-group group 'method))
(defun gnus-group-edit-group-parameters (group)
"Edit the group parameters of GROUP."
(interactive (list (gnus-group-group-name)))
(interactive (list (gnus-group-group-name)) gnus-group-mode)
(gnus-group-edit-group group 'params))
(defun gnus-group-edit-group-done (part group form)
@ -2993,14 +2996,16 @@ and NEW-NAME will be prompted for."
(defun gnus-group-make-useful-group (group method)
"Create one of the groups described in `gnus-useful-groups'."
(interactive
(let ((entry (assoc (gnus-completing-read "Create group"
(mapcar #'car gnus-useful-groups)
t)
(let ((entry (assoc (gnus-completing-read
"Create group"
(mapcar #'car gnus-useful-groups)
t)
gnus-useful-groups)))
(list (cadr entry)
;; Don't use `caddr' here since macros within the `interactive'
;; form won't be expanded.
(car (cddr entry)))))
;; Don't use `caddr' here since macros within the
;; `interactive' form won't be expanded.
(car (cddr entry))))
gnus-group-mode)
(setq method (copy-tree method))
(let (entry)
(while (setq entry (memq (assq 'eval method) method))
@ -3014,7 +3019,7 @@ group already exists:
- if not given, and error is signaled,
- if t, stay silent,
- if anything else, just print a message."
(interactive)
(interactive nil gnus-group-mode)
(let ((name (gnus-group-prefixed-name "gnus-help" '(nndoc "gnus-help")))
(file (nnheader-find-etc-directory "gnus-tut.txt" t)))
(if (gnus-group-entry name)
@ -3040,9 +3045,9 @@ group already exists:
"Create a group that uses a single file as the source.
If called with a prefix argument, ask for the file type."
(interactive
(list (read-file-name "File name: ")
(and current-prefix-arg 'ask)))
(interactive (list (read-file-name "File name: ")
(and current-prefix-arg 'ask))
gnus-group-mode)
(when (eq type 'ask)
(let ((err "")
char found)
@ -3077,7 +3082,7 @@ If called with a prefix argument, ask for the file type."
(defun gnus-group-make-web-group (&optional solid)
"Create an ephemeral nnweb group.
If SOLID (the prefix), create a solid group."
(interactive "P")
(interactive "P" gnus-group-mode)
(require 'nnweb)
(let* ((group
(if solid (gnus-read-group "Group name: ")
@ -3117,7 +3122,7 @@ If SOLID (the prefix), create a solid group."
(defun gnus-group-make-rss-group (&optional url)
"Given a URL, discover if there is an RSS feed.
If there is, use Gnus to create an nnrss group"
(interactive)
(interactive nil gnus-group-mode)
(require 'nnrss)
(if (not url)
(setq url (read-from-minibuffer "URL to Search for RSS: ")))
@ -3158,8 +3163,8 @@ If there is, use Gnus to create an nnrss group"
The user will be prompted for a directory. The contents of this
directory will be used as a newsgroup. The directory should contain
mail messages or news articles in files that have numeric names."
(interactive
(list (read-directory-name "Create group from directory: ")))
(interactive (list (read-directory-name "Create group from directory: "))
gnus-group-mode)
(unless (file-exists-p dir)
(error "No such directory"))
(unless (file-directory-p dir)
@ -3192,7 +3197,7 @@ prefix arg NO-PARSE means that Gnus should not parse the search
query before passing it to the underlying search engine. A
non-nil SPECS arg must be an alist with `search-query-spec' and
`search-group-spec' keys, and skips all prompting."
(interactive "P")
(interactive "P" gnus-group-mode)
(let ((name (gnus-read-group "Group name: ")))
(with-current-buffer gnus-group-buffer
(let* ((group-spec
@ -3246,7 +3251,7 @@ prefix arg NO-PARSE means that Gnus should not parse the search
query before passing it to the underlying search engine. A
non-nil SPECS arg must be an alist with `search-query-spec' and
`search-group-spec' keys, and skips all prompting."
(interactive "P")
(interactive "P" gnus-group-mode)
(let* ((group-spec
(or (cdr (assq 'search-group-spec specs))
(cdr (assq 'nnir-group-spec specs))
@ -3286,10 +3291,10 @@ non-nil SPECS arg must be an alist with `search-query-spec' and
(defun gnus-group-add-to-virtual (n vgroup)
"Add the current group to a virtual group."
(interactive
(list current-prefix-arg
(gnus-group-completing-read "Add to virtual group"
nil t "nnvirtual:")))
(interactive (list current-prefix-arg
(gnus-group-completing-read "Add to virtual group"
nil t "nnvirtual:"))
gnus-group-mode)
(unless (eq (car (gnus-find-method-for-group vgroup)) 'nnvirtual)
(error "%s is not an nnvirtual group" vgroup))
(gnus-close-group vgroup)
@ -3307,7 +3312,7 @@ non-nil SPECS arg must be an alist with `search-query-spec' and
(defun gnus-group-make-empty-virtual (group)
"Create a new, fresh, empty virtual group."
(interactive "sCreate new, empty virtual group: ")
(interactive "sCreate new, empty virtual group: " gnus-group-mode)
(let* ((method (list 'nnvirtual "^$"))
(pgroup (gnus-group-prefixed-name group method)))
;; Check whether it exists already.
@ -3321,7 +3326,7 @@ non-nil SPECS arg must be an alist with `search-query-spec' and
(defun gnus-group-enter-directory (dir)
"Enter an ephemeral nneething group."
(interactive "DDirectory to read: ")
(interactive "DDirectory to read: " gnus-group-mode)
(let* ((method (list 'nneething dir '(nneething-read-only t)))
(leaf (gnus-group-prefixed-name
(file-name-nondirectory (directory-file-name dir))
@ -3336,7 +3341,7 @@ non-nil SPECS arg must be an alist with `search-query-spec' and
(defun gnus-group-expunge-group (group)
"Expunge deleted articles in current nnimap GROUP."
(interactive (list (gnus-group-group-name)))
(interactive (list (gnus-group-group-name)) gnus-group-mode)
(let ((method (gnus-find-method-for-group group)))
(if (not (gnus-check-backend-function
'request-expunge-group (car method)))
@ -3348,7 +3353,7 @@ non-nil SPECS arg must be an alist with `search-query-spec' and
(defun gnus-group-nnimap-edit-acl (group)
"Edit the Access Control List of current nnimap GROUP."
(interactive (list (gnus-group-group-name)))
(interactive (list (gnus-group-group-name)) gnus-group-mode)
(let ((mailbox (gnus-group-real-name group)) method acl)
(unless group
(error "No group on current line"))
@ -3395,7 +3400,8 @@ Editing the access control list for `%s'.
When used interactively, the sorting function used will be
determined by the `gnus-group-sort-function' variable.
If REVERSE (the prefix), reverse the sorting order."
(interactive (list gnus-group-sort-function current-prefix-arg))
(interactive (list gnus-group-sort-function current-prefix-arg)
gnus-group-mode)
(funcall gnus-group-sort-alist-function
(gnus-make-sort-function func) reverse)
(gnus-group-unmark-all-groups)
@ -3428,56 +3434,57 @@ value is disregarded."
(defun gnus-group-sort-groups-by-alphabet (&optional reverse)
"Sort the group buffer alphabetically by group name.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-group-sort-groups 'gnus-group-sort-by-alphabet reverse))
(defun gnus-group-sort-groups-by-real-name (&optional reverse)
"Sort the group buffer alphabetically by real (unprefixed) group name.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-group-sort-groups 'gnus-group-sort-by-real-name reverse))
(defun gnus-group-sort-groups-by-unread (&optional reverse)
"Sort the group buffer by number of unread articles.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-group-sort-groups 'gnus-group-sort-by-unread reverse))
(defun gnus-group-sort-groups-by-level (&optional reverse)
"Sort the group buffer by group level.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-group-sort-groups 'gnus-group-sort-by-level reverse))
(defun gnus-group-sort-groups-by-score (&optional reverse)
"Sort the group buffer by group score.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-group-sort-groups 'gnus-group-sort-by-score reverse))
(defun gnus-group-sort-groups-by-rank (&optional reverse)
"Sort the group buffer by group rank.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-group-sort-groups 'gnus-group-sort-by-rank reverse))
(defun gnus-group-sort-groups-by-method (&optional reverse)
"Sort the group buffer alphabetically by back end name.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-group-sort-groups 'gnus-group-sort-by-method reverse))
(defun gnus-group-sort-groups-by-server (&optional reverse)
"Sort the group buffer alphabetically by server name.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-group-sort-groups 'gnus-group-sort-by-server reverse))
;;; Selected group sorting.
(defun gnus-group-sort-selected-groups (n func &optional reverse)
"Sort the process/prefixed groups."
(interactive (list current-prefix-arg gnus-group-sort-function))
(interactive (list current-prefix-arg gnus-group-sort-function)
gnus-group-mode)
(let ((groups (gnus-group-process-prefix n)))
(funcall gnus-group-sort-selected-function
groups (gnus-make-sort-function func) reverse)
@ -3509,49 +3516,49 @@ If REVERSE is non-nil, reverse the sorting."
"Sort the group buffer alphabetically by group name.
Obeys the process/prefix convention. If REVERSE (the symbolic prefix),
sort in reverse order."
(interactive (gnus-interactive "P\ny"))
(interactive (gnus-interactive "P\ny") gnus-group-mode)
(gnus-group-sort-selected-groups n 'gnus-group-sort-by-alphabet reverse))
(defun gnus-group-sort-selected-groups-by-real-name (&optional n reverse)
"Sort the group buffer alphabetically by real group name.
Obeys the process/prefix convention. If REVERSE (the symbolic prefix),
sort in reverse order."
(interactive (gnus-interactive "P\ny"))
(interactive (gnus-interactive "P\ny") gnus-group-mode)
(gnus-group-sort-selected-groups n 'gnus-group-sort-by-real-name reverse))
(defun gnus-group-sort-selected-groups-by-unread (&optional n reverse)
"Sort the group buffer by number of unread articles.
Obeys the process/prefix convention. If REVERSE (the symbolic prefix),
sort in reverse order."
(interactive (gnus-interactive "P\ny"))
(interactive (gnus-interactive "P\ny") gnus-group-mode)
(gnus-group-sort-selected-groups n 'gnus-group-sort-by-unread reverse))
(defun gnus-group-sort-selected-groups-by-level (&optional n reverse)
"Sort the group buffer by group level.
Obeys the process/prefix convention. If REVERSE (the symbolic prefix),
sort in reverse order."
(interactive (gnus-interactive "P\ny"))
(interactive (gnus-interactive "P\ny") gnus-group-mode)
(gnus-group-sort-selected-groups n 'gnus-group-sort-by-level reverse))
(defun gnus-group-sort-selected-groups-by-score (&optional n reverse)
"Sort the group buffer by group score.
Obeys the process/prefix convention. If REVERSE (the symbolic prefix),
sort in reverse order."
(interactive (gnus-interactive "P\ny"))
(interactive (gnus-interactive "P\ny") gnus-group-mode)
(gnus-group-sort-selected-groups n 'gnus-group-sort-by-score reverse))
(defun gnus-group-sort-selected-groups-by-rank (&optional n reverse)
"Sort the group buffer by group rank.
Obeys the process/prefix convention. If REVERSE (the symbolic prefix),
sort in reverse order."
(interactive (gnus-interactive "P\ny"))
(interactive (gnus-interactive "P\ny") gnus-group-mode)
(gnus-group-sort-selected-groups n 'gnus-group-sort-by-rank reverse))
(defun gnus-group-sort-selected-groups-by-method (&optional n reverse)
"Sort the group buffer alphabetically by back end name.
Obeys the process/prefix convention. If REVERSE (the symbolic prefix),
sort in reverse order."
(interactive (gnus-interactive "P\ny"))
(interactive (gnus-interactive "P\ny") gnus-group-mode)
(gnus-group-sort-selected-groups n 'gnus-group-sort-by-method reverse))
;;; Sorting predicates.
@ -3609,7 +3616,7 @@ sort in reverse order."
(defun gnus-group-clear-data (&optional arg)
"Clear all marks and read ranges from the current group.
Obeys the process/prefix convention."
(interactive "P")
(interactive "P" gnus-group-mode)
(when (gnus-y-or-n-p "Really clear data? ")
(gnus-group-iterate arg
(lambda (group)
@ -3621,7 +3628,7 @@ Obeys the process/prefix convention."
(defun gnus-group-clear-data-on-native-groups ()
"Clear all marks and read ranges from all native groups."
(interactive)
(interactive nil gnus-group-mode)
(when (gnus-yes-or-no-p "Really clear all data from almost all groups? ")
(let ((alist (cdr gnus-newsrc-alist))
info)
@ -3665,7 +3672,7 @@ caught up. If ALL is non-nil, marked articles will also be marked as
read. Cross references (Xref: header) of articles are ignored.
The number of newsgroups that this function was unable to catch
up is returned."
(interactive "P")
(interactive "P" gnus-group-mode)
(let ((groups (gnus-group-process-prefix n))
(ret 0)
group)
@ -3704,7 +3711,7 @@ up is returned."
(defun gnus-group-catchup-current-all (&optional n)
"Mark all articles in current newsgroup as read.
Cross references (Xref: header) of articles are ignored."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-group-catchup-current n 'all))
(declare-function gnus-sequence-of-unread-articles "gnus-sum" (group))
@ -3751,7 +3758,7 @@ or nil if no action could be taken."
(defun gnus-group-expire-articles (&optional n)
"Expire all expirable articles in the current newsgroup.
Uses the process/prefix convention."
(interactive "P")
(interactive "P" gnus-group-mode)
(let ((groups (gnus-group-process-prefix n))
group)
(unless groups
@ -3797,7 +3804,7 @@ Uses the process/prefix convention."
(defun gnus-group-expire-all-groups ()
"Expire all expirable articles in all newsgroups."
(interactive)
(interactive nil gnus-group-mode)
(save-excursion
(gnus-message 5 "Expiring...")
(let ((gnus-group-marked (mapcar (lambda (info) (gnus-info-group info))
@ -3821,7 +3828,8 @@ Uses the process/prefix convention."
(if (string-match "^\\s-*$" s)
(int-to-string (or (gnus-group-group-level)
gnus-level-default-subscribed))
s))))))
s)))))
gnus-group-mode)
(unless (and (>= level 1) (<= level gnus-level-killed))
(error "Invalid level: %d" level))
(dolist (group (gnus-group-process-prefix n))
@ -3837,18 +3845,18 @@ Uses the process/prefix convention."
(defun gnus-group-unsubscribe (&optional n)
"Unsubscribe the current group."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-group-unsubscribe-current-group n 'unsubscribe))
(defun gnus-group-subscribe (&optional n)
"Subscribe the current group."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-group-unsubscribe-current-group n 'subscribe))
(defun gnus-group-unsubscribe-current-group (&optional n do-sub)
"Toggle subscription of the current group.
If given numerical prefix, toggle the N next groups."
(interactive "P")
(interactive "P" gnus-group-mode)
(dolist (group (gnus-group-process-prefix n))
(gnus-group-remove-mark group)
(gnus-group-unsubscribe-group
@ -3871,7 +3879,8 @@ If given numerical prefix, toggle the N next groups."
Killed newsgroups are subscribed. If SILENT, don't try to update the
group line."
(interactive (list (gnus-group-completing-read
nil nil (gnus-read-active-file-p))))
nil nil (gnus-read-active-file-p)))
gnus-group-mode)
(let ((newsrc (gnus-group-entry group)))
(cond
((string-match "\\`[ \t]*\\'" group)
@ -3905,7 +3914,7 @@ group line."
"Move the current newsgroup up N places.
If given a negative prefix, move down instead. The difference between
N and the number of steps taken is returned."
(interactive "p")
(interactive "p" gnus-group-mode)
(unless (gnus-group-group-name)
(error "No group on current line"))
(gnus-group-kill-group 1)
@ -3917,7 +3926,8 @@ N and the number of steps taken is returned."
(defun gnus-group-kill-all-zombies (&optional dummy)
"Kill all zombie newsgroups.
The optional DUMMY should always be nil."
(interactive (list (not (gnus-yes-or-no-p "Really kill all zombies? "))))
(interactive (list (not (gnus-yes-or-no-p "Really kill all zombies? ")))
gnus-group-mode)
(unless dummy
(setq gnus-killed-list (nconc gnus-zombie-list gnus-killed-list))
(setq gnus-zombie-list nil)
@ -3927,7 +3937,7 @@ The optional DUMMY should always be nil."
(defun gnus-group-kill-region (begin end)
"Kill newsgroups in current region (excluding current point).
The killed newsgroups can be yanked by using \\[gnus-group-yank-group]."
(interactive "r")
(interactive "r" gnus-group-mode)
(let ((lines
;; Count lines.
(save-excursion
@ -3949,7 +3959,7 @@ However, only groups that were alive can be yanked; already killed
groups or zombie groups can't be yanked.
The return value is the name of the group that was killed, or a list
of groups killed."
(interactive "P")
(interactive "P" gnus-group-mode)
(let ((buffer-read-only nil)
(groups (gnus-group-process-prefix n))
group entry level out)
@ -4009,7 +4019,7 @@ of groups killed."
The numeric ARG specifies how many newsgroups are to be yanked. The
name of the newsgroup yanked is returned, or (if several groups are
yanked) a list of yanked groups is returned."
(interactive "p")
(interactive "p" gnus-group-mode)
(setq arg (or arg 1))
(let (info group prev out)
(while (>= (cl-decf arg) 0)
@ -4034,7 +4044,7 @@ yanked) a list of yanked groups is returned."
(defun gnus-group-kill-level (level)
"Kill all groups that is on a certain LEVEL."
(interactive "nKill all groups on level: ")
(interactive "nKill all groups on level: " gnus-group-mode)
(cond
((= level gnus-level-zombie)
(setq gnus-killed-list
@ -4065,7 +4075,7 @@ yanked) a list of yanked groups is returned."
"List all newsgroups with level ARG or lower.
Default is `gnus-level-unsubscribed', which lists all subscribed and most
unsubscribed groups."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-group-list-groups (or arg gnus-level-unsubscribed) t))
;; Redefine this to list ALL killed groups if prefix arg used.
@ -4074,7 +4084,7 @@ unsubscribed groups."
"List all killed newsgroups in the group buffer.
If ARG is non-nil, list ALL killed groups known to Gnus. This may
entail asking the server for the groups."
(interactive "P")
(interactive "P" gnus-group-mode)
;; Find all possible killed newsgroups if arg.
(when arg
(gnus-get-killed-groups))
@ -4088,7 +4098,7 @@ entail asking the server for the groups."
(defun gnus-group-list-zombies ()
"List all zombie newsgroups in the group buffer."
(interactive)
(interactive nil gnus-group-mode)
(if (not gnus-zombie-list)
(gnus-message 6 "No zombie groups")
(let (gnus-group-list-mode)
@ -4099,7 +4109,7 @@ entail asking the server for the groups."
(defun gnus-group-list-active ()
"List all groups that are available from the server(s)."
(interactive)
(interactive nil gnus-group-mode)
;; First we make sure that we have really read the active file.
(unless (gnus-read-active-file-p)
(let ((gnus-read-active-file t)
@ -4121,7 +4131,7 @@ entail asking the server for the groups."
(defun gnus-activate-all-groups (level)
"Activate absolutely all groups."
(interactive (list gnus-level-unsubscribed))
(interactive (list gnus-level-unsubscribed) gnus-group-mode)
(let ((gnus-activate-level level)
(gnus-activate-foreign-newsgroups level))
(gnus-group-get-new-news)))
@ -4133,7 +4143,7 @@ re-scanning. If ARG is non-nil and not a number, this will force
\"hard\" re-reading of the active files from all servers.
If ONE-LEVEL is not nil, then re-scan only the specified level,
otherwise all levels below ARG will be scanned too."
(interactive "P")
(interactive "P" gnus-group-mode)
(require 'nnmail)
(let ((gnus-inhibit-demon t)
;; Binding this variable will inhibit multiple fetchings
@ -4163,7 +4173,7 @@ otherwise all levels below ARG will be scanned too."
The difference between N and the number of newsgroup checked is returned.
If N is negative, this group and the N-1 previous groups will be checked.
If DONT-SCAN is non-nil, scan non-activated groups as well."
(interactive "P")
(interactive "P" gnus-group-mode)
(let* ((groups (gnus-group-process-prefix n))
(ret (if (numberp n) (- n (length groups)) 0))
(beg (unless n
@ -4208,7 +4218,8 @@ If DONT-SCAN is non-nil, scan non-activated groups as well."
(defun gnus-group-describe-group (force &optional group)
"Display a description of the current newsgroup."
(interactive (list current-prefix-arg (gnus-group-group-name)))
(interactive (list current-prefix-arg (gnus-group-group-name))
gnus-group-mode)
(let* ((method (gnus-find-method-for-group group))
(mname (gnus-group-prefixed-name "" method))
desc)
@ -4230,7 +4241,7 @@ If DONT-SCAN is non-nil, scan non-activated groups as well."
;; Suggested by Per Abrahamsen <amanda@iesd.auc.dk>.
(defun gnus-group-describe-all-groups (&optional force)
"Pop up a buffer with descriptions of all newsgroups."
(interactive "P")
(interactive "P" gnus-group-mode)
(when force
(setq gnus-description-hashtb nil))
(when (not (or gnus-description-hashtb
@ -4255,7 +4266,7 @@ If DONT-SCAN is non-nil, scan non-activated groups as well."
;; Suggested by Daniel Quinlan <quinlan@best.com>.
(defun gnus-group-apropos (regexp &optional search-description)
"List all newsgroups that have names that match a regexp."
(interactive "sGnus apropos (regexp): ")
(interactive "sGnus apropos (regexp): " gnus-group-mode)
(let ((prev "")
(obuf (current-buffer))
groups des)
@ -4294,7 +4305,7 @@ If DONT-SCAN is non-nil, scan non-activated groups as well."
(defun gnus-group-description-apropos (regexp)
"List all newsgroups that have names or descriptions that match REGEXP."
(interactive "sGnus description apropos (regexp): ")
(interactive "sGnus description apropos (regexp): " gnus-group-mode)
(when (not (or gnus-description-hashtb
(gnus-read-all-descriptions-files)))
(error "Couldn't request descriptions file"))
@ -4309,7 +4320,7 @@ If ALL, also list groups with no unread articles.
If LOWEST, don't list groups with level lower than LOWEST.
This command may read the active file."
(interactive "P\nsList newsgroups matching: ")
(interactive "P\nsList newsgroups matching: " gnus-group-mode)
;; First make sure active file has been read.
(when (and level
(> (prefix-numeric-value level) gnus-level-killed))
@ -4324,7 +4335,7 @@ This command may read the active file."
If the prefix LEVEL is non-nil, it should be a number that says which
level to cut off listing groups.
If LOWEST, don't list groups with level lower than LOWEST."
(interactive "P\nsList newsgroups matching: ")
(interactive "P\nsList newsgroups matching: " gnus-group-mode)
(when level
(setq level (prefix-numeric-value level)))
(gnus-group-list-matching (or level gnus-level-killed) regexp t lowest))
@ -4333,12 +4344,12 @@ If LOWEST, don't list groups with level lower than LOWEST."
(defun gnus-group-save-newsrc (&optional force)
"Save the Gnus startup files.
If FORCE, force saving whether it is necessary or not."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-save-newsrc-file force))
(defun gnus-group-restart (&optional _arg)
"Force Gnus to read the .newsrc file."
(interactive)
(interactive nil gnus-group-mode)
(when (gnus-yes-or-no-p
(format "Are you sure you want to restart Gnus? "))
(gnus-save-newsrc-file)
@ -4347,7 +4358,7 @@ If FORCE, force saving whether it is necessary or not."
(defun gnus-group-read-init-file ()
"Read the Gnus elisp init file."
(interactive)
(interactive nil gnus-group-mode)
(gnus-read-init-file)
(gnus-message 5 "Read %s" gnus-init-file))
@ -4355,7 +4366,7 @@ If FORCE, force saving whether it is necessary or not."
"Check bogus newsgroups.
If given a prefix, don't ask for confirmation before removing a bogus
group."
(interactive "P")
(interactive "P" gnus-group-mode)
(gnus-check-bogus-newsgroups (and (not silent) (not gnus-expert-user)))
(gnus-group-list-groups))
@ -4366,7 +4377,7 @@ With 1 C-u, use the `ask-server' method to query the server for new
groups.
With 2 C-u's, use most complete method possible to query the server
for new groups, and subscribe the new groups as zombies."
(interactive "p")
(interactive "p" gnus-group-mode)
(let ((new-groups (gnus-find-new-newsgroups (or arg 1)))
current-group)
(gnus-group-list-groups)
@ -4379,7 +4390,7 @@ for new groups, and subscribe the new groups as zombies."
(defun gnus-group-edit-global-kill (&optional article group)
"Edit the global kill file.
If GROUP, edit that local kill file instead."
(interactive "P")
(interactive "P" gnus-group-mode)
(setq gnus-current-kill-article article)
(gnus-kill-file-edit-file group)
(gnus-message 6 "Editing a %s kill file (Type %s to exit)"
@ -4388,12 +4399,12 @@ If GROUP, edit that local kill file instead."
(defun gnus-group-edit-local-kill (article group)
"Edit a local kill file."
(interactive (list nil (gnus-group-group-name)))
(interactive (list nil (gnus-group-group-name)) gnus-group-mode)
(gnus-group-edit-global-kill article group))
(defun gnus-group-force-update ()
"Update `.newsrc' file."
(interactive)
(interactive nil gnus-group-mode)
(gnus-save-newsrc-file))
(defvar gnus-backlog-articles)
@ -4402,7 +4413,7 @@ If GROUP, edit that local kill file instead."
"Suspend the current Gnus session.
In fact, cleanup buffers except for group mode buffer.
The hook `gnus-suspend-gnus-hook' is called before actually suspending."
(interactive)
(interactive nil gnus-group-mode)
(gnus-run-hooks 'gnus-suspend-gnus-hook)
(gnus-offer-save-summaries)
;; Kill Gnus buffers except for group mode buffer.
@ -4425,14 +4436,14 @@ The hook `gnus-suspend-gnus-hook' is called before actually suspending."
(defun gnus-group-clear-dribble ()
"Clear all information from the dribble buffer."
(interactive)
(interactive nil gnus-group-mode)
(gnus-dribble-clear)
(gnus-message 7 "Cleared dribble buffer"))
(defun gnus-group-exit ()
"Quit reading news after updating .newsrc.eld and .newsrc.
The hook `gnus-exit-gnus-hook' is called before actually exiting."
(interactive)
(interactive nil gnus-group-mode)
(when
(or noninteractive ;For gnus-batch-kill
(not gnus-interactive-exit) ;Without confirmation
@ -4466,7 +4477,7 @@ The hook `gnus-exit-gnus-hook' is called before actually exiting."
(defun gnus-group-quit ()
"Quit reading news without updating .newsrc.eld or .newsrc.
The hook `gnus-exit-gnus-hook' is called before actually exiting."
(interactive)
(interactive nil gnus-group-mode)
(when (or noninteractive ;For gnus-batch-kill
(zerop (buffer-size))
(not (gnus-server-opened gnus-select-method))
@ -4491,7 +4502,7 @@ The hook `gnus-exit-gnus-hook' is called before actually exiting."
(defun gnus-group-describe-briefly ()
"Give a one line description of the group mode commands."
(interactive)
(interactive nil gnus-group-mode)
(gnus-message 7 "%s" (substitute-command-keys "\\<gnus-group-mode-map>\\[gnus-group-read-group]:Select \\[gnus-group-next-unread-group]:Forward \\[gnus-group-prev-unread-group]:Backward \\[gnus-group-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-group-describe-briefly]:This help")))
(defun gnus-group-browse-foreign-server (method)
@ -4504,7 +4515,7 @@ and the second element is the address."
(list (let ((how (gnus-completing-read
"Which back end"
(mapcar #'car (append gnus-valid-select-methods
gnus-server-alist))
gnus-server-alist))
t (cons "nntp" 0) 'gnus-method-history)))
;; We either got a back end name or a virtual server name.
;; If the first, we also need an address.
@ -4520,7 +4531,8 @@ and the second element is the address."
gnus-secondary-servers
(cdr gnus-select-method))))
;; We got a server name.
how))))
how)))
gnus-group-mode)
(gnus-browse-foreign-server method))
(defun gnus-group-set-info (info &optional method-only-group part)
@ -4678,7 +4690,7 @@ level to cut off listing groups.
If LOWEST, don't list groups with level lower than LOWEST.
This command may read the active file."
(interactive "P")
(interactive "P" gnus-group-mode)
(when level
(setq level (prefix-numeric-value level)))
(when (or (not level) (>= level gnus-level-zombie))
@ -4709,7 +4721,7 @@ level to cut off listing groups.
If LOWEST, don't list groups with level lower than LOWEST.
This command may read the active file."
(interactive "P")
(interactive "P" gnus-group-mode)
(when level
(setq level (prefix-numeric-value level)))
(when (or (not level) (>= level gnus-level-zombie))
@ -4731,7 +4743,7 @@ level to cut off listing groups.
If LOWEST, don't list groups with level lower than LOWEST.
This command may read the active file."
(interactive "P")
(interactive "P" gnus-group-mode)
(when level
(setq level (prefix-numeric-value level)))
(when (or (not level) (>= level gnus-level-zombie))
@ -4759,7 +4771,7 @@ This command may read the active file."
(defun gnus-group-list-plus (&optional _args)
"List groups plus the current selection."
(interactive)
(interactive nil gnus-group-mode)
(let ((gnus-group-listed-groups (gnus-group-listed-groups))
(gnus-group-list-mode gnus-group-list-mode) ;; Save it.
func)
@ -4775,7 +4787,7 @@ This command may read the active file."
(defun gnus-group-list-flush (&optional args)
"Flush groups from the current selection."
(interactive "P")
(interactive "P" gnus-group-mode)
(let ((gnus-group-list-option 'flush))
(gnus-group-list-plus args)))
@ -4786,7 +4798,7 @@ with this command. If you've first limited to groups with
dormant articles with `A ?', you can then further limit with
`A / c', which will then limit to groups with cached articles, giving
you the groups that have both dormant articles and cached articles."
(interactive "P")
(interactive "P" gnus-group-mode)
(let ((gnus-group-list-option 'limit))
(gnus-group-list-plus args)))
@ -4839,7 +4851,7 @@ operation is only meaningful for back ends using one file per article
\(e.g. nnml).
Note: currently only implemented in nnml."
(interactive (list (gnus-group-group-name)))
(interactive (list (gnus-group-group-name)) gnus-group-mode)
(unless group
(error "No group to compact"))
(unless (gnus-check-backend-function 'request-compact-group group)

View file

@ -970,7 +970,7 @@ These will be used to retrieve the RSVP information from ical events."
(defun gnus-icalendar-save-event ()
"Save the Calendar event in the text/calendar part under point."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-article-check-buffer)
(let ((data (get-text-property (point) 'gnus-data)))
(when data
@ -978,28 +978,28 @@ These will be used to retrieve the RSVP information from ical events."
(defun gnus-icalendar-reply-accept ()
"Accept invitation in the current article."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(with-current-buffer gnus-article-buffer
(gnus-icalendar-reply (list gnus-icalendar-handle 'accepted gnus-icalendar-event))
(setq-local gnus-icalendar-reply-status 'accepted)))
(defun gnus-icalendar-reply-tentative ()
"Send tentative response to invitation in the current article."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(with-current-buffer gnus-article-buffer
(gnus-icalendar-reply (list gnus-icalendar-handle 'tentative gnus-icalendar-event))
(setq-local gnus-icalendar-reply-status 'tentative)))
(defun gnus-icalendar-reply-decline ()
"Decline invitation in the current article."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(with-current-buffer gnus-article-buffer
(gnus-icalendar-reply (list gnus-icalendar-handle 'declined gnus-icalendar-event))
(setq-local gnus-icalendar-reply-status 'declined)))
(defun gnus-icalendar-event-export ()
"Export calendar event to `org-mode', or update existing agenda entry."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(with-current-buffer gnus-article-buffer
(gnus-icalendar-sync-event-to-org gnus-icalendar-event))
;; refresh article buffer in case the reply had been sent before initial org
@ -1009,14 +1009,14 @@ These will be used to retrieve the RSVP information from ical events."
(defun gnus-icalendar-event-show ()
"Display `org-mode' agenda entry related to the calendar event."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-icalendar--show-org-event
(with-current-buffer gnus-article-buffer
gnus-icalendar-event)))
(defun gnus-icalendar-event-check-agenda ()
"Display `org-mode' agenda for days between event start and end dates."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-icalendar-show-org-agenda
(with-current-buffer gnus-article-buffer gnus-icalendar-event)))

View file

@ -662,7 +662,7 @@ This is the string that Gnus uses to identify the group."
"Look up the current article in the group where it originated.
This command only makes sense for groups shows articles gathered
from other groups -- for instance, search results and the like."
(interactive)
(interactive nil gnus-summary-mode)
(let ((gnus-command-method
(gnus-find-method-for-group gnus-newsgroup-name)))
(or

View file

@ -53,7 +53,7 @@ If N is a positive number, save the N next articles.
If N is a negative number, save the N previous articles.
If N is nil and any articles have been marked with the process mark,
save those articles instead."
(interactive "P")
(interactive "P" gnus-summary-mode)
(require 'gnus-art)
(let ((gnus-default-article-saver 'gnus-summary-save-in-folder))
(gnus-summary-save-article arg)))

View file

@ -653,7 +653,7 @@ network. The corresponding back end must have a `request-post' method."
If ARG, post to group under point. If ARG is 1, prompt for group name.
Depending on the selected group, the message might be either a mail or
a news."
(interactive "P")
(interactive "P" gnus-group-mode)
;; Bind this variable here to make message mode hooks work ok.
(let ((gnus-newsgroup-name
(if arg
@ -672,7 +672,7 @@ a news."
Use the posting of the current group by default.
If ARG, don't do that. If ARG is 1, prompt for group name to find the
posting style."
(interactive "P")
(interactive "P" gnus-summary-mode)
(let* (;;(group gnus-newsgroup-name)
;; make sure last viewed article doesn't affect posting styles:
(gnus-article-copy)
@ -695,7 +695,7 @@ If ARG, don't do that. If ARG is 1, prompt for group name to post to.
This function prepares a news even when using mail groups. This is useful
for posting messages to mail groups without actually sending them over the
network. The corresponding back end must have a `request-post' method."
(interactive "P")
(interactive "P" gnus-summary-mode)
(let* (;;(group gnus-newsgroup-name)
;; make sure last viewed article doesn't affect posting styles:
(gnus-article-copy)
@ -722,7 +722,7 @@ network. The corresponding back end must have a `request-post' method."
If ARG, don't do that. If ARG is 1, prompt for a group name to post to.
Depending on the selected group, the message might be either a mail or
a news."
(interactive "P")
(interactive "P" gnus-summary-mode)
;; Bind this variable here to make message mode hooks work ok.
(let ((gnus-newsgroup-name
(if arg
@ -742,9 +742,9 @@ If prefix argument YANK is non-nil, the original article is yanked
automatically.
YANK is a list of elements, where the car of each element is the
article number, and the cdr is the string to be yanked."
(interactive
(list (and current-prefix-arg
(gnus-summary-work-articles 1))))
(interactive (list (and current-prefix-arg
(gnus-summary-work-articles 1)))
gnus-summary-mode)
(when yank
(gnus-summary-goto-subject
(if (listp (car yank))
@ -764,19 +764,19 @@ article number, and the cdr is the string to be yanked."
"Compose a followup to an article and include the original article.
The text in the region will be yanked. If the region isn't
active, the entire article will be yanked."
(interactive "P")
(interactive "P" gnus-summary-mode)
(gnus-summary-followup (gnus-summary-work-articles n) force-news))
(defun gnus-summary-followup-to-mail (&optional arg)
"Followup to the current mail message via news."
(interactive
(list (and current-prefix-arg
(gnus-summary-work-articles 1))))
(interactive (list (and current-prefix-arg
(gnus-summary-work-articles 1)))
gnus-summary-mode)
(gnus-summary-followup arg t))
(defun gnus-summary-followup-to-mail-with-original (&optional arg)
"Followup to the current mail message via news."
(interactive "P")
(interactive "P" gnus-summary-mode)
(gnus-summary-followup (gnus-summary-work-articles arg) t))
(defun gnus-inews-yank-articles (articles)
@ -811,7 +811,7 @@ active, the entire article will be yanked."
Uses the process-prefix convention. If given the symbolic
prefix `a', cancel using the standard posting method; if not
post using the current select method."
(interactive (gnus-interactive "P\ny"))
(interactive (gnus-interactive "P\ny") gnus-summary-mode)
(let ((message-post-method
(let ((gn gnus-newsgroup-name))
(lambda (_arg) (gnus-post-method (eq symp 'a) gn))))
@ -841,7 +841,7 @@ post using the current select method."
"Compose an article that will supersede a previous article.
This is done simply by taking the old article and adding a Supersedes
header line with the old Message-ID."
(interactive)
(interactive nil gnus-summary-mode)
(let ((article (gnus-summary-article-number))
(mail-parse-charset gnus-newsgroup-charset))
(gnus-setup-message 'reply-yank
@ -1080,7 +1080,6 @@ If SILENT, don't prompt the user."
(defun gnus-extended-version ()
"Stringified Gnus version and Emacs version.
See the variable `gnus-user-agent'."
(interactive)
(if (stringp gnus-user-agent)
gnus-user-agent
;; `gnus-user-agent' is a list:
@ -1109,9 +1108,9 @@ If prefix argument YANK is non-nil, the original article is yanked
automatically.
If WIDE, make a wide reply.
If VERY-WIDE, make a very wide reply."
(interactive
(list (and current-prefix-arg
(gnus-summary-work-articles 1))))
(interactive (list (and current-prefix-arg
(gnus-summary-work-articles 1)))
gnus-summary-mode)
;; Allow user to require confirmation before replying by mail to the
;; author of a news article (or mail message).
(when (or (not (or (gnus-news-group-p gnus-newsgroup-name)
@ -1179,14 +1178,14 @@ If VERY-WIDE, make a very wide reply."
(defun gnus-summary-reply-with-original (n &optional wide)
"Start composing a reply mail to the current message.
The original article will be yanked."
(interactive "P")
(interactive "P" gnus-summary-mode)
(gnus-summary-reply (gnus-summary-work-articles n) wide))
(defun gnus-summary-reply-to-list-with-original (n &optional wide)
"Start composing a reply mail to the current message.
The reply goes only to the mailing list.
The original article will be yanked."
(interactive "P")
(interactive "P" gnus-summary-mode)
(let ((message-reply-to-function
(lambda nil
`((To . ,(gnus-mailing-list-followup-to))))))
@ -1198,32 +1197,32 @@ If prefix argument YANK is non-nil, the original article is yanked
automatically.
If WIDE, make a wide reply.
If VERY-WIDE, make a very wide reply."
(interactive
(list (and current-prefix-arg
(gnus-summary-work-articles 1))))
(interactive (list (and current-prefix-arg
(gnus-summary-work-articles 1)))
gnus-summary-mode)
(let ((gnus-msg-force-broken-reply-to t))
(gnus-summary-reply yank wide very-wide)))
(defun gnus-summary-reply-broken-reply-to-with-original (n &optional wide)
"Like `gnus-summary-reply-with-original' except removing reply-to field.
The original article will be yanked."
(interactive "P")
(interactive "P" gnus-summary-mode)
(gnus-summary-reply-broken-reply-to (gnus-summary-work-articles n) wide))
(defun gnus-summary-wide-reply (&optional yank)
"Start composing a wide reply mail to the current message.
If prefix argument YANK is non-nil, the original article is yanked
automatically."
(interactive
(list (and current-prefix-arg
(gnus-summary-work-articles 1))))
(interactive (list (and current-prefix-arg
(gnus-summary-work-articles 1)))
gnus-summary-mode)
(gnus-summary-reply yank t))
(defun gnus-summary-wide-reply-with-original (n)
"Start composing a wide reply mail to the current message.
The original article(s) will be yanked.
Uses the process/prefix convention."
(interactive "P")
(interactive "P" gnus-summary-mode)
(gnus-summary-reply-with-original n t))
(defun gnus-summary-very-wide-reply (&optional yank)
@ -1236,9 +1235,9 @@ messages as the To/Cc headers.
If prefix argument YANK is non-nil, the original article(s) will
be yanked automatically."
(interactive
(list (and current-prefix-arg
(gnus-summary-work-articles 1))))
(interactive (list (and current-prefix-arg
(gnus-summary-work-articles 1)))
gnus-summary-mode)
(gnus-summary-reply yank t (gnus-summary-work-articles yank)))
(defun gnus-summary-very-wide-reply-with-original (n)
@ -1250,7 +1249,7 @@ The reply will include all From/Cc headers from the original
messages as the To/Cc headers.
The original article(s) will be yanked."
(interactive "P")
(interactive "P" gnus-summary-mode)
(gnus-summary-reply
(gnus-summary-work-articles n) t (gnus-summary-work-articles n)))
@ -1266,7 +1265,7 @@ otherwise, use flipped `message-forward-as-mime'.
If POST, post instead of mail.
For the \"inline\" alternatives, also see the variable
`message-forward-ignored-headers'."
(interactive "P")
(interactive "P" gnus-summary-mode)
(if (cdr (gnus-summary-work-articles nil))
;; Process marks are given.
(gnus-uu-digest-mail-forward nil post)
@ -1355,7 +1354,8 @@ the message before resending."
;; initial-contents.
(with-current-buffer gnus-original-article-buffer
(nnmail-fetch-field "to"))))
current-prefix-arg))
current-prefix-arg)
gnus-summary-mode)
(let ((message-header-setup-hook (copy-sequence message-header-setup-hook))
(message-sent-hook (copy-sequence message-sent-hook))
;; Honor posting-style for `name' and `address' in Resent-From header.
@ -1408,7 +1408,7 @@ the message before resending."
A new buffer will be created to allow the user to modify body and
contents of the message, and then, everything will happen as when
composing a new message."
(interactive)
(interactive nil gnus-summary-mode)
(let ((mail-parse-charset gnus-newsgroup-charset))
(gnus-setup-message 'reply-yank
(gnus-summary-select-article t)
@ -1436,12 +1436,12 @@ composing a new message."
(defun gnus-summary-post-forward (&optional arg)
"Forward the current article to a newsgroup.
See `gnus-summary-mail-forward' for ARG."
(interactive "P")
(interactive "P" gnus-summary-mode)
(gnus-summary-mail-forward arg t))
(defun gnus-summary-mail-crosspost-complaint (n)
"Send a complaint about crossposting to the current article(s)."
(interactive "P")
(interactive "P" gnus-summary-mode)
(dolist (article (gnus-summary-work-articles n))
(set-buffer gnus-summary-buffer)
(gnus-summary-goto-subject article)
@ -1509,9 +1509,9 @@ Already submitted bugs can be found in the Emacs bug tracker:
(defun gnus-summary-yank-message (buffer n)
"Yank the current article into a composed message."
(interactive
(list (gnus-completing-read "Buffer" (message-buffers) t)
current-prefix-arg))
(interactive (list (gnus-completing-read "Buffer" (message-buffers) t)
current-prefix-arg)
gnus-summary-mode)
(gnus-summary-iterate n
(let ((gnus-inhibit-treatment t))
(gnus-summary-select-article))
@ -1528,7 +1528,7 @@ contains some mail you have written which has been bounced back to
you.
If FETCH, try to fetch the article that this is a reply to, if indeed
this is a reply."
(interactive "P")
(interactive "P" gnus-summary-mode)
(gnus-summary-select-article t)
(let (summary-buffer parent)
(if fetch
@ -1571,7 +1571,6 @@ this is a reply."
;; Do Gcc handling, which copied the message over to some group.
(defun gnus-inews-do-gcc (&optional gcc)
(interactive)
(save-excursion
(save-restriction
(message-narrow-to-headers)
@ -1964,7 +1963,7 @@ created.
This command uses the process/prefix convention, so if you
process-mark several articles, they will all be attached."
(interactive "P")
(interactive "P" gnus-summary-mode)
(let ((buffers (message-buffers))
destination)
;; Set up the destination mail composition buffer.

View file

@ -244,7 +244,7 @@ replacement is added."
(gnus-picon-insert-glyph (pop spec) category))))))))))
(defun gnus-picon-transform-newsgroups (header)
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-with-article-headers
(gnus-article-goto-header header)
(mail-header-narrow-to-field)
@ -283,7 +283,7 @@ replacement is added."
(defun gnus-treat-from-picon ()
"Display picons in the From header.
If picons are already displayed, remove them."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(let ((wash-picon-p buffer-read-only))
(gnus-with-article-buffer
(if (and wash-picon-p (memq 'from-picon gnus-article-wash-types))
@ -294,7 +294,7 @@ If picons are already displayed, remove them."
(defun gnus-treat-mail-picon ()
"Display picons in the Cc and To headers.
If picons are already displayed, remove them."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(let ((wash-picon-p buffer-read-only))
(gnus-with-article-buffer
(if (and wash-picon-p (memq 'mail-picon gnus-article-wash-types))
@ -306,7 +306,7 @@ If picons are already displayed, remove them."
(defun gnus-treat-newsgroups-picon ()
"Display picons in the Newsgroups and Followup-To headers.
If picons are already displayed, remove them."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(let ((wash-picon-p buffer-read-only))
(gnus-with-article-buffer
(if (and wash-picon-p (memq 'newsgroups-picon gnus-article-wash-types))

View file

@ -813,7 +813,7 @@ Consults `gnus-registry-ignored-groups' and
(defun gnus-registry-wash-for-keywords (&optional force)
"Get the keywords of the current article.
Overrides existing keywords with FORCE set non-nil."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(let ((id (gnus-registry-fetch-message-id-fast gnus-current-article))
word words)
(if (or (not (gnus-registry-get-id-key id 'keyword))
@ -1039,13 +1039,15 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
(defun gnus-registry-set-article-mark (&rest articles)
"Apply a mark to process-marked ARTICLES."
(interactive (gnus-summary-work-articles current-prefix-arg))
(interactive (gnus-summary-work-articles current-prefix-arg)
gnus-article-mode gnus-summary-mode)
(gnus-registry-set-article-mark-internal (gnus-registry-read-mark)
articles nil t))
(defun gnus-registry-remove-article-mark (&rest articles)
"Remove a mark from process-marked ARTICLES."
(interactive (gnus-summary-work-articles current-prefix-arg))
(interactive (gnus-summary-work-articles current-prefix-arg)
gnus-article-mode gnus-summary-mode)
(gnus-registry-set-article-mark-internal (gnus-registry-read-mark)
articles t t))
@ -1069,7 +1071,8 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
"Get the Gnus registry marks for ARTICLES and show them if interactive.
Uses process/prefix conventions. For multiple articles,
only the last one's marks are returned."
(interactive (gnus-summary-work-articles 1))
(interactive (gnus-summary-work-articles 1)
gnus-article-mode gnus-summary-mode)
(let* ((article (last articles))
(id (gnus-registry-fetch-message-id-fast article))
(marks (when id (gnus-registry-get-id-key id 'mark))))

View file

@ -137,6 +137,8 @@ It accepts the same format specs that `gnus-summary-line-format' does."
"Start reading the picked articles.
If given a prefix, mark all unpicked articles as read."
(interactive "P")
(declare (completion (lambda (s b)
(completion-minor-mode-active-p s b 'gnus-pick-mode))))
(if gnus-newsgroup-processable
(progn
(gnus-summary-limit-to-articles nil)
@ -462,7 +464,7 @@ Two predefined functions are available:
(defun gnus-tree-read-summary-keys (&optional arg)
"Read a summary buffer key sequence and execute it."
(interactive "P")
(interactive "P" gnus-tree-mode)
(unless gnus-tree-inhibit
(let ((buf (current-buffer))
(gnus-tree-inhibit t)
@ -477,7 +479,7 @@ Two predefined functions are available:
(defun gnus-tree-show-summary ()
"Reconfigure windows to show summary buffer."
(interactive)
(interactive nil gnus-tree-mode)
(if (not (gnus-buffer-live-p gnus-summary-buffer))
(error "There is no summary buffer for this tree buffer")
(gnus-configure-windows 'article)
@ -485,7 +487,7 @@ Two predefined functions are available:
(defun gnus-tree-select-article (article)
"Select the article under point, if any."
(interactive (list (gnus-tree-article-number)))
(interactive (list (gnus-tree-article-number)) gnus-tree-mode)
(let ((buf (current-buffer)))
(when article
(with-current-buffer gnus-summary-buffer
@ -494,7 +496,7 @@ Two predefined functions are available:
(defun gnus-tree-pick-article (e)
"Select the article under the mouse pointer."
(interactive "e")
(interactive "e" gnus-tree-mode)
(mouse-set-point e)
(gnus-tree-select-article (gnus-tree-article-number)))

View file

@ -528,7 +528,8 @@ permanence, and the string to be used. The numerical prefix will
be used as SCORE. A symbolic prefix of `a' (the SYMP parameter)
says to use the `all.SCORE' file for the command instead of the
current score file."
(interactive (gnus-interactive "P\ny"))
(interactive (gnus-interactive "P\ny")
gnus-article-mode gnus-summary-mode)
(gnus-summary-increase-score (- (gnus-score-delta-default score)) symp))
(defun gnus-score-kill-help-buffer ()
@ -544,7 +545,8 @@ permanence, and the string to be used. The numerical prefix will
be used as SCORE. A symbolic prefix of `a' (the SYMP parameter)
says to use the `all.SCORE' file for the command instead of the
current score file."
(interactive (gnus-interactive "P\ny"))
(interactive (gnus-interactive "P\ny")
gnus-article-mode gnus-summary-mode)
(let* ((nscore (gnus-score-delta-default score))
(prefix (if (< nscore 0) ?L ?I))
(increase (> nscore 0))
@ -931,15 +933,16 @@ TYPE is the score type.
SCORE is the score to add.
EXTRA is the possible non-standard header."
(interactive (list (gnus-completing-read "Header"
(mapcar
(mapcar
#'car
(seq-filter
(lambda (x) (fboundp (nth 2 x)))
gnus-header-index))
t)
t)
(read-string "Match: ")
(if (y-or-n-p "Use regexp match? ") 'r 's)
(string-to-number (read-string "Score: "))))
(string-to-number (read-string "Score: ")))
gnus-article-mode gnus-summary-mode)
(save-excursion
(unless (and (stringp match) (> (length match) 0))
(error "No match"))
@ -974,7 +977,8 @@ EXTRA is the possible non-standard header."
"Automatically mark articles with score below SCORE as read."
(interactive
(list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg))
(string-to-number (read-string "Mark below: ")))))
(string-to-number (read-string "Mark below: "))))
gnus-article-mode gnus-summary-mode)
(setq score (or score gnus-summary-default-score 0))
(gnus-score-set 'mark (list score))
(gnus-score-set 'touched '(t))
@ -1008,14 +1012,15 @@ EXTRA is the possible non-standard header."
"Automatically expunge articles with score below SCORE."
(interactive
(list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg))
(string-to-number (read-string "Set expunge below: ")))))
(string-to-number (read-string "Set expunge below: "))))
gnus-article-mode gnus-summary-mode)
(setq score (or score gnus-summary-default-score 0))
(gnus-score-set 'expunge (list score))
(gnus-score-set 'touched '(t)))
(defun gnus-score-followup-article (&optional score)
"Add SCORE to all followups to the article in the current buffer."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(setq score (gnus-score-delta-default score))
(when (gnus-buffer-live-p gnus-summary-buffer)
(save-excursion
@ -1030,7 +1035,7 @@ EXTRA is the possible non-standard header."
(defun gnus-score-followup-thread (&optional score)
"Add SCORE to all later articles in the thread the current buffer is part of."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(setq score (gnus-score-delta-default score))
(when (gnus-buffer-live-p gnus-summary-buffer)
(save-excursion
@ -1064,13 +1069,13 @@ EXTRA is the possible non-standard header."
(defun gnus-summary-raise-score (n)
"Raise the score of the current article by N."
(interactive "p")
(interactive "p" gnus-article-mode gnus-summary-mode)
(gnus-summary-set-score (+ (gnus-summary-article-score)
(or n gnus-score-interactive-default-score ))))
(defun gnus-summary-set-score (n)
"Set the score of the current article to N."
(interactive "p")
(interactive "p" gnus-article-mode gnus-summary-mode)
(save-excursion
(gnus-summary-show-thread)
(let ((buffer-read-only nil))
@ -1089,7 +1094,7 @@ EXTRA is the possible non-standard header."
(defun gnus-summary-current-score (arg)
"Return the score of the current article.
With prefix ARG, return the total score of the current (sub)thread."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(message "%s" (if arg
(gnus-thread-total-score
(gnus-id-to-thread
@ -1099,14 +1104,16 @@ EXTRA is the possible non-standard header."
(defun gnus-score-change-score-file (file)
"Change current score alist."
(interactive
(list (read-file-name "Change to score file: " gnus-kill-files-directory)))
(list (read-file-name "Change to score file: " gnus-kill-files-directory))
gnus-article-mode gnus-summary-mode)
(gnus-score-load-file file)
(gnus-set-mode-line 'summary))
(defvar gnus-score-edit-exit-function)
(defun gnus-score-edit-current-scores (file)
"Edit the current score alist."
(interactive (list gnus-current-score-file))
(interactive (list gnus-current-score-file)
gnus-article-mode gnus-summary-mode)
(if (not gnus-current-score-file)
(error "No current score file")
(let ((winconf (current-window-configuration)))
@ -2496,7 +2503,7 @@ score in `gnus-newsgroup-scored' by SCORE."
(defun gnus-score-find-trace ()
"Find all score rules that applies to the current article."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(let ((old-scored gnus-newsgroup-scored))
(let ((gnus-newsgroup-headers
(list (gnus-summary-article-header)))
@ -2611,7 +2618,7 @@ the score file and its full name, including the directory.")
(defun gnus-summary-rescore ()
"Redo the entire scoring process in the current summary."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-score-save)
(setq gnus-score-cache nil)
(setq gnus-newsgroup-scored nil)
@ -2642,7 +2649,7 @@ the score file and its full name, including the directory.")
(defun gnus-summary-raise-same-subject-and-select (score)
"Raise articles which has the same subject with SCORE and select the next."
(interactive "p")
(interactive "p" gnus-article-mode gnus-summary-mode)
(let ((subject (gnus-summary-article-subject)))
(gnus-summary-raise-score score)
(while (gnus-summary-find-subject subject)
@ -2651,7 +2658,7 @@ the score file and its full name, including the directory.")
(defun gnus-summary-raise-same-subject (score)
"Raise articles which has the same subject with SCORE."
(interactive "p")
(interactive "p" gnus-article-mode gnus-summary-mode)
(let ((subject (gnus-summary-article-subject)))
(gnus-summary-raise-score score)
(while (gnus-summary-find-subject subject)
@ -2664,7 +2671,7 @@ the score file and its full name, including the directory.")
(defun gnus-summary-raise-thread (&optional score)
"Raise the score of the articles in the current thread with SCORE."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(setq score (gnus-score-delta-default score))
(let (e)
(save-excursion
@ -2683,17 +2690,17 @@ the score file and its full name, including the directory.")
(defun gnus-summary-lower-same-subject-and-select (score)
"Raise articles which has the same subject with SCORE and select the next."
(interactive "p")
(interactive "p" gnus-article-mode gnus-summary-mode)
(gnus-summary-raise-same-subject-and-select (- score)))
(defun gnus-summary-lower-same-subject (score)
"Raise articles which has the same subject with SCORE."
(interactive "p")
(interactive "p" gnus-article-mode gnus-summary-mode)
(gnus-summary-raise-same-subject (- score)))
(defun gnus-summary-lower-thread (&optional score)
"Lower score of articles in the current thread with SCORE."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(gnus-summary-raise-thread (- (gnus-score-delta-default score))))
;;; Finding score files.

View file

@ -113,7 +113,7 @@ Return nil if no rule could be guessed."
;;;###autoload
(defun gnus-sieve-article-add-rule ()
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-summary-select-article nil 'force)
(with-current-buffer gnus-original-article-buffer
(let ((rule (gnus-sieve-guess-rule-for-article))

View file

@ -409,7 +409,7 @@ The following commands are available:
(defun gnus-server-kill-server (server)
"Kill the server on the current line."
(interactive (list (gnus-server-server-name)))
(interactive (list (gnus-server-server-name)) gnus-server-mode)
(unless (gnus-server-goto-server server)
(if server (error "No such server: %s" server)
(error "No server on the current line")))
@ -438,7 +438,7 @@ The following commands are available:
(defun gnus-server-yank-server ()
"Yank the previously killed server."
(interactive)
(interactive nil gnus-server-mode)
(unless gnus-server-killed-servers
(error "No killed servers to be yanked"))
(let ((alist gnus-server-alist)
@ -460,14 +460,14 @@ The following commands are available:
(defun gnus-server-exit ()
"Return to the group buffer."
(interactive)
(interactive nil gnus-server-mode)
(gnus-run-hooks 'gnus-server-exit-hook)
(gnus-kill-buffer (current-buffer))
(gnus-configure-windows 'group t))
(defun gnus-server-list-servers ()
"List all available servers."
(interactive)
(interactive nil gnus-server-mode)
(let ((cur (gnus-server-server-name)))
(gnus-server-prepare)
(if cur (gnus-server-goto-server cur)
@ -489,7 +489,7 @@ The following commands are available:
(defun gnus-server-open-server (server)
"Force an open of SERVER."
(interactive (list (gnus-server-server-name)))
(interactive (list (gnus-server-server-name)) gnus-server-mode)
(let ((method (gnus-server-to-method server)))
(unless method
(error "No such server: %s" server))
@ -501,13 +501,13 @@ The following commands are available:
(defun gnus-server-open-all-servers ()
"Open all servers."
(interactive)
(interactive nil gnus-server-mode)
(dolist (server gnus-inserted-opened-servers)
(gnus-server-open-server (car server))))
(defun gnus-server-close-server (server)
"Close SERVER."
(interactive (list (gnus-server-server-name)))
(interactive (list (gnus-server-server-name)) gnus-server-mode)
(let ((method (gnus-server-to-method server)))
(unless method
(error "No such server: %s" server))
@ -519,7 +519,7 @@ The following commands are available:
(defun gnus-server-offline-server (server)
"Set SERVER to offline."
(interactive (list (gnus-server-server-name)))
(interactive (list (gnus-server-server-name)) gnus-server-mode)
(let ((method (gnus-server-to-method server)))
(unless method
(error "No such server: %s" server))
@ -531,7 +531,7 @@ The following commands are available:
(defun gnus-server-close-all-servers ()
"Close all servers."
(interactive)
(interactive nil gnus-server-mode)
(dolist (server gnus-inserted-opened-servers)
(gnus-server-close-server (car server)))
(dolist (server gnus-server-alist)
@ -539,7 +539,7 @@ The following commands are available:
(defun gnus-server-deny-server (server)
"Make sure SERVER will never be attempted opened."
(interactive (list (gnus-server-server-name)))
(interactive (list (gnus-server-server-name)) gnus-server-mode)
(let ((method (gnus-server-to-method server)))
(unless method
(error "No such server: %s" server))
@ -550,7 +550,7 @@ The following commands are available:
(defun gnus-server-remove-denials ()
"Make all denied servers into closed servers."
(interactive)
(interactive nil gnus-server-mode)
(dolist (server gnus-opened-servers)
(when (eq (nth 1 server) 'denied)
(setcar (nthcdr 1 server) 'closed)))
@ -558,11 +558,11 @@ The following commands are available:
(defun gnus-server-copy-server (from to)
"Copy a server definition to a new name."
(interactive
(list
(or (gnus-server-server-name)
(error "No server on the current line"))
(read-string "Copy to: ")))
(interactive (list
(or (gnus-server-server-name)
(error "No server on the current line"))
(read-string "Copy to: "))
gnus-server-mode)
(unless from
(error "No server on current line"))
(unless (and to (not (string= to "")))
@ -583,7 +583,8 @@ The following commands are available:
(list (intern (gnus-completing-read "Server method"
(mapcar #'car gnus-valid-select-methods)
t))
(read-string "Server name: ")))
(read-string "Server name: "))
gnus-server-mode)
(when (assq where gnus-server-alist)
(error "Server with that name already defined"))
(push (list where how where) gnus-server-killed-servers)
@ -593,7 +594,8 @@ The following commands are available:
"Jump to a server line."
(interactive
(list (gnus-completing-read "Goto server"
(mapcar #'car gnus-server-alist) t)))
(mapcar #'car gnus-server-alist) t))
gnus-server-mode)
(let ((to (text-property-any (point-min) (point-max)
'gnus-server (intern server))))
(when to
@ -602,7 +604,7 @@ The following commands are available:
(defun gnus-server-edit-server (server)
"Edit the server on the current line."
(interactive (list (gnus-server-server-name)))
(interactive (list (gnus-server-server-name)) gnus-server-mode)
(unless server
(error "No server on current line"))
(unless (assoc server gnus-server-alist)
@ -620,7 +622,7 @@ The following commands are available:
(defun gnus-server-show-server (server)
"Show the definition of the server on the current line."
(interactive (list (gnus-server-server-name)))
(interactive (list (gnus-server-server-name)) gnus-server-mode)
(unless server
(error "No server on current line"))
(let ((info (gnus-server-to-method server)))
@ -632,7 +634,7 @@ The following commands are available:
(defun gnus-server-scan-server (server)
"Request a scan from the current server."
(interactive (list (gnus-server-server-name)))
(interactive (list (gnus-server-server-name)) gnus-server-mode)
(let ((method (gnus-server-to-method server)))
(if (not (gnus-get-function method 'request-scan))
(error "Server %s can't scan" (car method))
@ -897,7 +899,7 @@ buffer.
(defun gnus-browse-read-group (&optional no-article number)
"Enter the group at the current line.
If NUMBER, fetch this number of articles."
(interactive "P")
(interactive "P" gnus-browse-mode)
(let* ((full-name (gnus-browse-group-name))
(group (if (gnus-native-method-p
(gnus-find-method-for-group full-name))
@ -916,26 +918,26 @@ If NUMBER, fetch this number of articles."
(defun gnus-browse-select-group (&optional number)
"Select the current group.
If NUMBER, fetch this number of articles."
(interactive "P")
(interactive "P" gnus-browse-mode)
(gnus-browse-read-group 'no number))
(defun gnus-browse-next-group (n)
"Go to the next group."
(interactive "p")
(interactive "p" gnus-browse-mode)
(prog1
(forward-line n)
(gnus-group-position-point)))
(defun gnus-browse-prev-group (n)
"Go to the next group."
(interactive "p")
(interactive "p" gnus-browse-mode)
(gnus-browse-next-group (- n)))
(defun gnus-browse-unsubscribe-current-group (arg)
"(Un)subscribe to the next ARG groups.
The variable `gnus-browse-subscribe-newsgroup-method' determines
how new groups will be entered into the group buffer."
(interactive "p")
(interactive "p" gnus-browse-mode)
(when (eobp)
(error "No group at current line"))
(let ((ward (if (< arg 0) -1 1))
@ -961,7 +963,7 @@ how new groups will be entered into the group buffer."
(defun gnus-browse-describe-group (group)
"Describe the current group."
(interactive (list (gnus-browse-group-name)))
(interactive (list (gnus-browse-group-name)) gnus-browse-mode)
(gnus-group-describe-group nil group))
(defun gnus-browse-delete-group (group force)
@ -970,8 +972,8 @@ If FORCE (the prefix) is non-nil, all the articles in the group will
be deleted. This is \"deleted\" as in \"removed forever from the face
of the Earth\". There is no undo. The user will be prompted before
doing the deletion."
(interactive (list (gnus-browse-group-name)
current-prefix-arg))
(interactive (list (gnus-browse-group-name) current-prefix-arg)
gnus-browse-mode)
(gnus-group-delete-group group force))
(defun gnus-browse-unsubscribe-group ()
@ -1020,7 +1022,7 @@ doing the deletion."
(defun gnus-browse-exit ()
"Quit browsing and return to the group buffer."
(interactive)
(interactive nil gnus-browse-mode)
(when (derived-mode-p 'gnus-browse-mode)
(gnus-kill-buffer (current-buffer)))
;; Insert the newly subscribed groups in the group buffer.
@ -1032,7 +1034,7 @@ doing the deletion."
(defun gnus-browse-describe-briefly ()
"Give a one line description of the group mode commands."
(interactive)
(interactive nil gnus-browse-mode)
(gnus-message 6 "%s"
(substitute-command-keys "\\<gnus-browse-mode-map>\\[gnus-group-next-group]:Forward \\[gnus-group-prev-group]:Backward \\[gnus-browse-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-browse-describe-briefly]:This help")))
@ -1089,7 +1091,7 @@ Requesting compaction of %s... (this may take a long time)"
(defun gnus-server-toggle-cloud-server ()
"Toggle whether the server under point is replicated in the Emacs Cloud."
(interactive)
(interactive nil gnus-server-mode)
(let ((server (gnus-server-server-name)))
(unless server
(error "No server on the current line"))
@ -1110,7 +1112,7 @@ Requesting compaction of %s... (this may take a long time)"
(defun gnus-server-set-cloud-method-server ()
"Set the server under point to host the Emacs Cloud."
(interactive)
(interactive nil gnus-server-mode)
(let ((server (gnus-server-server-name)))
(unless server
(error "No server on the current line"))

View file

@ -1070,7 +1070,7 @@ With 1 C-u, use the `ask-server' method to query the server for new
groups.
With 2 C-u's, use most complete method possible to query the server
for new groups, and subscribe the new groups as zombies."
(interactive "p")
(interactive "p" gnus-group-mode)
(let* ((gnus-subscribe-newsgroup-method
gnus-subscribe-newsgroup-method)
(check (cond
@ -1405,7 +1405,7 @@ newsgroup."
(defun gnus-check-duplicate-killed-groups ()
"Remove duplicates from the list of killed groups."
(interactive)
(interactive nil gnus-group-mode)
(let ((killed gnus-killed-list))
(while killed
(gnus-message 9 "%d" (length killed))

File diff suppressed because it is too large Load diff

View file

@ -146,7 +146,8 @@ See Info node `(gnus)Formatting Variables'."
(defun gnus-topic-jump-to-topic (topic)
"Go to TOPIC."
(interactive
(list (gnus-completing-read "Go to topic" (gnus-topic-list) t)))
(list (gnus-completing-read "Go to topic" (gnus-topic-list) t))
gnus-topic-mode)
(let ((inhibit-read-only t))
(dolist (topic (gnus-current-topics topic))
(unless (gnus-topic-goto-topic topic)
@ -235,12 +236,12 @@ If RECURSIVE is t, return groups in its subtopics too."
(defun gnus-topic-goto-previous-topic (n)
"Go to the N'th previous topic."
(interactive "p")
(interactive "p" gnus-topic-mode)
(gnus-topic-goto-next-topic (- n)))
(defun gnus-topic-goto-next-topic (n)
"Go to the N'th next topic."
(interactive "p")
(interactive "p" gnus-topic-mode)
(let ((backward (< n 0))
(n (abs n))
(topic (gnus-current-topic)))
@ -661,7 +662,7 @@ articles in the topic and its subtopics."
(defun gnus-topic-update-topics-containing-group (group)
"Update all topics that have GROUP as a member."
(when (and (eq major-mode 'gnus-group-mode)
(when (and (eq major-mode 'gnus-topic-mode)
gnus-topic-mode)
(save-excursion
(let ((alist gnus-topic-alist))
@ -677,7 +678,7 @@ articles in the topic and its subtopics."
(defun gnus-topic-update-topic ()
"Update all parent topics to the current group."
(when (and (eq major-mode 'gnus-group-mode)
(when (and (eq major-mode 'gnus-topic-mode)
gnus-topic-mode)
(let ((group (gnus-group-group-name))
(m (point-marker))
@ -1122,7 +1123,9 @@ articles in the topic and its subtopics."
(define-minor-mode gnus-topic-mode
"Minor mode for topicsifying Gnus group buffers."
:lighter " Topic" :keymap gnus-topic-mode-map
:lighter " Topic"
:keymap gnus-topic-mode-map
:interactive (gnus-group-mode)
(if (not (derived-mode-p 'gnus-group-mode))
(setq gnus-topic-mode nil)
;; Infest Gnus with topics.
@ -1172,7 +1175,7 @@ articles in the group. If ALL is a negative number, fetch this
number of the earliest articles in the group.
If performed over a topic line, toggle folding the topic."
(interactive "P")
(interactive "P" gnus-topic-mode)
(when (and (eobp) (not (gnus-group-group-name)))
(forward-line -1))
(if (gnus-group-topic-p)
@ -1184,13 +1187,13 @@ If performed over a topic line, toggle folding the topic."
(defun gnus-mouse-pick-topic (e)
"Select the group or topic under the mouse pointer."
(interactive "e")
(interactive "e" gnus-topic-mode)
(mouse-set-point e)
(gnus-topic-read-group nil))
(defun gnus-topic-expire-articles (topic)
"Expire articles in this topic or group."
(interactive (list (gnus-group-topic-name)))
(interactive (list (gnus-group-topic-name)) gnus-topic-mode)
(if (not topic)
(call-interactively 'gnus-group-expire-articles)
(save-excursion
@ -1205,7 +1208,7 @@ If performed over a topic line, toggle folding the topic."
(defun gnus-topic-catchup-articles (topic)
"Catchup this topic or group.
Also see `gnus-group-catchup'."
(interactive (list (gnus-group-topic-name)))
(interactive (list (gnus-group-topic-name)) gnus-topic-mode)
(if (not topic)
(call-interactively 'gnus-group-catchup-current)
(save-excursion
@ -1232,7 +1235,7 @@ be auto-selected upon group entry. If GROUP is non-nil, fetch
that group.
If performed over a topic line, toggle folding the topic."
(interactive "P")
(interactive "P" gnus-topic-mode)
(when (and (eobp) (not (gnus-group-group-name)))
(forward-line -1))
(if (gnus-group-topic-p)
@ -1247,7 +1250,8 @@ When used interactively, PARENT will be the topic under point."
(interactive
(list
(read-string "New topic: ")
(gnus-current-topic)))
(gnus-current-topic))
gnus-topic-mode)
;; Check whether this topic already exists.
(when (gnus-topic-find-topology topic)
(error "Topic already exists"))
@ -1284,7 +1288,8 @@ If COPYP, copy the groups instead."
(interactive
(list current-prefix-arg
(gnus-completing-read "Move to topic" (mapcar #'car gnus-topic-alist) t
nil 'gnus-topic-history)))
nil 'gnus-topic-history))
gnus-topic-mode)
(let ((use-marked (and (not n) (not (and transient-mark-mode mark-active))
gnus-group-marked t))
(groups (gnus-group-process-prefix n))
@ -1309,7 +1314,7 @@ If COPYP, copy the groups instead."
(defun gnus-topic-remove-group (&optional n)
"Remove the current group from the topic."
(interactive "P")
(interactive "P" gnus-topic-mode)
(let ((use-marked (and (not n) (not (and transient-mark-mode mark-active))
gnus-group-marked t))
(groups (gnus-group-process-prefix n)))
@ -1331,12 +1336,13 @@ If COPYP, copy the groups instead."
(interactive
(list current-prefix-arg
(gnus-completing-read
"Copy to topic" (mapcar #'car gnus-topic-alist) t)))
"Copy to topic" (mapcar #'car gnus-topic-alist) t))
gnus-topic-mode)
(gnus-topic-move-group n topic t))
(defun gnus-topic-kill-group (&optional n discard)
"Kill the next N groups."
(interactive "P")
(interactive "P" gnus-topic-mode)
(if (gnus-group-topic-p)
(let ((topic (gnus-group-topic-name)))
(push (cons
@ -1356,7 +1362,7 @@ If COPYP, copy the groups instead."
(defun gnus-topic-yank-group (&optional arg)
"Yank the last topic."
(interactive "p")
(interactive "p" gnus-topic-mode)
(if gnus-topic-killed-topics
(let* ((previous
(or (gnus-group-topic-name)
@ -1405,7 +1411,7 @@ If COPYP, copy the groups instead."
(defun gnus-topic-hide-topic (&optional permanent)
"Hide the current topic.
If PERMANENT, make it stay hidden in subsequent sessions as well."
(interactive "P")
(interactive "P" gnus-topic-mode)
(when (gnus-current-topic)
(gnus-topic-goto-topic (gnus-current-topic))
(if permanent
@ -1418,7 +1424,7 @@ If PERMANENT, make it stay hidden in subsequent sessions as well."
(defun gnus-topic-show-topic (&optional permanent)
"Show the hidden topic.
If PERMANENT, make it stay shown in subsequent sessions as well."
(interactive "P")
(interactive "P" gnus-topic-mode)
(when (gnus-group-topic-p)
(if (not permanent)
(gnus-topic-remove-topic t nil)
@ -1433,9 +1439,11 @@ If PERMANENT, make it stay shown in subsequent sessions as well."
(defun gnus-topic-mark-topic (topic &optional unmark non-recursive)
"Mark all groups in the TOPIC with the process mark.
If NON-RECURSIVE (which is the prefix) is t, don't mark its subtopics."
(interactive (list (gnus-group-topic-name)
nil
(and current-prefix-arg t)))
(interactive
(list (gnus-group-topic-name)
nil
(and current-prefix-arg t))
gnus-topic-mode)
(if (not topic)
(call-interactively 'gnus-group-mark-group)
(save-excursion
@ -1450,14 +1458,15 @@ If NON-RECURSIVE (which is the prefix) is t, don't mark its subtopics."
If NON-RECURSIVE (which is the prefix) is t, don't unmark its subtopics."
(interactive (list (gnus-group-topic-name)
nil
(and current-prefix-arg t)))
(and current-prefix-arg t))
gnus-topic-mode)
(if (not topic)
(call-interactively 'gnus-group-unmark-group)
(gnus-topic-mark-topic topic t non-recursive)))
(defun gnus-topic-get-new-news-this-topic (&optional n)
"Check for new news in the current topic."
(interactive "P")
(interactive "P" gnus-topic-mode)
(if (not (gnus-group-topic-p))
(gnus-group-get-new-news-this-group n)
(let* ((topic (gnus-group-topic-name))
@ -1475,7 +1484,8 @@ If NON-RECURSIVE (which is the prefix) is t, don't unmark its subtopics."
(list
(setq topic (gnus-completing-read "Move to topic"
(mapcar #'car gnus-topic-alist) t))
(read-string (format "Move to %s (regexp): " topic))))))
(read-string (format "Move to %s (regexp): " topic)))))
gnus-topic-mode)
(gnus-group-mark-regexp regexp)
(gnus-topic-move-group nil topic copyp))
@ -1486,12 +1496,13 @@ If NON-RECURSIVE (which is the prefix) is t, don't unmark its subtopics."
(mapcar #'car gnus-topic-alist) t)))
(nreverse
(list topic
(read-string (format "Copy to %s (regexp): " topic))))))
(read-string (format "Copy to %s (regexp): " topic)))))
gnus-topic-mode)
(gnus-topic-move-matching regexp topic t))
(defun gnus-topic-delete (topic)
"Delete a topic."
(interactive (list (gnus-group-topic-name)))
(interactive (list (gnus-group-topic-name)) gnus-topic-mode)
(unless topic
(error "No topic to be deleted"))
(let ((entry (assoc topic gnus-topic-alist))
@ -1512,7 +1523,8 @@ If NON-RECURSIVE (which is the prefix) is t, don't unmark its subtopics."
(interactive
(let ((topic (gnus-current-topic)))
(list topic
(read-string (format "Rename %s to: " topic) topic))))
(read-string (format "Rename %s to: " topic) topic)))
gnus-topic-mode)
;; Check whether the new name exists.
(when (gnus-topic-find-topology new-name)
(error "Topic `%s' already exists" new-name))
@ -1535,7 +1547,7 @@ If NON-RECURSIVE (which is the prefix) is t, don't unmark its subtopics."
(defun gnus-topic-indent (&optional unindent)
"Indent a topic -- make it a sub-topic of the previous topic.
If UNINDENT, remove an indentation."
(interactive "P")
(interactive "P" gnus-topic-mode)
(if unindent
(gnus-topic-unindent)
(let* ((topic (gnus-current-topic))
@ -1555,7 +1567,7 @@ If UNINDENT, remove an indentation."
(defun gnus-topic-unindent ()
"Unindent a topic."
(interactive)
(interactive nil gnus-topic-mode)
(let* ((topic (gnus-current-topic))
(parent (gnus-topic-parent-topic topic))
(grandparent (gnus-topic-parent-topic parent)))
@ -1574,7 +1586,7 @@ If UNINDENT, remove an indentation."
(defun gnus-topic-list-active (&optional force)
"List all groups that Gnus knows about in a topicsified fashion.
If FORCE, always re-read the active file."
(interactive "P")
(interactive "P" gnus-topic-mode)
(when force
(gnus-get-killed-groups))
(gnus-topic-grok-active force)
@ -1585,7 +1597,7 @@ If FORCE, always re-read the active file."
(defun gnus-topic-toggle-display-empty-topics ()
"Show/hide topics that have no unread articles."
(interactive)
(interactive nil gnus-topic-mode)
(setq gnus-topic-display-empty-topics
(not gnus-topic-display-empty-topics))
(gnus-group-list-groups)
@ -1598,7 +1610,7 @@ If FORCE, always re-read the active file."
(defun gnus-topic-edit-parameters (group)
"Edit the group parameters of GROUP.
If performed on a topic, edit the topic parameters instead."
(interactive (list (gnus-group-group-name)))
(interactive (list (gnus-group-group-name)) gnus-topic-mode)
(if group
(gnus-group-edit-group-parameters group)
(if (not (gnus-group-topic-p))
@ -1642,7 +1654,8 @@ If performed on a topic, edit the topic parameters instead."
(defun gnus-topic-sort-groups (func &optional reverse)
"Sort the current topic according to FUNC.
If REVERSE, reverse the sorting order."
(interactive (list gnus-group-sort-function current-prefix-arg))
(interactive (list gnus-group-sort-function current-prefix-arg)
gnus-topic-mode)
(let ((topic (assoc (gnus-current-topic) gnus-topic-alist)))
(gnus-topic-sort-topic
topic (gnus-make-sort-function func) reverse)
@ -1651,43 +1664,43 @@ If REVERSE, reverse the sorting order."
(defun gnus-topic-sort-groups-by-alphabet (&optional reverse)
"Sort the current topic alphabetically by group name.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-topic-mode)
(gnus-topic-sort-groups 'gnus-group-sort-by-alphabet reverse))
(defun gnus-topic-sort-groups-by-unread (&optional reverse)
"Sort the current topic by number of unread articles.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-topic-mode)
(gnus-topic-sort-groups 'gnus-group-sort-by-unread reverse))
(defun gnus-topic-sort-groups-by-level (&optional reverse)
"Sort the current topic by group level.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-topic-mode)
(gnus-topic-sort-groups 'gnus-group-sort-by-level reverse))
(defun gnus-topic-sort-groups-by-score (&optional reverse)
"Sort the current topic by group score.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-topic-mode)
(gnus-topic-sort-groups 'gnus-group-sort-by-score reverse))
(defun gnus-topic-sort-groups-by-rank (&optional reverse)
"Sort the current topic by group rank.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-topic-mode)
(gnus-topic-sort-groups 'gnus-group-sort-by-rank reverse))
(defun gnus-topic-sort-groups-by-method (&optional reverse)
"Sort the current topic alphabetically by backend name.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-topic-mode)
(gnus-topic-sort-groups 'gnus-group-sort-by-method reverse))
(defun gnus-topic-sort-groups-by-server (&optional reverse)
"Sort the current topic alphabetically by server name.
If REVERSE, sort in reverse order."
(interactive "P")
(interactive "P" gnus-topic-mode)
(gnus-topic-sort-groups 'gnus-group-sort-by-server reverse))
(defun gnus-topic-sort-topics-1 (top reverse)
@ -1708,7 +1721,8 @@ If REVERSE, reverse the sorting order."
(list (gnus-completing-read "Sort topics in"
(mapcar #'car gnus-topic-alist) t
(gnus-current-topic))
current-prefix-arg))
current-prefix-arg)
gnus-topic-mode)
(let ((topic-topology (or (and topic (cdr (gnus-topic-find-topology topic)))
gnus-topic-topology)))
(gnus-topic-sort-topics-1 topic-topology reverse)
@ -1721,7 +1735,8 @@ If REVERSE, reverse the sorting order."
(interactive
(list
(gnus-group-topic-name)
(gnus-completing-read "Move to topic" (mapcar #'car gnus-topic-alist) t)))
(gnus-completing-read "Move to topic" (mapcar #'car gnus-topic-alist) t))
gnus-topic-mode)
(unless (and current to)
(error "Can't find topic"))
(let ((current-top (cdr (gnus-topic-find-topology current)))

View file

@ -355,7 +355,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(defun gnus-uu-decode-uu (&optional n)
"Uudecodes the current article."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(gnus-uu-decode-with-method #'gnus-uu-uustrip-article n))
(defun gnus-uu-decode-uu-and-save (n dir)
@ -364,13 +364,14 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(list current-prefix-arg
(file-name-as-directory
(read-directory-name "Uudecode and save in dir: "
gnus-uu-default-dir
gnus-uu-default-dir t))))
gnus-uu-default-dir
gnus-uu-default-dir t)))
gnus-article-mode gnus-summary-mode)
(gnus-uu-decode-with-method #'gnus-uu-uustrip-article n dir nil nil t))
(defun gnus-uu-decode-unshar (&optional n)
"Unshars the current article."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(gnus-uu-decode-with-method #'gnus-uu-unshar-article n nil nil 'scan t))
(defun gnus-uu-decode-unshar-and-save (n dir)
@ -379,8 +380,9 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(list current-prefix-arg
(file-name-as-directory
(read-directory-name "Unshar and save in dir: "
gnus-uu-default-dir
gnus-uu-default-dir t))))
gnus-uu-default-dir
gnus-uu-default-dir t)))
gnus-article-mode gnus-summary-mode)
(gnus-uu-decode-with-method #'gnus-uu-unshar-article n dir nil 'scan t))
(defun gnus-uu-decode-save (n file)
@ -391,7 +393,8 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(read-directory-name
"Save articles in dir: " gnus-uu-default-dir gnus-uu-default-dir)
(read-file-name
"Save article in file: " gnus-uu-default-dir gnus-uu-default-dir))))
"Save article in file: " gnus-uu-default-dir gnus-uu-default-dir)))
gnus-article-mode gnus-summary-mode)
(setq gnus-uu-saved-article-name file)
(gnus-uu-decode-with-method #'gnus-uu-save-article n nil t))
@ -401,8 +404,9 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(list current-prefix-arg
(file-name-as-directory
(read-directory-name "Unbinhex and save in dir: "
gnus-uu-default-dir
gnus-uu-default-dir))))
gnus-uu-default-dir
gnus-uu-default-dir)))
gnus-article-mode gnus-summary-mode)
(gnus-uu-initialize)
(setq gnus-uu-binhex-article-name
(make-temp-file (expand-file-name "binhex" gnus-uu-work-dir)))
@ -414,14 +418,15 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(list current-prefix-arg
(file-name-as-directory
(read-directory-name "yEnc decode and save in dir: "
gnus-uu-default-dir
gnus-uu-default-dir))))
gnus-uu-default-dir
gnus-uu-default-dir)))
gnus-article-mode gnus-summary-mode)
(setq gnus-uu-yenc-article-name nil)
(gnus-uu-decode-with-method #'gnus-uu-yenc-article n dir nil t))
(defun gnus-uu-decode-uu-view (&optional n)
"Uudecodes and views the current article."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
(gnus-uu-decode-uu n)))
@ -431,13 +436,14 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(list current-prefix-arg
(read-file-name "Uudecode, view and save in dir: "
gnus-uu-default-dir
gnus-uu-default-dir t)))
gnus-uu-default-dir t))
gnus-article-mode gnus-summary-mode)
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
(gnus-uu-decode-uu-and-save n dir)))
(defun gnus-uu-decode-unshar-view (&optional n)
"Unshars and views the current article."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
(gnus-uu-decode-unshar n)))
@ -447,7 +453,8 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(list current-prefix-arg
(read-file-name "Unshar, view and save in dir: "
gnus-uu-default-dir
gnus-uu-default-dir t)))
gnus-uu-default-dir t))
gnus-article-mode gnus-summary-mode)
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
(gnus-uu-decode-unshar-and-save n dir)))
@ -459,7 +466,8 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(read-directory-name "Save articles in dir: "
gnus-uu-default-dir gnus-uu-default-dir)
(read-file-name "Save articles in file: "
gnus-uu-default-dir gnus-uu-default-dir))))
gnus-uu-default-dir gnus-uu-default-dir)))
gnus-article-mode gnus-summary-mode)
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
(gnus-uu-decode-save n file)))
@ -468,7 +476,8 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(interactive
(list current-prefix-arg
(read-file-name "Unbinhex, view and save in dir: "
gnus-uu-default-dir gnus-uu-default-dir)))
gnus-uu-default-dir gnus-uu-default-dir))
gnus-article-mode gnus-summary-mode)
(gnus-uu-initialize)
(setq gnus-uu-binhex-article-name
(make-temp-file (expand-file-name "binhex" gnus-uu-work-dir)))
@ -480,7 +489,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(defun gnus-uu-digest-mail-forward (&optional n post)
"Digests and forwards all articles in this series."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(gnus-uu-initialize)
(let ((gnus-uu-save-in-digest t)
(file (make-temp-file (nnheader-concat gnus-uu-work-dir "forward")))
@ -546,7 +555,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
(defun gnus-uu-digest-post-forward (&optional n)
"Digest and forward to a newsgroup."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(gnus-uu-digest-mail-forward n t))
;; Process marking.
@ -576,7 +585,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
"Set the process mark on articles whose subjects match REGEXP.
When called interactively, prompt for REGEXP.
Optional UNMARK non-nil means unmark instead of mark."
(interactive "sMark (regexp): \nP")
(interactive "sMark (regexp): \nP" gnus-article-mode gnus-summary-mode)
(save-excursion
(let* ((articles (gnus-uu-find-articles-matching regexp))
(new-marked (gnus-new-processable unmark articles)))
@ -590,12 +599,12 @@ Optional UNMARK non-nil means unmark instead of mark."
(defun gnus-uu-unmark-by-regexp (regexp)
"Remove the process mark from articles whose subjects match REGEXP.
When called interactively, prompt for REGEXP."
(interactive "sUnmark (regexp): ")
(interactive "sUnmark (regexp): " gnus-article-mode gnus-summary-mode)
(gnus-uu-mark-by-regexp regexp t))
(defun gnus-uu-mark-series (&optional silent)
"Mark the current series with the process mark."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(let* ((articles (gnus-uu-find-articles-matching))
(l (length articles)))
(while articles
@ -608,7 +617,7 @@ When called interactively, prompt for REGEXP."
(defun gnus-uu-mark-region (beg end &optional unmark)
"Set the process mark on all articles between point and mark."
(interactive "r")
(interactive "r" gnus-article-mode gnus-summary-mode)
(save-excursion
(goto-char beg)
(while (< (point) end)
@ -620,22 +629,22 @@ When called interactively, prompt for REGEXP."
(defun gnus-uu-unmark-region (beg end)
"Remove the process mark from all articles between point and mark."
(interactive "r")
(interactive "r" gnus-article-mode gnus-summary-mode)
(gnus-uu-mark-region beg end t))
(defun gnus-uu-mark-buffer ()
"Set the process mark on all articles in the buffer."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-uu-mark-region (point-min) (point-max)))
(defun gnus-uu-unmark-buffer ()
"Remove the process mark on all articles in the buffer."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-uu-mark-region (point-min) (point-max) t))
(defun gnus-uu-mark-thread ()
"Marks all articles downwards in this thread."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(gnus-save-hidden-threads
(let ((level (gnus-summary-thread-level)))
(while (and (gnus-summary-set-process-mark (gnus-summary-article-number))
@ -646,7 +655,7 @@ When called interactively, prompt for REGEXP."
(defun gnus-uu-unmark-thread ()
"Unmarks all articles downwards in this thread."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(let ((level (gnus-summary-thread-level)))
(while (and (gnus-summary-remove-process-mark
(gnus-summary-article-number))
@ -656,7 +665,7 @@ When called interactively, prompt for REGEXP."
(defun gnus-uu-invert-processable ()
"Invert the list of process-marked articles."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(let ((data gnus-newsgroup-data)
number)
(save-excursion
@ -669,7 +678,7 @@ When called interactively, prompt for REGEXP."
(defun gnus-uu-mark-over (&optional score)
"Mark all articles with a score over SCORE (the prefix)."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(let ((score (or score gnus-summary-default-score 0))
(data gnus-newsgroup-data))
(save-excursion
@ -684,7 +693,7 @@ When called interactively, prompt for REGEXP."
(defun gnus-uu-mark-sparse ()
"Mark all series that have some articles marked."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(let ((marked (nreverse gnus-newsgroup-processable))
subject articles total headers)
(unless marked
@ -708,7 +717,7 @@ When called interactively, prompt for REGEXP."
(defun gnus-uu-mark-all ()
"Mark all articles in \"series\" order."
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(setq gnus-newsgroup-processable nil)
(save-excursion
(let ((data gnus-newsgroup-data)
@ -728,33 +737,33 @@ When called interactively, prompt for REGEXP."
(defun gnus-uu-decode-postscript (&optional n)
"Gets PostScript of the current article."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(gnus-uu-decode-with-method #'gnus-uu-decode-postscript-article n))
(defun gnus-uu-decode-postscript-view (&optional n)
"Gets and views the current article."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
(gnus-uu-decode-postscript n)))
(defun gnus-uu-decode-postscript-and-save (n dir)
"Extracts PostScript and saves the current article."
(interactive
(list current-prefix-arg
(file-name-as-directory
(read-directory-name "Save in dir: "
gnus-uu-default-dir
gnus-uu-default-dir t))))
(interactive (list current-prefix-arg
(file-name-as-directory
(read-directory-name "Save in dir: "
gnus-uu-default-dir
gnus-uu-default-dir t)))
gnus-article-mode gnus-summary-mode)
(gnus-uu-decode-with-method #'gnus-uu-decode-postscript-article
n dir nil nil t))
(defun gnus-uu-decode-postscript-and-save-view (n dir)
"Decodes, views and saves the resulting file."
(interactive
(list current-prefix-arg
(read-file-name "Where do you want to save the file(s)? "
gnus-uu-default-dir
gnus-uu-default-dir t)))
(interactive (list current-prefix-arg
(read-file-name "Where do you want to save the file(s)? "
gnus-uu-default-dir
gnus-uu-default-dir t))
gnus-article-mode gnus-summary-mode)
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
(gnus-uu-decode-postscript-and-save n dir)))

View file

@ -72,7 +72,7 @@ If N is a positive number, save the N next articles.
If N is a negative number, save the N previous articles.
If N is nil and any articles have been marked with the process mark,
save those articles instead."
(interactive "P")
(interactive "P" gnus-article-mode gnus-summary-mode)
(require 'gnus-art)
(let ((gnus-default-article-saver 'gnus-summary-save-in-vm))
(gnus-summary-save-article arg)))
@ -80,7 +80,7 @@ save those articles instead."
(declare-function vm-save-message "ext:vm-save" (folder &optional count))
(defun gnus-summary-save-in-vm (&optional folder)
(interactive)
(interactive nil gnus-article-mode gnus-summary-mode)
(require 'vm)
(setq folder
(gnus-read-save-file-name

View file

@ -2513,7 +2513,7 @@ are always t.")
'(("info" :interactive t Info-goto-node)
("qp" quoted-printable-decode-region quoted-printable-decode-string)
("ps-print" ps-print-preprint)
("message" :interactive t
("message" :interactive (message-mode)
message-send-and-exit message-yank-original)
("babel" babel-as-string)
("nnmail" nnmail-split-fancy nnmail-article-group)
@ -2530,7 +2530,7 @@ are always t.")
("score-mode" :interactive t gnus-score-mode)
("gnus-mh" gnus-summary-save-article-folder
gnus-Folder-save-name gnus-folder-save-name)
("gnus-mh" :interactive t gnus-summary-save-in-folder)
("gnus-mh" :interactive (gnus-summary-mode) gnus-summary-save-in-folder)
("gnus-demon" gnus-demon-add-scanmail
gnus-demon-add-rescan gnus-demon-add-scan-timestamps
gnus-demon-add-disconnection gnus-demon-add-handler
@ -2545,7 +2545,7 @@ are always t.")
("gnus-srvr" gnus-enter-server-buffer gnus-server-set-info
gnus-server-server-name)
("gnus-srvr" gnus-browse-foreign-server)
("gnus-cite" :interactive t
("gnus-cite" :interactive (gnus-article-mode gnus-summary-mode)
gnus-article-highlight-citation gnus-article-hide-citation-maybe
gnus-article-hide-citation gnus-article-fill-cited-article
gnus-article-hide-citation-in-followups
@ -2561,29 +2561,34 @@ are always t.")
gnus-cache-enter-remove-article gnus-cached-article-p
gnus-cache-open gnus-cache-close gnus-cache-update-article
gnus-cache-articles-in-group)
("gnus-cache" :interactive t gnus-jog-cache gnus-cache-enter-article
("gnus-cache" :interactive (gnus-summary-mode)
gnus-summary-insert-cached-articles gnus-cache-enter-article
gnus-cache-remove-article gnus-summary-insert-cached-articles)
("gnus-cache" :interactive t gnus-jog-cache)
("gnus-score" :interactive t
gnus-score-flush-cache gnus-score-close)
("gnus-score" :interactive (gnus-summary-mode)
gnus-summary-increase-score gnus-summary-set-score
gnus-summary-raise-thread gnus-summary-raise-same-subject
gnus-summary-raise-score gnus-summary-raise-same-subject-and-select
gnus-summary-lower-thread gnus-summary-lower-same-subject
gnus-summary-lower-score gnus-summary-lower-same-subject-and-select
gnus-summary-current-score gnus-score-delta-default
gnus-score-flush-cache gnus-score-close
gnus-possibly-score-headers gnus-score-followup-article
gnus-score-followup-thread)
("gnus-score"
(gnus-summary-score-map keymap) gnus-score-save gnus-score-headers
gnus-current-score-file-nondirectory gnus-score-adaptive
gnus-score-find-trace gnus-score-file-name)
("gnus-cus" :interactive t gnus-group-customize gnus-score-customize)
("gnus-topic" :interactive t gnus-topic-mode)
("gnus-cus" :interactive (gnus-group-mode) gnus-group-customize)
("gnus-cus" :interactive (gnus-summary-mode) gnus-score-customize)
("gnus-topic" :interactive (gnus-group-mode) gnus-topic-mode)
("gnus-topic" gnus-topic-remove-group gnus-topic-set-parameters
gnus-subscribe-topics)
("gnus-salt" :interactive t gnus-pick-mode gnus-binary-mode)
("gnus-salt" :interactive (gnus-summary-mode)
gnus-pick-mode gnus-binary-mode)
("gnus-uu" (gnus-uu-extract-map keymap) (gnus-uu-mark-map keymap))
("gnus-uu" :interactive t
("gnus-uu" :interactive (gnus-article-mode gnus-summary-mode)
gnus-uu-digest-mail-forward gnus-uu-digest-post-forward
gnus-uu-mark-series gnus-uu-mark-region gnus-uu-mark-buffer
gnus-uu-mark-by-regexp gnus-uu-mark-all
@ -2598,12 +2603,13 @@ are always t.")
("gnus-uu" gnus-uu-delete-work-dir gnus-uu-unmark-thread)
("gnus-msg" (gnus-summary-send-map keymap)
gnus-article-mail gnus-copy-article-buffer gnus-extended-version)
("gnus-msg" :interactive t
gnus-group-post-news gnus-group-mail gnus-group-news
("gnus-msg" :interactive (gnus-group-mode)
gnus-group-post-news gnus-group-mail gnus-group-news)
("gnus-msg" :interactive (gnus-summary-mode)
gnus-summary-post-news gnus-summary-news-other-window
gnus-summary-followup gnus-summary-followup-with-original
gnus-summary-cancel-article gnus-summary-supersede-article
gnus-post-news gnus-summary-reply gnus-summary-reply-with-original
gnus-summary-reply gnus-summary-reply-with-original
gnus-summary-mail-forward gnus-summary-mail-other-window
gnus-summary-resend-message gnus-summary-resend-bounced-mail
gnus-summary-wide-reply gnus-summary-followup-to-mail
@ -2611,7 +2617,9 @@ are always t.")
gnus-summary-wide-reply-with-original
gnus-summary-post-forward gnus-summary-wide-reply-with-original
gnus-summary-post-forward)
("gnus-picon" :interactive t gnus-treat-from-picon)
("gnus-msg" gnus-post-news)
("gnus-picon" :interactive (gnus-article-mode gnus-summary-mode)
gnus-treat-from-picon)
("smiley" :interactive t smiley-region)
("gnus-win" gnus-configure-windows gnus-add-configuration)
("gnus-sum" gnus-summary-insert-line gnus-summary-read-group
@ -2634,7 +2642,7 @@ are always t.")
gnus-request-article-this-buffer gnus-article-mode
gnus-article-setup-buffer gnus-narrow-to-page
gnus-article-delete-invisible-text gnus-treat-article)
("gnus-art" :interactive t
("gnus-art" :interactive (gnus-summary-mode gnus-article-mode)
gnus-article-hide-headers gnus-article-hide-boring-headers
gnus-article-treat-overstrike
gnus-article-remove-cr gnus-article-remove-trailing-blank-lines
@ -2646,7 +2654,6 @@ are always t.")
gnus-article-hide-pem gnus-article-hide-signature
gnus-article-strip-leading-blank-lines gnus-article-date-local
gnus-article-date-original gnus-article-date-lapsed
;;gnus-article-show-all-headers
gnus-article-edit-mode gnus-article-edit-article
gnus-article-edit-done gnus-article-decode-encoded-words
gnus-start-date-timer gnus-stop-date-timer
@ -2671,12 +2678,13 @@ are always t.")
gnus-agent-store-article gnus-agent-group-covered-p)
("gnus-agent" :interactive t
gnus-unplugged gnus-agentize gnus-agent-batch)
("gnus-vm" :interactive t gnus-summary-save-in-vm
("gnus-vm" :interactive (gnus-summary-mode) gnus-summary-save-in-vm
gnus-summary-save-article-vm)
("compface" uncompface)
("gnus-draft" :interactive t gnus-draft-mode gnus-group-send-queue)
("gnus-draft" :interactive (gnus-summary-mode) gnus-draft-mode)
("gnus-draft" :interactive t gnus-group-send-queue)
("gnus-mlspl" gnus-group-split gnus-group-split-fancy)
("gnus-mlspl" :interactive t gnus-group-split-setup
("gnus-mlspl" :interactive (gnus-group-mode) gnus-group-split-setup
gnus-group-split-update)
("gnus-delay" gnus-delay-initialize))))