emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/command 3cb944d 2/2: Convert a bunch of Gnus commands to use `co


From: Lars Ingebrigtsen
Subject: scratch/command 3cb944d 2/2: Convert a bunch of Gnus commands to use `command'
Date: Thu, 11 Feb 2021 10:23:12 -0500 (EST)

branch: scratch/command
commit 3cb944d5b07e3467ab0945316dcb01e2dff2f078
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Convert a bunch of Gnus commands to use `command'
---
 lisp/gnus/gnus-art.el      | 253 +++++++++++++--------------
 lisp/gnus/gnus-bookmark.el |  24 +--
 lisp/gnus/gnus-cache.el    |   8 +-
 lisp/gnus/gnus-cite.el     |  11 +-
 lisp/gnus/gnus-cus.el      |   8 +-
 lisp/gnus/gnus-delay.el    |   8 +-
 lisp/gnus/gnus-diary.el    |   4 +-
 lisp/gnus/gnus-dired.el    |  17 +-
 lisp/gnus/gnus-sum.el      | 414 ++++++++++++++++++++++-----------------------
 9 files changed, 376 insertions(+), 371 deletions(-)

diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index c9afa3a..4b991a5 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -1823,7 +1823,7 @@ Initialized from `text-mode-syntax-table'.")
 
 (defun article-hide-headers (&optional _arg _delete)
   "Hide unwanted headers and possibly sort them as well."
-  (interactive)
+  (command gnus-article-mode)
   ;; This function might be inhibited.
   (unless gnus-inhibit-hiding
     (let ((inhibit-read-only t)
@@ -1891,7 +1891,7 @@ Initialized from `text-mode-syntax-table'.")
   "Toggle hiding of headers that aren't very interesting.
 If given a negative prefix, always show; if given a positive prefix,
 always hide."
-  (interactive (gnus-article-hidden-arg))
+  (command gnus-article-mode (gnus-article-hidden-arg))
   (when (and (not (gnus-article-check-hidden-text 'boring-headers arg))
             (not gnus-show-all-headers))
     (save-excursion
@@ -2050,7 +2050,7 @@ always hide."
 
 (defun article-normalize-headers ()
   "Make all header lines 40 characters long."
-  (interactive)
+  (command gnus-article-mode)
   (let ((inhibit-read-only t)
        column)
     (save-excursion
@@ -2086,7 +2086,7 @@ iso-8859-1 character map in an attempt to provide more 
quoting
 characters.  If you see something like \\222 or \\264 where
 you're expecting some kind of apostrophe or quotation mark, then
 try this wash."
-  (interactive)
+  (command gnus-article-mode)
   (article-translate-strings gnus-article-smartquotes-map))
 (define-obsolete-function-alias 'article-treat-dumbquotes
   #'article-treat-smartquotes "27.1")
@@ -2095,7 +2095,7 @@ try this wash."
 
 (defun article-treat-non-ascii ()
   "Translate many Unicode characters into their ASCII equivalents."
-  (interactive)
+  (command gnus-article-mode)
   (require 'org-entities)
   (let ((table (make-char-table nil)))
     (dolist (elem org-entities)
@@ -2138,7 +2138,7 @@ MAP is an alist where the elements are on the form 
(\"from\" \"to\")."
 
 (defun article-treat-overstrike ()
   "Translate overstrikes into bold text."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (when (article-goto-body)
       (let ((inhibit-read-only t))
@@ -2166,7 +2166,7 @@ MAP is an alist where the elements are on the form 
(\"from\" \"to\")."
 
 (defun article-treat-ansi-sequences ()
   "Translate ANSI SGR control sequences into overlays or extents."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (when (article-goto-body)
       (require 'ansi-color)
@@ -2178,7 +2178,7 @@ MAP is an alist where the elements are on the form 
(\"from\" \"to\")."
   "Unfold folded message headers.
 Only the headers that fit into the current window width will be
 unfolded."
-  (interactive)
+  (command (gnus-article-mode gnus-summary-mode))
   (gnus-with-article-headers
     (let (length)
       (while (not (eobp))
@@ -2204,7 +2204,7 @@ unfolded."
 
 (defun gnus-article-treat-fold-headers ()
   "Fold message headers."
-  (interactive)
+  (command (gnus-article-mode gnus-summary-mode))
   (gnus-with-article-headers
     (while (not (eobp))
       (save-restriction
@@ -2214,7 +2214,7 @@ unfolded."
 
 (defun gnus-treat-smiley ()
   "Toggle display of textual emoticons (\"smileys\") as small graphical icons."
-  (interactive)
+  (command (gnus-article-mode gnus-summary-mode))
   (gnus-with-article-buffer
     (if (memq 'smiley gnus-article-wash-types)
        (gnus-delete-images 'smiley)
@@ -2227,7 +2227,7 @@ unfolded."
 
 (defun gnus-article-remove-images ()
   "Remove all images from the article buffer."
-  (interactive)
+  (command (gnus-article-mode gnus-summary-mode))
   (gnus-with-article-buffer
     (save-restriction
       (widen)
@@ -2239,7 +2239,7 @@ unfolded."
 (defun gnus-article-show-images ()
   "Show any images that are in the HTML-rendered article buffer.
 This only works if the article in question is HTML."
-  (interactive)
+  (command (gnus-article-mode gnus-summary-mode))
   (gnus-with-article-buffer
     (save-restriction
       (widen)
@@ -2255,7 +2255,7 @@ This only works if the article in question is HTML."
 
 (defun gnus-article-treat-fold-newsgroups ()
   "Fold the Newsgroups and Followup-To message headers."
-  (interactive)
+  (command (gnus-article-mode gnus-summary-mode))
   (gnus-with-article-headers
     (while (gnus-article-goto-header "newsgroups\\|followup-to")
       (save-restriction
@@ -2279,7 +2279,7 @@ predicate.  See Info node `(gnus)Customizing Articles'."
 If ARG is non-nil and not a number, toggle
 `gnus-article-truncate-lines' too.  If ARG is a number, truncate
 long lines if and only if arg is positive."
-  (interactive "P")
+  (command (gnus-article-mode gnus-summary-mode) "P")
   (cond
    ((and (numberp arg) (> arg 0))
     (setq gnus-article-truncate-lines t))
@@ -2298,7 +2298,7 @@ long lines if and only if arg is positive."
 
 (defun gnus-article-treat-body-boundary ()
   "Place a boundary line at the end of the headers."
-  (interactive)
+  (command (gnus-article-mode gnus-summary-mode))
   (when (and gnus-body-boundary-delimiter
             (> (length gnus-body-boundary-delimiter) 0))
     (gnus-with-article-headers
@@ -2317,7 +2317,7 @@ long lines if and only if arg is positive."
   "Fill lines that are wider than the window width or `fill-column'.
 If WIDTH (interactively, the numeric prefix), use that as the
 fill width."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (save-excursion
     (let* ((inhibit-read-only t)
           (window-width (window-width (get-buffer-window (current-buffer))))
@@ -2341,7 +2341,7 @@ fill width."
 
 (defun article-capitalize-sentences ()
   "Capitalize the first word in each sentence."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (let ((inhibit-read-only t)
          (paragraph-start "^[\n\^L]"))
@@ -2352,7 +2352,7 @@ fill width."
 
 (defun article-remove-cr ()
   "Remove trailing CRs and then translate remaining CRs into LFs."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (let ((inhibit-read-only t))
       (goto-char (point-min))
@@ -2364,7 +2364,7 @@ fill width."
 
 (defun article-remove-trailing-blank-lines ()
   "Remove all trailing blank lines from the article."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (let ((inhibit-read-only t))
       (goto-char (point-max))
@@ -2383,7 +2383,7 @@ fill width."
 
 (defun article-display-face (&optional force)
   "Display any Face headers in the header."
-  (interactive (list 'force))
+  (command (gnus-article-mode gnus-summary-mode) (list 'force))
   (let ((wash-face-p buffer-read-only))
     (gnus-with-article-headers
       ;; When displaying parts, this function can be called several times on
@@ -2431,7 +2431,7 @@ fill width."
 
 (defun article-display-x-face (&optional force)
   "Look for an X-Face header and display it if present."
-  (interactive (list 'force))
+  (command (gnus-article-mode gnus-summary-mode) (list 'force))
   (let ((wash-face-p buffer-read-only))        ;; When type `W f'
     (gnus-with-article-headers
       ;; Delete the old process, if any.
@@ -2493,7 +2493,7 @@ fill width."
 
 (defun article-decode-mime-words ()
   "Decode all MIME-encoded words in the article."
-  (interactive)
+  (command (gnus-article-mode gnus-summary-mode))
   (gnus-with-article-buffer
     (let ((inhibit-point-motion-hooks t)
          (mail-parse-charset gnus-newsgroup-charset)
@@ -2505,7 +2505,7 @@ fill width."
 (defun article-decode-charset (&optional prompt)
   "Decode charset-encoded text in the article.
 If PROMPT (the prefix), prompt for a coding system to use."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (let ((inhibit-point-motion-hooks t) (case-fold-search t)
        (inhibit-read-only t)
        (mail-parse-charset gnus-newsgroup-charset)
@@ -2627,7 +2627,7 @@ Mail-Reply-To: and Mail-Followup-To:."
 If FORCE, decode the article whether it is marked as quoted-printable
 or not.
 If READ-CHARSET, ask for a coding system."
-  (interactive (list 'force current-prefix-arg))
+  (command gnus-article-mode (list 'force current-prefix-arg))
   (save-excursion
     (let ((inhibit-read-only t) type charset)
       (if (gnus-buffer-live-p gnus-original-article-buffer)
@@ -2655,7 +2655,7 @@ If READ-CHARSET, ask for a coding system."
   "Translate a base64 article.
 If FORCE, decode the article whether it is marked as base64 not.
 If READ-CHARSET, ask for a coding system."
-  (interactive (list 'force current-prefix-arg))
+  (command gnus-article-mode (list 'force current-prefix-arg))
   (save-excursion
     (let ((inhibit-read-only t) type charset)
       (if (gnus-buffer-live-p gnus-original-article-buffer)
@@ -2687,7 +2687,7 @@ If READ-CHARSET, ask for a coding system."
 
 (defun article-decode-HZ ()
   "Translate a HZ-encoded article."
-  (interactive)
+  (command gnus-article-mode)
   (require 'rfc1843)
   (save-excursion
     (let ((inhibit-read-only t))
@@ -2695,7 +2695,7 @@ If READ-CHARSET, ask for a coding system."
 
 (defun article-unsplit-urls ()
   "Remove the newlines that some other mailers insert into URLs."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (let ((inhibit-read-only t))
       (goto-char (point-min))
@@ -2707,7 +2707,7 @@ If READ-CHARSET, ask for a coding system."
 
 (defun article-wash-html ()
   "Format an HTML article."
-  (interactive)
+  (command gnus-article-mode)
   (let ((handles nil)
        (inhibit-read-only t))
     (when (gnus-buffer-live-p gnus-original-article-buffer)
@@ -3041,7 +3041,7 @@ This command creates temporary files to pass HTML 
contents including
 images if any to the browser, and deletes them when exiting the group
 \(if you want)."
   ;; Cf. `mm-w3m-safe-url-regexp'
-  (interactive "P")
+  (command gnus-article-mode "P")
   (if arg
       (gnus-summary-show-article)
     (let ((gnus-visible-headers
@@ -3078,7 +3078,7 @@ images if any to the browser, and deletes them when 
exiting the group
 (defun article-hide-list-identifiers ()
   "Remove list identifiers from the Subject header.
 The `gnus-list-identifiers' variable specifies what to do."
-  (interactive)
+  (command gnus-article-mode)
   (let ((inhibit-point-motion-hooks t)
         (regexp (gnus-group-get-list-identifiers gnus-newsgroup-name))
         (inhibit-read-only t))
@@ -3100,7 +3100,7 @@ The `gnus-list-identifiers' variable specifies what to 
do."
   "Toggle hiding of any PEM headers and signatures in the current article.
 If given a negative prefix, always show; if given a positive prefix,
 always hide."
-  (interactive (gnus-article-hidden-arg))
+  (command gnus-article-mode (gnus-article-hidden-arg))
   (unless (gnus-article-check-hidden-text 'pem arg)
     (save-excursion
       (let ((inhibit-read-only t) end)
@@ -3126,7 +3126,7 @@ always hide."
 (defun article-strip-banner ()
   "Strip the banners specified by the `banner' group parameter and by
 `gnus-article-address-banner-alist'."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (save-restriction
       (let ((inhibit-point-motion-hooks t))
@@ -3175,7 +3175,7 @@ always hide."
 
 (defun article-babel ()
   "Translate article using an online translation service."
-  (interactive)
+  (command (gnus-article-mode gnus-summary-mode))
   (require 'babel)
   (gnus-with-article-buffer
     (when (article-goto-body)
@@ -3192,7 +3192,7 @@ always hide."
   "Hide the signature in the current article.
 If given a negative prefix, always show; if given a positive prefix,
 always hide."
-  (interactive (gnus-article-hidden-arg))
+  (command gnus-article-mode (gnus-article-hidden-arg))
   (unless (gnus-article-check-hidden-text 'signature arg)
     (save-excursion
       (save-restriction
@@ -3204,7 +3204,7 @@ always hide."
 
 (defun article-strip-headers-in-body ()
   "Strip offensive headers from bodies."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (article-goto-body)
     (let ((case-fold-search t))
@@ -3213,7 +3213,7 @@ always hide."
 
 (defun article-strip-leading-blank-lines ()
   "Remove all blank lines from the beginning of the article."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (let ((inhibit-point-motion-hooks t)
          (inhibit-read-only t))
@@ -3255,7 +3255,7 @@ Point is left at the beginning of the narrowed-to region."
 
 (defun article-strip-multiple-blank-lines ()
   "Replace consecutive blank lines with one empty line."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (let ((inhibit-point-motion-hooks t)
          (inhibit-read-only t))
@@ -3274,7 +3274,7 @@ Point is left at the beginning of the narrowed-to region."
 
 (defun article-strip-leading-space ()
   "Remove all white space from the beginning of the lines in the article."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (let ((inhibit-point-motion-hooks t)
          (inhibit-read-only t))
@@ -3284,7 +3284,7 @@ Point is left at the beginning of the narrowed-to region."
 
 (defun article-strip-trailing-space ()
   "Remove all white space from the end of the lines in the article."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (let ((inhibit-point-motion-hooks t)
          (inhibit-read-only t))
@@ -3294,14 +3294,14 @@ Point is left at the beginning of the narrowed-to 
region."
 
 (defun article-strip-blank-lines ()
   "Strip leading, trailing and multiple blank lines."
-  (interactive)
+  (command gnus-article-mode)
   (article-strip-leading-blank-lines)
   (article-remove-trailing-blank-lines)
   (article-strip-multiple-blank-lines))
 
 (defun article-strip-all-blank-lines ()
   "Strip all blank lines."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (let ((inhibit-point-motion-hooks t)
          (inhibit-read-only t))
@@ -3433,7 +3433,7 @@ lines forward."
   "Convert DATE date to TYPE in the current article.
 The default type is `ut'.  See `gnus-article-date-headers' for
 possible values."
-  (interactive (list 'ut t))
+  (command gnus-article-mode (list 'ut t))
   (let* ((case-fold-search t)
         (inhibit-read-only t)
         (inhibit-point-motion-hooks t)
@@ -3677,29 +3677,29 @@ possible values."
 
 (defun article-date-local (&optional highlight)
   "Convert the current article date to the local timezone."
-  (interactive (list t))
+  (command gnus-article-mode (list t))
   (article-date-ut 'local highlight))
 
 (defun article-date-english (&optional highlight)
   "Convert the current article date to something that is proper English."
-  (interactive (list t))
+  (command gnus-article-mode (list t))
   (article-date-ut 'english highlight))
 
 (defun article-date-original (&optional highlight)
   "Convert the current article date to what it was originally.
 This is only useful if you have used some other date conversion
 function and want to see what the date was before converting."
-  (interactive (list t))
+  (command gnus-article-mode (list t))
   (article-date-ut 'original highlight))
 
 (defun article-date-lapsed (&optional highlight)
   "Convert the current article date to time lapsed since it was sent."
-  (interactive (list t))
+  (command gnus-article-mode (list t))
   (article-date-ut 'lapsed highlight))
 
 (defun article-date-combined-lapsed (&optional highlight)
   "Convert the current article date to time lapsed since it was sent."
-  (interactive (list t))
+  (command gnus-article-mode (list t))
   (article-date-ut 'combined-lapsed highlight))
 
 (defun article-update-date-lapsed ()
@@ -3748,7 +3748,7 @@ function and want to see what the date was before 
converting."
   "Start a timer to update the Date headers in the article buffers.
 The numerical prefix says how frequently (in seconds) the function
 is to run."
-  (interactive "p")
+  (command gnus-article-mode "p")
   (unless n
     (setq n 1))
   (gnus-stop-date-timer)
@@ -3757,7 +3757,7 @@ is to run."
 
 (defun gnus-stop-date-timer ()
   "Stop the Date timer."
-  (interactive)
+  (command gnus-article-mode)
   (when article-lapsed-timer
     (cancel-timer article-lapsed-timer)
     (setq article-lapsed-timer nil)))
@@ -3765,12 +3765,12 @@ is to run."
 (defun article-date-user (&optional highlight)
   "Convert the current article date to the user-defined format.
 This format is defined by the `gnus-article-time-format' variable."
-  (interactive (list t))
+  (command gnus-article-mode (list t))
   (article-date-ut 'user-defined highlight))
 
 (defun article-date-iso8601 (&optional highlight)
   "Convert the current article date to ISO8601."
-  (interactive (list t))
+  (command gnus-article-mode (list t))
   (article-date-ut 'iso8601 highlight))
 
 (defmacro gnus-article-save-original-date (&rest forms)
@@ -3803,7 +3803,7 @@ This format is defined by the `gnus-article-time-format' 
variable."
 
 (defun article-remove-leading-whitespace ()
   "Remove excessive whitespace from all headers."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (save-restriction
       (let ((inhibit-read-only t))
@@ -3814,7 +3814,7 @@ This format is defined by the `gnus-article-time-format' 
variable."
 
 (defun article-emphasize (&optional arg)
   "Emphasize text according to `gnus-emphasis-alist'."
-  (interactive (gnus-article-hidden-arg))
+  (command gnus-article-mode (gnus-article-hidden-arg))
   (unless (gnus-article-check-hidden-text 'emphasis arg)
     (save-excursion
       (let ((alist (or
@@ -4247,7 +4247,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is
 (defun article-verify-x-pgp-sig ()
   "Verify X-PGP-Sig."
   ;; <https://ftp.isc.org/pub/pgpcontrol/FORMAT>
-  (interactive)
+  (command gnus-article-mode)
   (if (gnus-buffer-live-p gnus-original-article-buffer)
       (let ((sig (with-current-buffer gnus-original-article-buffer
                   (gnus-fetch-field "X-PGP-Sig")))
@@ -4321,7 +4321,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is
 
 (defun article-verify-cancel-lock ()
   "Verify Cancel-Lock header."
-  (interactive)
+  (command gnus-article-mode)
   (if (gnus-buffer-live-p gnus-original-article-buffer)
       (canlock-verify gnus-original-article-buffer)))
 
@@ -4752,7 +4752,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
 (defun gnus-sticky-article (arg)
   "Make the current article sticky.
 If a prefix ARG is given, ask for a name for this sticky article buffer."
-  (interactive "P")
+  (command (gnus-article-mode gnus-summary-mode) "P")
   (gnus-summary-show-thread)
   (gnus-summary-select-article nil nil 'pseudo)
   (let (new-art-buf-name)
@@ -4796,7 +4796,7 @@ If a prefix ARG is given, ask for a name for this sticky 
article buffer."
   "Kill the given sticky article BUFFER.
 If none is given, assume the current buffer and kill it if it has
 `gnus-sticky-article-mode'."
-  (interactive)
+  (command gnus-article-mode)
   (unless buffer
     (setq buffer (current-buffer)))
   (with-current-buffer buffer
@@ -4806,7 +4806,7 @@ If none is given, assume the current buffer and kill it 
if it has
 (defun gnus-kill-sticky-article-buffers (arg)
   "Kill all sticky article buffers.
 If a prefix ARG is given, ask for confirmation."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (dolist (buf (gnus-buffers))
     (with-current-buffer buf
       (and (derived-mode-p 'gnus-sticky-article-mode)
@@ -4948,7 +4948,7 @@ General format specifiers can also be used.  See Info node
 
 (defun gnus-mime-view-all-parts (&optional handles)
   "View all the MIME parts."
-  (interactive)
+  (command gnus-article-mode)
   (with-current-buffer gnus-article-buffer
     (let ((handles (or handles gnus-article-mime-handles))
          (mail-parse-charset gnus-newsgroup-charset)
@@ -4965,7 +4965,7 @@ General format specifiers can also be used.  See Info node
 
 (defun gnus-article-jump-to-part (n)
   "Jump to MIME part N."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (let ((parts (with-current-buffer gnus-article-buffer
                 (length gnus-article-mime-handle-alist))))
     (when (zerop parts)
@@ -5061,7 +5061,7 @@ and `gnus-mime-delete-part', and not provided at run-time 
normally."
 (defun gnus-mime-replace-part (file)
   "Replace MIME part under point with an external body."
   ;; Useful if file has already been saved to disk
-  (interactive
+  (command gnus-article-mode
    (list
     (read-file-name "Replace MIME part with file: "
                     (or mm-default-directory default-directory)
@@ -5074,7 +5074,7 @@ and `gnus-mime-delete-part', and not provided at run-time 
normally."
 (defun gnus-mime-save-part-and-strip (&optional file event)
   "Save the MIME part under point then replace it with an external body.
 If FILE is given, use it for the external part."
-  (interactive (list nil last-nonmenu-event))
+  (command gnus-article-mode (list nil last-nonmenu-event))
   (save-excursion
     (mouse-set-point event)
     (gnus-article-check-buffer)
@@ -5116,7 +5116,7 @@ The current article has a complicated MIME structure, 
giving up..."))
 (defun gnus-mime-delete-part (&optional event)
   "Delete the MIME part under point.
 Replace it with some information about the removed part."
-  (interactive (list last-nonmenu-event))
+  (command gnus-article-mode (list last-nonmenu-event))
   (mouse-set-point event)
   (gnus-article-check-buffer)
   (when (gnus-group-read-only-p)
@@ -5165,7 +5165,7 @@ Deleting parts may malfunction or destroy the article; 
continue? "))
 
 (defun gnus-mime-save-part (&optional event)
   "Save the MIME part under point."
-  (interactive (list last-nonmenu-event))
+  (command gnus-article-mode (list last-nonmenu-event))
   (mouse-set-point event)
   (gnus-article-check-buffer)
   (let ((data (get-text-property (point) 'gnus-data)))
@@ -5175,7 +5175,7 @@ Deleting parts may malfunction or destroy the article; 
continue? "))
 (defun gnus-mime-pipe-part (&optional cmd event)
   "Pipe the MIME part under point to a process.
 Use CMD as the process."
-  (interactive (list nil last-nonmenu-event))
+  (command gnus-article-mode (list nil last-nonmenu-event))
   (mouse-set-point event)
   (gnus-article-check-buffer)
   (let ((data (get-text-property (point) 'gnus-data)))
@@ -5184,7 +5184,7 @@ Use CMD as the process."
 
 (defun gnus-mime-view-part (&optional event)
   "Interactively choose a viewing method for the MIME part under point."
-  (interactive (list last-nonmenu-event))
+  (command gnus-article-mode (list last-nonmenu-event))
   (save-excursion
     (mouse-set-point event)
     (gnus-article-check-buffer)
@@ -5214,7 +5214,7 @@ Use CMD as the process."
   "Choose a MIME media type, and view the part as such.
 If non-nil, PRED is a predicate to use during completion to limit the
 available media-types."
-  (interactive (list nil nil last-nonmenu-event))
+  (command gnus-article-mode (list nil nil last-nonmenu-event))
   (save-excursion
     (if event (mouse-set-point event))
     (unless mime-type
@@ -5253,7 +5253,7 @@ available media-types."
   "Put the MIME part under point into a new buffer.
 If `auto-compression-mode' is enabled, compressed files like .gz and .bz2
 are decompressed."
-  (interactive (list nil current-prefix-arg last-nonmenu-event))
+  (command gnus-article-mode (list nil current-prefix-arg last-nonmenu-event))
   (mouse-set-point event)
   (gnus-article-check-buffer)
   (unless handle
@@ -5308,7 +5308,7 @@ are decompressed."
 
 (defun gnus-mime-print-part (&optional handle filename event)
   "Print the MIME part under point."
-  (interactive
+  (command gnus-article-mode
    (list nil (ps-print-preprint current-prefix-arg) last-nonmenu-event))
   (save-excursion
     (mouse-set-point event)
@@ -5337,7 +5337,7 @@ are decompressed."
 (defun gnus-mime-inline-part (&optional handle arg event)
   "Insert the MIME part under point into the current buffer.
 Compressed files like .gz and .bz2 are decompressed."
-  (interactive (list nil current-prefix-arg last-nonmenu-event))
+  (command gnus-article-mode (list nil current-prefix-arg last-nonmenu-event))
   (if event (mouse-set-point event))
   (gnus-article-check-buffer)
   (let* ((inhibit-read-only t)
@@ -5435,7 +5435,7 @@ CHARSET may either be a string or a symbol."
 (defun gnus-mime-view-part-as-charset (&optional handle arg event)
   "Insert the MIME part under point into the current buffer using the
 specified charset."
-  (interactive (list nil current-prefix-arg last-nonmenu-event))
+  (command gnus-article-mode (list nil current-prefix-arg last-nonmenu-event))
   (save-excursion
     (mouse-set-point event)
     (gnus-article-check-buffer)
@@ -5475,7 +5475,7 @@ specified charset."
 
 (defun gnus-mime-view-part-externally (&optional handle event)
   "View the MIME part under point with an external viewer."
-  (interactive (list nil last-nonmenu-event))
+  (command gnus-article-mode (list nil last-nonmenu-event))
   (save-excursion
     (mouse-set-point event)
     (gnus-article-check-buffer)
@@ -5497,7 +5497,7 @@ specified charset."
 (defun gnus-mime-view-part-internally (&optional handle event)
   "View the MIME part under point with an internal viewer.
 If no internal viewer is available, use an external viewer."
-  (interactive (list nil last-nonmenu-event))
+  (command gnus-article-mode (list nil last-nonmenu-event))
   (save-excursion
     (mouse-set-point event)
     (gnus-article-check-buffer)
@@ -5517,7 +5517,7 @@ If no internal viewer is available, use an external 
viewer."
 
 (defun gnus-mime-action-on-part (&optional action)
   "Do something with the MIME attachment at (point)."
-  (interactive
+  (command gnus-article-mode
    (list (gnus-completing-read "Action" (mapcar #'car gnus-mime-action-alist) 
t)))
   (gnus-article-check-buffer)
   (let ((action-pair (assoc action gnus-mime-action-alist)))
@@ -5611,62 +5611,62 @@ If INTERACTIVE, call FUNCTION interactively."
 
 (defun gnus-article-pipe-part (n)
   "Pipe MIME part N, which is the numerical prefix."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (gnus-article-part-wrapper n 'mm-pipe-part))
 
 (defun gnus-article-save-part (n)
   "Save MIME part N, which is the numerical prefix."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (gnus-article-part-wrapper n 'mm-save-part))
 
 (defun gnus-article-interactively-view-part (n)
   "View MIME part N interactively, which is the numerical prefix."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (gnus-article-part-wrapper n 'mm-interactively-view-part))
 
 (defun gnus-article-copy-part (n)
   "Copy MIME part N, which is the numerical prefix."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (gnus-article-part-wrapper n 'gnus-mime-copy-part))
 
 (defun gnus-article-view-part-as-charset (n)
   "View MIME part N using a specified charset.
 N is the numerical prefix."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (gnus-article-part-wrapper n 'gnus-mime-view-part-as-charset))
 
 (defun gnus-article-view-part-externally (n)
   "View MIME part N externally, which is the numerical prefix."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (gnus-article-part-wrapper n 'gnus-mime-view-part-externally))
 
 (defun gnus-article-inline-part (n)
   "Inline MIME part N, which is the numerical prefix."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (gnus-article-part-wrapper n 'gnus-mime-inline-part))
 
 (defun gnus-article-save-part-and-strip (n)
   "Save MIME part N and replace it with an external body.
 N is the numerical prefix."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (gnus-article-part-wrapper n 'gnus-mime-save-part-and-strip t))
 
 (defun gnus-article-replace-part (n)
   "Replace MIME part N with an external body.
 N is the numerical prefix."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (gnus-article-part-wrapper n 'gnus-mime-replace-part t t))
 
 (defun gnus-article-delete-part (n)
   "Delete MIME part N and add some information about the removed part.
 N is the numerical prefix."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (gnus-article-part-wrapper n 'gnus-mime-delete-part t))
 
 (defun gnus-article-view-part-as-type (n)
   "Choose a MIME media type, and view part N as such.
 N is the numerical prefix."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (gnus-article-part-wrapper n 'gnus-mime-view-part-as-type t))
 
 (defun gnus-article-mime-match-handle-first (condition)
@@ -5693,7 +5693,7 @@ N is the numerical prefix."
   "View MIME part N, which is the numerical prefix.
 If the part is already shown, hide the part.  If N is nil, view
 all parts."
-  (interactive "P")
+  (command (gnus-article-mode gnus-summary-mode) "P")
   (with-current-buffer gnus-article-buffer
     (or (numberp n) (setq n (gnus-article-mime-match-handle-first
                             gnus-article-mime-match-handle-function)))
@@ -6383,7 +6383,7 @@ Provided for backwards compatibility."
 This function toggles the display when called interactively.  Note that
 buttons to be added to the header are only the ones that aren't inlined
 in the body.  Use `gnus-header-face-alist' to highlight buttons."
-  (interactive (list t))
+  (command (gnus-article-mode gnus-summary-mode) (list t))
   (gnus-with-article-buffer
     (let ((case-fold-search t) buttons st)
       (save-excursion
@@ -6488,7 +6488,7 @@ the coding cookie."
 (defun gnus-narrow-to-page (&optional arg)
   "Narrow the article buffer to a page.
 If given a numerical ARG, move forward ARG pages."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (setq arg (if arg (prefix-numeric-value arg) 0))
   (with-current-buffer gnus-article-buffer
     (widen)
@@ -6541,7 +6541,7 @@ If given a numerical ARG, move forward ARG pages."
 
 (defun gnus-article-goto-next-page ()
   "Show the next page of the article."
-  (interactive)
+  (command gnus-article-mode)
   (when (gnus-article-next-page)
     (goto-char (point-min))
     (gnus-article-read-summary-keys nil ?n)))
@@ -6549,7 +6549,7 @@ If given a numerical ARG, move forward ARG pages."
 
 (defun gnus-article-goto-prev-page ()
   "Show the previous page of the article."
-  (interactive)
+  (command gnus-article-mode)
   (if (save-restriction (widen) (bobp)) ;; Real beginning-of-buffer?
       (gnus-article-read-summary-keys nil ?p)
     (gnus-article-prev-page nil)))
@@ -6572,7 +6572,7 @@ If given a numerical ARG, move forward ARG pages."
   "Show the next page of the current article.
 If end of article, return non-nil.  Otherwise return nil.
 Argument LINES specifies lines to be scrolled up."
-  (interactive "p")
+  (command gnus-article-mode "p")
   (move-to-window-line (- -1 scroll-margin))
   (if (and (not (and gnus-article-over-scroll
                     (> (count-lines (window-start) (point-max))
@@ -6628,7 +6628,7 @@ specifies."
 (defun gnus-article-prev-page (&optional lines)
   "Show previous page of current article.
 Argument LINES specifies lines to be scrolled down."
-  (interactive "p")
+  (command gnus-article-mode "p")
   (move-to-window-line 0)
   (if (and gnus-page-broken
           (bobp)
@@ -6669,7 +6669,7 @@ not have a face in `gnus-article-boring-faces'."
 
 (defun gnus-article-refer-article ()
   "Read article specified by message-id around point."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (re-search-backward "[ \t]\\|^" (point-at-bol) t)
     (re-search-forward "<?news:<?\\|<" (point-at-eol) t)
@@ -6681,7 +6681,7 @@ not have a face in `gnus-article-boring-faces'."
 
 (defun gnus-article-show-summary ()
   "Reconfigure windows to show summary buffer."
-  (interactive)
+  (command gnus-article-mode)
   (if (not (gnus-buffer-live-p gnus-summary-buffer))
       (error "There is no summary buffer for this article buffer")
     (gnus-article-set-globals)
@@ -6691,7 +6691,7 @@ not have a face in `gnus-article-boring-faces'."
 
 (defun gnus-article-describe-briefly ()
   "Describe article mode commands briefly."
-  (interactive)
+  (command gnus-article-mode)
   (gnus-message 6 "%s" (substitute-command-keys 
"\\<gnus-article-mode-map>\\[gnus-article-goto-next-page]:Next page     
\\[gnus-article-goto-prev-page]:Prev page  \\[gnus-article-show-summary]:Show 
summary  \\[gnus-info-find-node]:Run Info  
\\[gnus-article-describe-briefly]:This help")))
 
 (defun gnus-article-check-buffer ()
@@ -6703,7 +6703,7 @@ not have a face in `gnus-article-boring-faces'."
 
 (defun gnus-article-read-summary-keys (&optional _arg key not-restore-window)
   "Read a summary buffer key sequence and execute it from the article buffer."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (gnus-article-check-buffer)
   (let ((nosaves
         '("q" "Q" "r" "m"  "a" "f" "WDD" "WDW"
@@ -6814,14 +6814,14 @@ not have a face in `gnus-article-boring-faces'."
            (ding))))))))
 
 (defun gnus-article-read-summary-send-keys ()
-  (interactive)
+  (command gnus-article-mode)
   (let ((unread-command-events (list ?S)))
     (gnus-article-read-summary-keys)))
 
 (defun gnus-article-describe-key (key)
   "Display documentation of the function invoked by KEY.
 KEY is a string or a vector."
-  (interactive (list (let ((cursor-in-echo-area t))
+  (command gnus-article-mode (list (let ((cursor-in-echo-area t))
                       (read-key-sequence "Describe key: "))))
   (gnus-article-check-buffer)
   (if (memq (key-binding key t) '(gnus-article-read-summary-keys
@@ -6842,7 +6842,7 @@ KEY is a string or a vector."
 (defun gnus-article-describe-key-briefly (key &optional insert)
   "Display documentation of the function invoked by KEY.
 KEY is a string or a vector."
-  (interactive (list (let ((cursor-in-echo-area t))
+  (command gnus-article-mode (list (let ((cursor-in-echo-area t))
                       (read-key-sequence "Describe key: "))
                     current-prefix-arg))
   (gnus-article-check-buffer)
@@ -6871,7 +6871,7 @@ KEY is a string or a vector."
   "Show a list of all defined keys, and their definitions.
 The optional argument PREFIX, if non-nil, should be a key sequence;
 then we display only bindings that start with that prefix."
-  (interactive)
+  (command gnus-article-mode)
   (gnus-article-check-buffer)
   (let ((keymap (copy-keymap gnus-article-mode-map))
        (map (copy-keymap gnus-article-send-map))
@@ -6930,7 +6930,7 @@ then we display only bindings that start with that 
prefix."
   "Start composing a reply mail to the current message.
 The text in the region will be yanked.  If the region isn't active,
 the entire article will be yanked."
-  (interactive)
+  (command gnus-article-mode)
   (let ((article (cdr gnus-article-current))
        contents)
     (if (not (and transient-mark-mode mark-active))
@@ -6948,14 +6948,14 @@ the entire article will be yanked."
   "Start composing a wide reply mail to the current message.
 The text in the region will be yanked.  If the region isn't active,
 the entire article will be yanked."
-  (interactive)
+  (command gnus-article-mode)
   (gnus-article-reply-with-original t))
 
 (defun gnus-article-followup-with-original ()
   "Compose a followup to the current article.
 The text in the region will be yanked.  If the region isn't active,
 the entire article will be yanked."
-  (interactive)
+  (command gnus-article-mode)
   (let ((article (cdr gnus-article-current))
        contents)
       (if (not (and transient-mark-mode mark-active))
@@ -6974,7 +6974,8 @@ the entire article will be yanked."
 This means that signatures, cited text and (some) headers will be
 hidden.
 If given a prefix, show the hidden text instead."
-  (interactive (append (gnus-article-hidden-arg) (list 'force)))
+  (command (gnus-article-mode gnus-summary-mode)
+          (append (gnus-article-hidden-arg) (list 'force)))
   (gnus-with-article-buffer
     (article-hide-headers arg)
     (article-hide-list-identifiers)
@@ -7269,7 +7270,7 @@ This is an extended text-mode.
 This will have permanent effect only in mail groups.
 If FORCE is non-nil, allow editing of articles even in read-only
 groups."
-  (interactive "P")
+  (command (gnus-article-mode gnus-summary-mode) "P")
   (when (and (not force)
             (gnus-group-read-only-p))
     (error "The current newsgroup does not support article editing"))
@@ -7302,7 +7303,7 @@ groups."
 
 (defun gnus-article-edit-done (&optional arg)
   "Update the article edits and exit."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (let ((func gnus-article-edit-done-function)
        (buf (current-buffer))
        (start (window-start))
@@ -7336,7 +7337,7 @@ groups."
 
 (defun gnus-article-edit-exit ()
   "Exit the article editing without updating."
-  (interactive)
+  (command gnus-article-mode)
   (when (or (not (buffer-modified-p))
            (yes-or-no-p "Article modified; kill anyway? "))
     (let ((curbuf (current-buffer))
@@ -7357,7 +7358,7 @@ groups."
 
 (defun gnus-article-edit-full-stops ()
   "Interactively repair spacing at end of sentences."
-  (interactive)
+  (command gnus-article-mode)
   (save-excursion
     (goto-char (point-min))
     (search-forward-regexp "^$" nil t)
@@ -7875,7 +7876,7 @@ HEADER is a regexp to match a header.  For a fuller 
explanation, see
   "Check text under the mouse pointer for a callback function.
 If the text under the mouse pointer has a `gnus-callback' property,
 call it with the value of the `gnus-data' text property."
-  (interactive "e")
+  (command gnus-article-mode "e")
   (set-buffer (window-buffer (posn-window (event-start event))))
   (let* ((pos (posn-point (event-start event)))
         (data (get-text-property pos 'gnus-data))
@@ -7888,7 +7889,7 @@ call it with the value of the `gnus-data' text property."
   "Check text at point for a callback function.
 If the text at point has a `gnus-callback' property,
 call it with the value of the `gnus-data' text property."
-  (interactive (list last-nonmenu-event))
+  (command gnus-article-mode (list last-nonmenu-event))
   (save-excursion
     (when event
       (mouse-set-point event))
@@ -7902,7 +7903,7 @@ This function calls `gnus-article-highlight-headers',
 `gnus-article-highlight-citation',
 `gnus-article-highlight-signature', and `gnus-article-add-buttons' to
 do the highlighting.  See the documentation for those functions."
-  (interactive (list 'force))
+  (command gnus-article-mode (list 'force))
   (gnus-article-highlight-headers)
   (gnus-article-highlight-citation force)
   (gnus-article-highlight-signature)
@@ -7914,14 +7915,14 @@ do the highlighting.  See the documentation for those 
functions."
 This function calls `gnus-article-highlight-headers',
 `gnus-article-highlight-signature', and `gnus-article-add-buttons' to
 do the highlighting.  See the documentation for those functions."
-  (interactive (list 'force))
+  (command gnus-article-mode (list 'force))
   (gnus-article-highlight-headers)
   (gnus-article-highlight-signature)
   (gnus-article-add-buttons))
 
 (defun gnus-article-highlight-headers ()
   "Highlight article headers as specified by `gnus-header-face-alist'."
-  (interactive)
+  (command (gnus-article-mode gnus-summary-mode))
   (gnus-with-article-headers
     (let (regexp header-face field-face from hpoints fpoints)
       (dolist (entry gnus-header-face-alist)
@@ -7955,7 +7956,7 @@ do the highlighting.  See the documentation for those 
functions."
   "Highlight the signature in an article.
 It does this by highlighting everything after
 `gnus-signature-separator' using the face `gnus-signature'."
-  (interactive)
+  (command (gnus-article-mode gnus-summary-mode))
   (gnus-with-article-buffer
     (let ((inhibit-point-motion-hooks t))
       (save-restriction
@@ -7978,7 +7979,7 @@ It does this by highlighting everything after
   "Find external references in the article and make buttons of them.
 \"External references\" are things like Message-IDs and URLs, as
 specified by `gnus-button-alist'."
-  (interactive)
+  (command (gnus-article-mode gnus-summary-mode))
   (gnus-with-article-buffer
     (let ((inhibit-point-motion-hooks t)
          (case-fold-search t)
@@ -8072,7 +8073,7 @@ url is put as the `gnus-button-url' overlay property on 
the button."
 ;; Add buttons to the head of an article.
 (defun gnus-article-add-buttons-to-head ()
   "Add buttons to the head of the article."
-  (interactive)
+  (command (gnus-article-mode gnus-summary-mode))
   (gnus-with-article-headers
     (let (beg end)
       (dolist (entry gnus-header-button-alist)
@@ -8120,7 +8121,7 @@ url is put as the `gnus-button-url' overlay property on 
the button."
 
 (defun gnus-article-copy-string ()
   "Copy the string in the button to the kill ring."
-  (interactive)
+  (command gnus-article-mode)
   (gnus-article-check-buffer)
   (let ((data (get-text-property (point) 'gnus-string)))
     (when data
@@ -8236,7 +8237,7 @@ url is put as the `gnus-button-url' overlay property on 
the button."
 
 (defun gnus-button-patch (library line)
   "Visit an Emacs Lisp library LIBRARY on line LINE."
-  (interactive)
+  (command gnus-article-mode)
   (let ((file (locate-library (file-name-nondirectory library))))
     (unless file
       (error "Couldn't find library %s" library))
@@ -8428,7 +8429,7 @@ url is put as the `gnus-button-url' overlay property on 
the button."
 
 (defun gnus-button-next-page (&optional _args _more-args)
   "Go to the next page."
-  (interactive)
+  (command gnus-article-mode)
   (let ((win (selected-window)))
     (select-window (gnus-get-buffer-window gnus-article-buffer t))
     (gnus-article-next-page)
@@ -8436,7 +8437,7 @@ url is put as the `gnus-button-url' overlay property on 
the button."
 
 (defun gnus-button-prev-page (&optional _args _more-args)
   "Go to the prev page."
-  (interactive)
+  (command gnus-article-mode)
   (let ((win (selected-window)))
     (select-window (gnus-get-buffer-window gnus-article-buffer t))
     (gnus-article-prev-page)
@@ -8460,7 +8461,7 @@ url is put as the `gnus-button-url' overlay property on 
the button."
 
 (defun gnus-article-button-next-page (_arg)
   "Go to the next page."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (let ((win (selected-window)))
     (select-window (gnus-get-buffer-window gnus-article-buffer t))
     (gnus-article-next-page)
@@ -8468,7 +8469,7 @@ url is put as the `gnus-button-url' overlay property on 
the button."
 
 (defun gnus-article-button-prev-page (_arg)
   "Go to the prev page."
-  (interactive "P")
+  (command gnus-article-mode "P")
   (let ((win (selected-window)))
     (select-window (gnus-get-buffer-window gnus-article-buffer t))
     (gnus-article-prev-page)
@@ -8598,7 +8599,7 @@ For example:
 
 (defun gnus-article-encrypt-body (protocol &optional n)
   "Encrypt the article body."
-  (interactive
+  (command gnus-article-mode
    (list
     (or gnus-article-encrypt-protocol
        (gnus-completing-read "Encrypt protocol"
@@ -8728,7 +8729,7 @@ For example:
 
 (defun gnus-mime-security-button-menu (event prefix)
   "Construct a context-sensitive menu of security commands."
-  (interactive "e\nP")
+  (command gnus-article-mode "e\nP")
   (save-window-excursion
     (let ((pos (event-start event)))
       (select-window (posn-window pos))
@@ -8885,12 +8886,12 @@ For example:
 
 (defun gnus-mime-security-save-part ()
   "Save the security part under point."
-  (interactive)
+  (command gnus-article-mode)
   (gnus-mime-security-run-function 'mm-save-part))
 
 (defun gnus-mime-security-pipe-part ()
   "Pipe the security part under point to a process."
-  (interactive)
+  (command gnus-article-mode)
   (gnus-mime-security-run-function 'mm-pipe-part))
 
 (provide 'gnus-art)
diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el
index bc41d5b..be7fb34 100644
--- a/lisp/gnus/gnus-bookmark.el
+++ b/lisp/gnus/gnus-bookmark.el
@@ -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)
+  (command (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)
+  (command 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)
+  (command 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)
+  (command 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")
+  (command gnus-bookmark-bmenu-mode "P")
   (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)
+  (command 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)
+  (command 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)
+  (command 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)
+  (command 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")
+  (command gnus-bookmark-bmenu-mode "e")
   (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)
+  (command 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)
+  (command gnus-bookmark-bmenu-mode)
   (message "Deleting Gnus bookmarks...")
   (let ((hide-em gnus-bookmark-bmenu-toggle-infos)
         (o-point  (point))
diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el
index 5ed7319..0e87c84 100644
--- a/lisp/gnus/gnus-cache.el
+++ b/lisp/gnus/gnus-cache.el
@@ -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")
+  (command gnus-summary-mode "P")
   (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")
+  (command gnus-summary-mode "P")
   (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)
+  (command 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)
+  (command gnus-summary-mode)
   (let ((gnus-verbose (max 6 gnus-verbose)))
     (if gnus-newsgroup-cached
        (progn
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el
index 96f1a7d..c163c04 100644
--- a/lisp/gnus/gnus-cite.el
+++ b/lisp/gnus/gnus-cite.el
@@ -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))
+  (command (gnus-article-mode gnus-summary-mode) (list 'force))
   (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")
+  (command (gnus-article-mode gnus-summary-mode) "P")
   (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)))
+  (command (gnus-article-mode gnus-summary-mode)
+          (append (gnus-article-hidden-arg) (list 'force)))
   (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,7 @@ 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)))
+  (command (gnus-article-mode gnus-summary-mode) (append 
(gnus-article-hidden-arg) '(force)))
   (with-current-buffer gnus-article-buffer
     (gnus-delete-wash-type 'cite)
     (unless (gnus-article-check-hidden-text 'cite arg)
@@ -689,7 +690,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)
+  (command (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
diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el
index d8f48b1..fa9e86f 100644
--- a/lisp/gnus/gnus-cus.el
+++ b/lisp/gnus/gnus-cus.el
@@ -337,7 +337,7 @@ 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)))
+  (command gnus-group-mode (list (gnus-group-group-name) 
(gnus-group-topic-name)))
   (let (info
        (types (mapcar (lambda (entry)
                         `(cons :format "%v%h\n"
@@ -485,7 +485,7 @@ form, but who cares?"
 
 (defun gnus-group-customize-done (&rest _ignore)
   "Apply changes and bury the buffer."
-  (interactive)
+  (command gnus-custom-mode)
   (let ((params (widget-value gnus-custom-params)))
     (if gnus-custom-topic
        (gnus-topic-set-parameters gnus-custom-topic params)
@@ -829,7 +829,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))
+  (command gnus-summary-mode (list gnus-current-score-file))
   (unless file
     (error "No score file for %s" gnus-newsgroup-name))
   (let ((scores (gnus-score-load file))
@@ -1000,7 +1000,7 @@ articles in the thread.
 
 (defun gnus-agent-customize-category (category)
   "Edit the CATEGORY."
-  (interactive (list (gnus-category-name)))
+  (command gnus-custom-mode (list (gnus-category-name)))
   (let ((info (assq category gnus-category-alist))
         (defaults (list nil '(agent-predicate . false)
                         (cons 'agent-enable-expiration
diff --git a/lisp/gnus/gnus-delay.el b/lisp/gnus/gnus-delay.el
index 0cee01b..cbd3425 100644
--- a/lisp/gnus/gnus-delay.el
+++ b/lisp/gnus/gnus-delay.el
@@ -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)))
+  (command message-mode
+          (list (read-string
+                 "Target date (YYYY-MM-DD), time (hh:mm), or length of delay 
(units in [mhdwMY]): "
+                 gnus-delay-default-delay)))
   ;; Allow spell checking etc.
   (run-hooks 'message-send-hook)
   (let (num unit year month day hour minute deadline) ;; days
diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el
index 5270564..8e250ba 100644
--- a/lisp/gnus/gnus-diary.el
+++ b/lisp/gnus/gnus-diary.el
@@ -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")
+  (command gnus-summary-mode "P")
   (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")
+  (command gnus-summary-mode "P")
   (save-excursion
     (mapcar
      (lambda (head)
diff --git a/lisp/gnus/gnus-dired.el b/lisp/gnus/gnus-dired.el
index ca2d57d..b6a6f89 100644
--- a/lisp/gnus/gnus-dired.el
+++ b/lisp/gnus/gnus-dired.el
@@ -118,7 +118,8 @@ See `mail-user-agent' for more information."
   "Attach dired's marked files to a gnus message composition.
 If called non-interactively, FILES-TO-ATTACH should be a list of
 filenames."
-  (interactive
+  (command
+   dired-mode
    (list
     (delq nil
          (mapcar
@@ -176,9 +177,10 @@ filenames."
 (defun gnus-dired-find-file-mailcap (&optional file-name arg)
   "In dired, visit FILE-NAME according to the mailcap file.
 If ARG is non-nil, open it in a new buffer."
-  (interactive (list
-               (file-name-sans-versions (dired-get-filename) t)
-               current-prefix-arg))
+  (command dired-mode
+          (list
+           (file-name-sans-versions (dired-get-filename) t)
+           current-prefix-arg))
   (mailcap-parse-mailcaps)
   (if (file-exists-p file-name)
       (let (mime-type method)
@@ -214,9 +216,10 @@ optional argument PRINT-TO is nil, send the image to the 
printer.
 If PRINT-TO is a string, save the PostScript image in a file with
 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)))
+  (command dired-mode
+          (list
+           (file-name-sans-versions (dired-get-filename) t)
+           (ps-print-preprint current-prefix-arg)))
   (mailcap-parse-mailcaps)
   (cond
    ((file-directory-p file-name)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 456e7b0..dc0cc78 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -3479,7 +3479,7 @@ marks of articles."
 ;; Various summary mode internalish functions.
 
 (defun gnus-mouse-pick-article (e)
-  (interactive "e")
+  (command gnus-summary-mode "e")
   (mouse-set-point e)
   (gnus-summary-next-page nil t))
 
@@ -4219,7 +4219,7 @@ If SELECT-ARTICLES, only select those articles from 
GROUP."
 
 (defun gnus-summary-prepare ()
   "Generate the summary buffer."
-  (interactive)
+  (command gnus-summary-mode)
   (let ((inhibit-read-only t))
     (erase-buffer)
     (setq gnus-newsgroup-data nil
@@ -4268,7 +4268,7 @@ If SELECT-ARTICLES, only select those articles from 
GROUP."
 
 (defun gnus-summary-simplify-subject-query ()
   "Query where the respool algorithm would put this article."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-select-article)
   (message "%s" (gnus-general-simplify-subject 
(gnus-summary-article-subject))))
 
@@ -6671,19 +6671,19 @@ executed with point over the summary line of the 
articles."
 
 (defun gnus-summary-save-process-mark ()
   "Push the current set of process marked articles on the stack."
-  (interactive)
+  (command gnus-summary-mode)
   (push (copy-sequence gnus-newsgroup-processable)
        gnus-newsgroup-process-stack))
 
 (defun gnus-summary-kill-process-mark ()
   "Push the current set of process marked articles on the stack and unmark."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-save-process-mark)
   (gnus-summary-unmark-all-processable))
 
 (defun gnus-summary-yank-process-mark ()
   "Pop the last process mark state off the stack and restore it."
-  (interactive)
+  (command gnus-summary-mode)
   (unless gnus-newsgroup-process-stack
     (error "Empty mark stack"))
   (gnus-summary-process-mark-set (pop gnus-newsgroup-process-stack)))
@@ -6818,7 +6818,7 @@ articles with that subject.  If BACKWARD, search backward 
instead."
 (defun gnus-recenter (&optional n)
   "Center point in window and redisplay frame.
 Also do horizontal recentering."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (when (and gnus-auto-center-summary
             (not (eq gnus-auto-center-summary 'vertical)))
     (gnus-horizontal-recenter))
@@ -6852,7 +6852,7 @@ If `gnus-auto-center-summary' is nil, or the article 
buffer isn't
 displayed, no centering will be performed."
   ;; Suggested by earle@mahendo.JPL.NASA.GOV (Greg Earle).
   ;; Recenter only when requested.  Suggested by popovich@park.cs.columbia.edu.
-  (interactive)
+  (command gnus-summary-mode)
   ;; The user has to want it.
   (when gnus-auto-center-summary
     (let* ((top (cond ((< (window-height) 4) 0)
@@ -7029,7 +7029,7 @@ displayed, no centering will be performed."
   "Reconfigure windows to show the article buffer.
 If `gnus-widen-article-window' is set, show only the article
 buffer."
-  (interactive)
+  (command gnus-summary-mode)
   (if (not (gnus-buffer-live-p gnus-article-buffer))
       (error "There is no article buffer for this summary buffer")
     (or (get-buffer-window gnus-article-buffer)
@@ -7052,7 +7052,7 @@ buffer."
 
 (defun gnus-summary-universal-argument (arg)
   "Perform any operation on all articles that are process/prefixed."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (let ((articles (gnus-summary-work-articles arg))
        func article)
     (if (eq
@@ -7095,7 +7095,7 @@ insertion from another group.  If there's no such then 
return a dummy 0."
 (defun gnus-summary-reselect-current-group (&optional all rescan)
   "Exit and then reselect the current newsgroup.
 The prefix argument ALL means to select all articles."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (when (gnus-ephemeral-group-p gnus-newsgroup-name)
     (error "Ephemeral groups can't be reselected"))
   (let ((current-subject (gnus-summary-find-for-reselect))
@@ -7113,7 +7113,7 @@ The prefix argument ALL means to select all articles."
 
 (defun gnus-summary-rescan-group (&optional all)
   "Exit the newsgroup, ask for new articles, and select the newsgroup."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (let ((config gnus-current-window-configuration))
     (gnus-summary-reselect-current-group all t)
     (gnus-configure-windows config)
@@ -7168,7 +7168,7 @@ The prefix argument ALL means to select all articles."
 
 (defun gnus-summary-make-group-from-search ()
   "Make a persistent group from the current ephemeral search group."
-  (interactive)
+  (command gnus-summary-mode)
   (if (not (gnus-nnselect-group-p gnus-newsgroup-name))
       (gnus-message 3 "%s is not a search group" gnus-newsgroup-name)
     (let ((name (gnus-read-group "Group name: ")))
@@ -7185,7 +7185,7 @@ The prefix argument ALL means to select all articles."
   "Save the current number of read/marked articles in the dribble buffer.
 The dribble buffer will then be saved.
 If FORCE (the prefix), also save the .newsrc file(s)."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-update-info t)
   (if force
       (gnus-save-newsrc-file)
@@ -7197,7 +7197,7 @@ If FORCE (the prefix), also save the .newsrc file(s)."
 (defun gnus-summary-exit (&optional temporary leave-hidden)
   "Exit reading current newsgroup, and then return to group selection mode.
 `gnus-exit-group-hook' is called with no arguments if that value is non-nil."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-set-global-variables)
   (when (gnus-buffer-live-p gnus-article-buffer)
     (with-current-buffer gnus-article-buffer
@@ -7303,7 +7303,7 @@ If FORCE (the prefix), also save the .newsrc file(s)."
 (defalias 'gnus-summary-quit 'gnus-summary-exit-no-update)
 (defun gnus-summary-exit-no-update (&optional no-questions)
   "Quit reading current newsgroup without updating read article info."
-  (interactive)
+  (command gnus-summary-mode)
   (let* ((group gnus-newsgroup-name)
         (gnus-group-is-exiting-p t)
         (gnus-group-is-exiting-without-update-p t)
@@ -7457,7 +7457,7 @@ The state which existed when entering the ephemeral is 
reset."
 
 (defun gnus-summary-wake-up-the-dead (&rest _)
   "Wake up the dead summary buffer."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-dead-summary-mode -1)
   (let ((name (buffer-name)))
     (when (string-match "Dead " name)
@@ -7470,12 +7470,12 @@ The state which existed when entering the ephemeral is 
reset."
 ;; Suggested by Per Abrahamsen <amanda@iesd.auc.dk>.
 (defun gnus-summary-describe-group (&optional force)
   "Describe the current newsgroup."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-group-describe-group force gnus-newsgroup-name))
 
 (defun gnus-summary-describe-briefly ()
   "Describe summary mode commands briefly."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-message 6 "%s" (substitute-command-keys 
"\\<gnus-summary-mode-map>\\[gnus-summary-next-page]:Select  
\\[gnus-summary-next-unread-article]:Forward  
\\[gnus-summary-prev-unread-article]:Backward  \\[gnus-summary-exit]:Exit  
\\[gnus-info-find-node]:Run Info  \\[gnus-summary-describe-briefly]:This 
help")))
 
 ;; Walking around group mode buffer from summary mode.
@@ -7485,7 +7485,7 @@ The state which existed when entering the ephemeral is 
reset."
 If prefix argument NO-ARTICLE is non-nil, no article is selected
 initially.  If TARGET-GROUP, go to this group.  If BACKWARD, go to
 previous group instead."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   ;; Stop pre-fetching.
   (gnus-async-halt-prefetch)
   (let ((current-group gnus-newsgroup-name)
@@ -7531,7 +7531,7 @@ previous group instead."
 (defun gnus-summary-prev-group (&optional no-article)
   "Exit current newsgroup and then select previous unread newsgroup.
 If prefix argument NO-ARTICLE is non-nil, no article is selected initially."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-next-group no-article nil t))
 
 ;; Walking around summary lines.
@@ -7542,7 +7542,7 @@ If UNREAD is non-nil, the article should be unread.
 If UNDOWNLOADED is non-nil, the article should be undownloaded.
 If UNSEEN is non-nil, the article should be unseen as well as unread.
 Returns the article selected or nil if there are no matching articles."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (cond
    ;; Empty summary.
    ((null gnus-newsgroup-data)
@@ -7594,7 +7594,7 @@ If N is negative, go to the previous N'th subject line.
 If UNREAD is non-nil, only unread articles are selected.
 The difference between N and the actual number of steps taken is
 returned."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (let ((backward (< n 0))
        (n (abs n)))
     (while (and (> n 0)
@@ -7613,18 +7613,18 @@ returned."
 
 (defun gnus-summary-next-unread-subject (n)
   "Go to next N'th unread summary line."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-next-subject n t))
 
 (defun gnus-summary-prev-subject (n &optional unread)
   "Go to previous N'th summary line.
 If optional argument UNREAD is non-nil, only unread article is selected."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-next-subject (- n) unread))
 
 (defun gnus-summary-prev-unread-subject (n)
   "Go to previous N'th unread summary line."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-next-subject (- n) t))
 
 (defun gnus-summary-goto-subjects (articles)
@@ -7638,7 +7638,7 @@ If optional argument UNREAD is non-nil, only unread 
article is selected."
 (defun gnus-summary-goto-subject (article &optional force silent)
   "Go to the subject line of ARTICLE.
 If FORCE, also allow jumping to articles not currently shown."
-  (interactive "nArticle number: ")
+  (command gnus-summary-mode "nArticle number: ")
   (unless (numberp article)
     (error "Article %s is not a number" article))
   (let ((b (point))
@@ -7668,7 +7668,7 @@ If FORCE, also allow jumping to articles not currently 
shown."
 (defun gnus-summary-expand-window (&optional arg)
   "Make the summary buffer take up the entire Emacs frame.
 Given a prefix, will force an `article' buffer configuration."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (if arg
       (gnus-configure-windows 'article 'force)
     (gnus-configure-windows 'summary 'force)))
@@ -7751,7 +7751,7 @@ be displayed."
 
 (defun gnus-summary-force-verify-and-decrypt ()
   "Display buttons for signed/encrypted parts and verify/decrypt them."
-  (interactive)
+  (command gnus-summary-mode)
   (let ((mm-verify-option 'known)
        (mm-decrypt-option 'known)
        (gnus-article-emulate-mime t)
@@ -7765,7 +7765,7 @@ be displayed."
 If UNREAD, only unread articles are selected.
 If SUBJECT, only articles with SUBJECT are selected.
 If BACKWARD, the previous article is selected instead of the next."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   ;; Make sure we are in the summary buffer.
   (unless (derived-mode-p 'gnus-summary-mode)
     (set-buffer gnus-summary-buffer))
@@ -7877,7 +7877,7 @@ If BACKWARD, the previous article is selected instead of 
the next."
 
 (defun gnus-summary-next-unread-article ()
   "Select unread article after current one."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-next-article
    (or (not (eq gnus-summary-goto-unread 'never))
        (gnus-summary-last-article-p (gnus-summary-article-number)))
@@ -7887,12 +7887,12 @@ If BACKWARD, the previous article is selected instead 
of the next."
 (defun gnus-summary-prev-article (&optional unread subject)
   "Select the article before the current one.
 If UNREAD is non-nil, only unread articles are selected."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-next-article unread subject t))
 
 (defun gnus-summary-prev-unread-article ()
   "Select unread article before current one."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-prev-article
    (or (not (eq gnus-summary-goto-unread 'never))
        (gnus-summary-first-article-p (gnus-summary-article-number)))
@@ -7913,7 +7913,7 @@ article.
 If STOP is non-nil, just stop when reaching the end of the message.
 
 Also see the variable `gnus-article-skip-boring'."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-set-global-variables)
   (let ((article (gnus-summary-article-number))
        (article-window (get-buffer-window gnus-article-buffer t))
@@ -7958,7 +7958,7 @@ Also see the variable `gnus-article-skip-boring'."
 Argument LINES specifies lines to be scrolled down.
 If MOVE, move to the previous unread article if point is at
 the beginning of the buffer."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (let ((article (gnus-summary-article-number))
        (article-window (get-buffer-window gnus-article-buffer t))
        endp)
@@ -7988,14 +7988,14 @@ the beginning of the buffer."
   "Show previous page of selected article.
 Argument LINES specifies lines to be scrolled down.
 If at the beginning of the article, go to the next article."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-prev-page lines t))
 
 (defun gnus-summary-scroll-up (lines)
   "Scroll up (or down) one line current article.
 Argument LINES specifies lines to be scrolled up (or down if negative).
 If no article is selected, then the current article will be selected first."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-configure-windows 'article)
   (gnus-summary-show-thread)
   (when (eq (gnus-summary-select-article nil nil 'pseudo) 'old)
@@ -8012,33 +8012,33 @@ If no article is selected, then the current article 
will be selected first."
   "Scroll down (or up) one line current article.
 Argument LINES specifies lines to be scrolled down (or up if negative).
 If no article is selected, then the current article will be selected first."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-scroll-up (- lines)))
 
 (defun gnus-summary-next-same-subject ()
   "Select next article which has the same subject as current one."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-next-article nil (gnus-summary-article-subject)))
 
 (defun gnus-summary-prev-same-subject ()
   "Select previous article which has the same subject as current one."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-prev-article nil (gnus-summary-article-subject)))
 
 (defun gnus-summary-next-unread-same-subject ()
   "Select next unread article which has the same subject as current one."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-next-article t (gnus-summary-article-subject)))
 
 (defun gnus-summary-prev-unread-same-subject ()
   "Select previous unread article which has the same subject as current one."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-prev-article t (gnus-summary-article-subject)))
 
 (defun gnus-summary-first-unread-article ()
   "Select the first unread article.
 Return nil if there are no unread articles."
-  (interactive)
+  (command gnus-summary-mode)
   (prog1
       (when (gnus-summary-first-subject t)
        (gnus-summary-show-thread)
@@ -8049,7 +8049,7 @@ Return nil if there are no unread articles."
 (defun gnus-summary-first-unread-subject ()
   "Place the point on the subject line of the first unread article.
 Return nil if there are no unread articles."
-  (interactive)
+  (command gnus-summary-mode)
   (prog1
       (when (gnus-summary-first-subject t)
        (gnus-summary-show-thread)
@@ -8058,7 +8058,7 @@ Return nil if there are no unread articles."
 
 (defun gnus-summary-next-unseen-article (&optional backward)
   "Select the next unseen article."
-  (interactive)
+  (command gnus-summary-mode)
   (let* ((article (gnus-summary-article-number))
         (articles (gnus-data-find-list article (gnus-data-list backward))))
     (when (or (not gnus-summary-check-current)
@@ -8079,13 +8079,13 @@ Return nil if there are no unread articles."
 
 (defun gnus-summary-prev-unseen-article ()
   "Select the previous unseen article."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-next-unseen-article t))
 
 (defun gnus-summary-first-unseen-subject ()
   "Place the point on the subject line of the first unseen article.
 Return nil if there are no unseen articles."
-  (interactive)
+  (command gnus-summary-mode)
   (prog1
       (when (gnus-summary-first-subject nil nil t)
        (gnus-summary-show-thread)
@@ -8096,7 +8096,7 @@ Return nil if there are no unseen articles."
   "Place the point on the subject line of the first unseen and unread article.
 If all article have been seen, on the subject line of the first unread
 article."
-  (interactive)
+  (command gnus-summary-mode)
   (prog1
       (unless (when (gnus-summary-first-subject nil nil t)
                (gnus-summary-show-thread)
@@ -8109,7 +8109,7 @@ article."
 (defun gnus-summary-first-article ()
   "Select the first article.
 Return nil if there are no articles."
-  (interactive)
+  (command gnus-summary-mode)
   (prog1
       (when (gnus-summary-first-subject)
        (gnus-summary-show-thread)
@@ -8121,7 +8121,7 @@ Return nil if there are no articles."
   "Select the unread article with the highest score.
 If given a prefix argument, select the next unread article that has a
 score higher than the default score."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (let ((article (if arg
                     (gnus-summary-better-unread-subject)
                   (gnus-summary-best-unread-subject))))
@@ -8131,7 +8131,7 @@ score higher than the default score."
 
 (defun gnus-summary-best-unread-subject ()
   "Select the unread subject with the highest score."
-  (interactive)
+  (command gnus-summary-mode)
   (let ((best -1000000)
        (data gnus-newsgroup-data)
        article score)
@@ -8150,7 +8150,7 @@ score higher than the default score."
 
 (defun gnus-summary-better-unread-subject ()
   "Select the first unread subject that has a score over the default score."
-  (interactive)
+  (command gnus-summary-mode)
   (let ((data gnus-newsgroup-data)
        article)
     (while (and (setq article (gnus-data-number (car data)))
@@ -8174,7 +8174,7 @@ score higher than the default score."
 If ALL-HEADERS is non-nil, no header lines are hidden.
 If FORCE, go to the article even if it isn't displayed.  If FORCE
 is a number, it is the line the article is to be displayed on."
-  (interactive
+  (command gnus-summary-mode
    (list
     (gnus-completing-read
      "Article number or Message-ID"
@@ -8194,7 +8194,7 @@ is a number, it is the line the article is to be 
displayed on."
 
 (defun gnus-summary-goto-last-article ()
   "Go to the previously read article."
-  (interactive)
+  (command gnus-summary-mode)
   (prog1
       (when gnus-last-article
        (gnus-summary-goto-article gnus-last-article nil t))
@@ -8203,7 +8203,7 @@ is a number, it is the line the article is to be 
displayed on."
 (defun gnus-summary-pop-article (number)
   "Pop one article off the history and go to the previous.
 NUMBER articles will be popped off."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (let (to)
     (setq gnus-newsgroup-history
          (cdr (setq to (nthcdr number gnus-newsgroup-history))))
@@ -8217,7 +8217,7 @@ NUMBER articles will be popped off."
 (defun gnus-summary-limit-to-articles (n)
   "Limit the summary buffer to the next N articles.
 If not given a prefix, use the process marked articles instead."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (prog1
       (let ((articles (gnus-summary-work-articles n)))
        (setq gnus-newsgroup-processable nil)
@@ -8227,7 +8227,7 @@ If not given a prefix, use the process marked articles 
instead."
 (defun gnus-summary-pop-limit (&optional total)
   "Restore the previous limit.
 If given a prefix, remove all limits."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (when total
     (setq gnus-newsgroup-limits
          (list (mapcar #'mail-header-number gnus-newsgroup-headers))))
@@ -8240,7 +8240,7 @@ If given a prefix, remove all limits."
 (defun gnus-summary-limit-to-subject (subject &optional header not-matching)
   "Limit the summary buffer to articles that have subjects that match a regexp.
 If NOT-MATCHING, excluding articles that have subjects that match a regexp."
-  (interactive
+  (command gnus-summary-mode
    (list (read-string (if current-prefix-arg
                          "Exclude subject (regexp): "
                        "Limit to subject (regexp): "))
@@ -8260,7 +8260,7 @@ If NOT-MATCHING, excluding articles that have subjects 
that match a regexp."
 (defun gnus-summary-limit-to-author (from &optional not-matching)
   "Limit the summary buffer to articles that have authors that match a regexp.
 If NOT-MATCHING, excluding articles that have authors that match a regexp."
-  (interactive
+  (command gnus-summary-mode
    (list (let* ((header (gnus-summary-article-header))
                (default (and header (car (mail-header-parse-address
                                           (mail-header-from header))))))
@@ -8283,7 +8283,7 @@ If NOT-MATCHING, exclude RECIPIENT.
 To and Cc headers are checked.  You need to include them in
 `nnmail-extra-headers'."
   ;; Unlike `rmail-summary-by-recipients', doesn't include From.
-  (interactive
+  (command gnus-summary-mode
    (list (read-string (format "%s recipient (regexp): "
                              (if current-prefix-arg "Exclude" "Limit to")))
         current-prefix-arg))
@@ -8325,7 +8325,7 @@ If NOT-MATCHING, exclude ADDRESS.
 
 To, Cc and From headers are checked.  You need to include `To' and `Cc'
 in `nnmail-extra-headers'."
-  (interactive
+  (command gnus-summary-mode
    (list (read-string (format "%s address (regexp): "
                              (if current-prefix-arg "Exclude" "Limit to")))
         current-prefix-arg))
@@ -8396,7 +8396,7 @@ articles."
   "Limit the summary buffer to articles that are older than (or equal) AGE 
days.
 If YOUNGER-P (the prefix) is non-nil, limit the summary buffer to
 articles that are younger than AGE days."
-  (interactive
+  (command gnus-summary-mode
    (let ((younger current-prefix-arg)
         (days-got nil)
         days)
@@ -8435,7 +8435,7 @@ articles that are younger than AGE days."
 
 (defun gnus-summary-limit-to-extra (header regexp &optional not-matching)
   "Limit the summary buffer to articles that match an `extra' header."
-  (interactive
+  (command gnus-summary-mode
    (let ((header
          (intern
           (gnus-completing-read
@@ -8462,7 +8462,7 @@ articles that are younger than AGE days."
 
 (defun gnus-summary-limit-to-display-predicate ()
   "Limit the summary buffer to the predicated in the `display' group 
parameter."
-  (interactive)
+  (command gnus-summary-mode)
   (unless gnus-newsgroup-display
     (error "There is no `display' group parameter"))
   (let (articles)
@@ -8475,7 +8475,7 @@ articles that are younger than AGE days."
 (defun gnus-summary-limit-to-unread (&optional all)
   "Limit the summary buffer to articles that are not marked as read.
 If ALL is non-nil, limit strictly to unread articles."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (if all
       (gnus-summary-limit-to-marks (char-to-string gnus-unread-mark))
     (gnus-summary-limit-to-marks
@@ -8491,7 +8491,7 @@ If ALL is non-nil, limit strictly to unread articles."
 (defun gnus-summary-limit-to-headers (match &optional reverse)
   "Limit the summary buffer to articles that have headers that match MATCH.
 If REVERSE (the prefix), limit to articles that don't match."
-  (interactive "sMatch headers (regexp): \nP")
+  (command gnus-summary-mode "sMatch headers (regexp): \nP")
   (gnus-summary-limit-to-bodies match reverse t))
 
 (declare-function article-goto-body "gnus-art" ())
@@ -8499,7 +8499,7 @@ If REVERSE (the prefix), limit to articles that don't 
match."
 (defun gnus-summary-limit-to-bodies (match &optional reverse headersp)
   "Limit the summary buffer to articles that have bodies that match MATCH.
 If REVERSE (the prefix), limit to articles that don't match."
-  (interactive "sMatch body (regexp): \nP")
+  (command gnus-summary-mode "sMatch body (regexp): \nP")
   (let ((articles nil)
        (gnus-select-article-hook nil)  ;Disable hook.
        (gnus-article-prepare-hook nil)
@@ -8532,7 +8532,7 @@ If REVERSE (the prefix), limit to articles that don't 
match."
 (defun gnus-summary-limit-to-singletons (&optional threadsp)
   "Limit the summary buffer to articles that aren't part on any thread.
 If THREADSP (the prefix), limit to articles that are in threads."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (let ((articles nil)
        thread-articles
        threads)
@@ -8556,7 +8556,7 @@ If THREADSP (the prefix), limit to articles that are in 
threads."
 (defun gnus-summary-limit-to-replied (&optional unreplied)
   "Limit the summary buffer to replied articles.
 If UNREPLIED (the prefix), limit to unreplied articles."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (if unreplied
       (gnus-summary-limit
        (gnus-set-difference gnus-newsgroup-articles
@@ -8569,7 +8569,7 @@ If UNREPLIED (the prefix), limit to unreplied articles."
 If REVERSE, limit the summary buffer to articles that are marked
 with MARKS.  MARKS can either be a string of marks or a list of marks.
 Returns how many articles were removed."
-  (interactive "sMarks: ")
+  (command gnus-summary-mode "sMarks: ")
   (gnus-summary-limit-to-marks marks t))
 
 (defun gnus-summary-limit-to-marks (marks &optional reverse)
@@ -8578,7 +8578,7 @@ If REVERSE (the prefix), limit the summary buffer to 
articles that are
 not marked with MARKS.  MARKS can either be a string of marks or a
 list of marks.
 Returns how many articles were removed."
-  (interactive "sMarks: \nP")
+  (command gnus-summary-mode "sMarks: \nP")
   (prog1
       (let ((data gnus-newsgroup-data)
            (marks (if (listp marks) marks
@@ -8597,7 +8597,7 @@ Returns how many articles were removed."
 
 With a prefix argument, limit to articles with score at or below
 SCORE."
-  (interactive (list (string-to-number
+  (command gnus-summary-mode (list (string-to-number
                       (read-string
                        (format "Limit to articles with score of at %s: "
                                (if current-prefix-arg "most" "least"))))))
@@ -8616,7 +8616,7 @@ SCORE."
 
 (defun gnus-summary-limit-to-unseen ()
   "Limit to unseen articles."
-  (interactive)
+  (command gnus-summary-mode)
   (prog1
       (gnus-summary-limit gnus-newsgroup-unseen)
     (gnus-summary-position-point)))
@@ -8626,7 +8626,7 @@ SCORE."
 When called interactively, ID is the Message-ID of the current
 article.  If thread-only is non-nil limit the summary buffer to
 these articles."
-  (interactive (list (mail-header-id (gnus-summary-article-header))
+  (command gnus-summary-mode (list (mail-header-id 
(gnus-summary-article-header))
                     current-prefix-arg))
   (let ((articles (gnus-articles-in-thread
                   (gnus-id-to-thread (gnus-root-id id))))
@@ -8653,7 +8653,7 @@ these articles."
 
 (defun gnus-summary-limit-include-matching-articles (header regexp)
   "Display all the hidden articles that have HEADERs that match REGEXP."
-  (interactive (list (read-string "Match on header: ")
+  (command gnus-summary-mode (list (read-string "Match on header: ")
                     (read-string "Regexp: ")))
   (let ((articles (gnus-find-matching-articles header regexp)))
     (prog1
@@ -8662,7 +8662,7 @@ these articles."
 
 (defun gnus-summary-insert-dormant-articles ()
   "Insert all the dormant articles for this group into the current buffer."
-  (interactive)
+  (command gnus-summary-mode)
   (let ((gnus-verbose (max 6 gnus-verbose)))
     (if (not gnus-newsgroup-dormant)
        (gnus-message 3 "No dormant articles for this group")
@@ -8670,7 +8670,7 @@ these articles."
 
 (defun gnus-summary-insert-ticked-articles ()
   "Insert ticked articles for this group into the current buffer."
-  (interactive)
+  (command gnus-summary-mode)
   (let ((gnus-verbose (max 6 gnus-verbose)))
     (if (not gnus-newsgroup-marked)
        (gnus-message 3 "No ticked articles for this group")
@@ -8680,7 +8680,7 @@ these articles."
   "Display all the hidden articles that are marked as dormant.
 Note that this command only works on a subset of the articles currently
 fetched for this group."
-  (interactive)
+  (command gnus-summary-mode)
   (unless gnus-newsgroup-dormant
     (error "There are no dormant articles in this group"))
   (prog1
@@ -8703,14 +8703,14 @@ fetched for this group."
 
 (defun gnus-summary-limit-exclude-dormant ()
   "Hide all dormant articles."
-  (interactive)
+  (command gnus-summary-mode)
   (prog1
       (gnus-summary-limit-to-marks (list gnus-dormant-mark) 'reverse)
     (gnus-summary-position-point)))
 
 (defun gnus-summary-limit-exclude-childless-dormant ()
   "Hide all dormant articles that have no children."
-  (interactive)
+  (command gnus-summary-mode)
   (let ((data (gnus-data-list t))
        articles d children)
     ;; Find all articles that are either not dormant or have
@@ -8735,7 +8735,7 @@ fetched for this group."
 (defun gnus-summary-limit-mark-excluded-as-read (&optional all)
   "Mark all unread excluded articles as read.
 If ALL, mark even excluded ticked and dormants as read."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (setq gnus-newsgroup-limit (sort gnus-newsgroup-limit #'<))
   (let ((articles (gnus-sorted-ndifference
                   (sort
@@ -8974,7 +8974,7 @@ fetch-old-headers verbiage, and so on."
   "Refer parent article N times.
 If N is negative, go to ancestor -N instead.
 The difference between N and the number of articles fetched is returned."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (let ((skip 1)
        error header ref)
     (when (not (natnump n))
@@ -9016,7 +9016,7 @@ The difference between N and the number of articles 
fetched is returned."
 (defun gnus-summary-refer-references ()
   "Fetch all articles mentioned in the References header.
 Return the number of articles fetched."
-  (interactive)
+  (command gnus-summary-mode)
   (let ((ref (mail-header-references (gnus-summary-article-header)))
        (current (gnus-summary-article-number))
        (n 0))
@@ -9059,7 +9059,7 @@ has the reverse meaning.  If no backend-specific 
`request-thread'
 function is available fetch LIMIT (the numerical prefix) old
 headers.  If LIMIT is non-numeric or nil fetch the number
 specified by the `gnus-refer-thread-limit' variable."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (let* ((header (gnus-summary-article-header))
         (id (mail-header-id header))
         (gnus-inhibit-demon t)
@@ -9114,7 +9114,7 @@ specified by the `gnus-refer-thread-limit' variable."
 
 (defun gnus-summary-open-group-with-article (message-id)
   "Open a group containing the article with the given MESSAGE-ID."
-  (interactive "sMessage-ID: ")
+  (command gnus-summary-mode "sMessage-ID: ")
   (require 'nndoc)
   (with-temp-buffer
     ;; Prepare a dummy article
@@ -9149,7 +9149,7 @@ specified by the `gnus-refer-thread-limit' variable."
 
 (defun gnus-summary-refer-article (message-id)
   "Fetch an article specified by MESSAGE-ID."
-  (interactive "sMessage-ID: ")
+  (command gnus-summary-mode "sMessage-ID: ")
   (when (and (stringp message-id)
             (not (zerop (length message-id))))
     (setq message-id (replace-regexp-in-string " " "" message-id))
@@ -9222,12 +9222,12 @@ specified by the `gnus-refer-thread-limit' variable."
 
 (defun gnus-summary-edit-parameters ()
   "Edit the group parameters of the current group."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-group-edit-group gnus-newsgroup-name 'params))
 
 (defun gnus-summary-customize-parameters ()
   "Customize the group parameters of the current group."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-group-customize gnus-newsgroup-name))
 
 (defun gnus-summary-enter-digest-group (&optional force)
@@ -9237,7 +9237,7 @@ what the document format is.
 
 To control what happens when you exit the group, see the
 `gnus-auto-select-on-ephemeral-exit' variable."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (let ((conf gnus-current-window-configuration))
     (save-window-excursion
       (save-excursion
@@ -9322,7 +9322,7 @@ To control what happens when you exit the group, see the
 This will allow you to read digests and other similar
 documents as newsgroups.
 Obeys the standard process/prefix convention."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (let* ((ogroup gnus-newsgroup-name)
         (params (append (gnus-info-params (gnus-get-info ogroup))
                         (list (cons 'to-group ogroup))))
@@ -9371,7 +9371,7 @@ Obeys the standard process/prefix convention."
 (defun gnus-summary-button-forward (arg)
   "Move point to the next field or button in the article.
 With optional ARG, move across that many fields."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-select-article)
   (gnus-configure-windows 'article)
   (let ((win (or (gnus-get-buffer-window gnus-article-buffer t)
@@ -9385,7 +9385,7 @@ With optional ARG, move across that many fields."
 (defun gnus-summary-button-backward (arg)
   "Move point to the previous field or button in the article.
 With optional ARG, move across that many fields."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-select-article)
   (gnus-configure-windows 'article)
   (let ((win (or (gnus-get-buffer-window gnus-article-buffer t)
@@ -9442,7 +9442,7 @@ If only one link is found, browse that directly, 
otherwise use
 completion to select a link.  The first link marked in the
 article text with `gnus-collect-urls-primary-text' is the
 default."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (let (urls target)
     (gnus-summary-select-article)
     (gnus-with-article-buffer
@@ -9467,7 +9467,7 @@ default."
 (defun gnus-summary-isearch-article (&optional regexp-p)
   "Do incremental search forward on the current article.
 If REGEXP-P (the prefix) is non-nil, do regexp isearch."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-select-article)
   (gnus-configure-windows 'article)
   (gnus-eval-in-buffer-window gnus-article-buffer
@@ -9477,14 +9477,14 @@ If REGEXP-P (the prefix) is non-nil, do regexp isearch."
 
 (defun gnus-summary-repeat-search-article-forward ()
   "Repeat the previous search forwards."
-  (interactive)
+  (command gnus-summary-mode)
   (unless gnus-last-search-regexp
     (error "No previous search"))
   (gnus-summary-search-article-forward gnus-last-search-regexp))
 
 (defun gnus-summary-repeat-search-article-backward ()
   "Repeat the previous search backwards."
-  (interactive)
+  (command gnus-summary-mode)
   (unless gnus-last-search-regexp
     (error "No previous search"))
   (gnus-summary-search-article-forward gnus-last-search-regexp t))
@@ -9492,7 +9492,7 @@ If REGEXP-P (the prefix) is non-nil, do regexp isearch."
 (defun gnus-summary-search-article-forward (regexp &optional backward)
   "Search for an article containing REGEXP forward.
 If BACKWARD, search backward instead."
-  (interactive
+  (command gnus-summary-mode
    (list (read-string
          (format "Search article %s (regexp%s): "
                  (if current-prefix-arg "backward" "forward")
@@ -9513,7 +9513,7 @@ If BACKWARD, search backward instead."
 
 (defun gnus-summary-search-article-backward (regexp)
   "Search for an article containing REGEXP backward."
-  (interactive
+  (command gnus-summary-mode
    (list (read-string
          (format "Search article backward (regexp%s): "
                  (if gnus-last-search-regexp
@@ -9652,7 +9652,7 @@ that not match REGEXP on HEADER."
   "Search forward for an article whose HEADER matches REGEXP and execute 
COMMAND.
 If HEADER is an empty string (or nil), the match is done on the entire
 article.  If BACKWARD (the prefix) is non-nil, search backward instead."
-  (interactive
+  (command gnus-summary-mode
    (list (let ((completion-ignore-case t))
           (gnus-completing-read
            "Header name"
@@ -9688,7 +9688,7 @@ article.  If BACKWARD (the prefix) is non-nil, search 
backward instead."
 
 (defun gnus-summary-beginning-of-article ()
   "Scroll the article back to the beginning."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-select-article)
   (gnus-configure-windows 'article)
   (gnus-eval-in-buffer-window gnus-article-buffer
@@ -9699,7 +9699,7 @@ article.  If BACKWARD (the prefix) is non-nil, search 
backward instead."
 
 (defun gnus-summary-end-of-article ()
   "Scroll to the end of the article."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-select-article)
   (gnus-configure-windows 'article)
   (gnus-eval-in-buffer-window gnus-article-buffer
@@ -9732,7 +9732,7 @@ If the optional first argument FILENAME is nil, send the 
image to the
 printer.  If FILENAME is a string, save the PostScript image in a file with
 that name.  If FILENAME is a number, prompt the user for the name of the file
 to save in."
-  (interactive (list (ps-print-preprint current-prefix-arg)))
+  (command gnus-summary-mode (list (ps-print-preprint current-prefix-arg)))
   (dolist (article (gnus-summary-work-articles n))
     (gnus-summary-select-article nil nil 'pseudo article)
     (gnus-eval-in-buffer-window gnus-article-buffer
@@ -9772,7 +9772,7 @@ to save in."
   "Show a complete version of the current article.
 This is only useful if you're looking at a partial version of the
 article currently."
-  (interactive)
+  (command gnus-summary-mode)
   (let ((gnus-keep-backlog nil)
        (gnus-use-cache nil)
        (gnus-agent nil)
@@ -9799,7 +9799,7 @@ If ARG (the prefix) is non-nil and not a number, show the 
article,
 but without running any of the article treatment functions
 article.  Normally, the keystroke is `C-u g'.  When using `C-u
 C-u g', show the raw article."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (cond
    ((numberp arg)
     (gnus-summary-show-article t)
@@ -9875,14 +9875,14 @@ C-u g', show the raw article."
 
 (defun gnus-summary-show-raw-article ()
   "Show the raw article without any article massaging functions being run."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-show-article t))
 
 (defun gnus-summary-verbose-headers (&optional arg)
   "Toggle permanent full header display.
 If ARG is a positive number, turn header display on.
 If ARG is a negative number, turn header display off."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (setq gnus-show-all-headers
        (cond ((or (not (numberp arg))
                   (zerop arg))
@@ -9901,7 +9901,7 @@ If ARG is a negative number, turn header display off."
   "Show the headers if they are hidden, or hide them if they are shown.
 If ARG is a positive number, show the entire header.
 If ARG is a negative number, hide the unwanted header lines."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (let ((window (and (gnus-buffer-live-p gnus-article-buffer)
                     (get-buffer-window gnus-article-buffer t))))
     (with-current-buffer gnus-article-buffer
@@ -9947,14 +9947,14 @@ If ARG is a negative number, hide the unwanted header 
lines."
 
 (defun gnus-summary-show-all-headers ()
   "Make all header lines visible."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-toggle-header 1))
 
 (defun gnus-summary-caesar-message (&optional arg)
   "Caesar rotate the current article by 13.
 With a non-numerical prefix, also rotate headers.  A numerical
 prefix specifies how many places to rotate each letter forward."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-select-article)
   (let ((mail-header-separator ""))
     (gnus-eval-in-buffer-window gnus-article-buffer
@@ -9977,7 +9977,7 @@ invalid IDNA string (`xn--bar' is invalid).
 
 You must have GNU Libidn (URL `https://www.gnu.org/software/libidn/')
 installed for this command to work."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-select-article)
   (let ((mail-header-separator ""))
     (gnus-eval-in-buffer-window gnus-article-buffer
@@ -9991,7 +9991,7 @@ installed for this command to work."
 
 (defun gnus-summary-morse-message (&optional _arg)
   "Morse decode the current article."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-select-article)
   (let ((mail-header-separator ""))
     (gnus-eval-in-buffer-window gnus-article-buffer
@@ -10012,7 +10012,7 @@ installed for this command to work."
 
 (defun gnus-summary-stop-page-breaking ()
   "Stop page breaking in the current article."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-select-article)
   (gnus-eval-in-buffer-window gnus-article-buffer
     (widen)
@@ -10042,7 +10042,7 @@ newsgroup that you want to move to have to support the 
`request-move'
 and `request-accept' functions.
 
 ACTION can be either `move' (the default), `crosspost' or `copy'."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (unless action
     (setq action 'move))
   ;; Check whether the source group supports the required functions.
@@ -10348,13 +10348,13 @@ ACTION can be either `move' (the default), 
`crosspost' or `copy'."
 (defun gnus-summary-copy-article (&optional n to-newsgroup select-method)
   "Copy the current article to some other group.
 Arguments have the same meanings as in `gnus-summary-move-article'."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-move-article n to-newsgroup select-method 'copy))
 
 (defun gnus-summary-crosspost-article (&optional n)
   "Crosspost the current article to some other group.
 Arguments have the same meanings as in `gnus-summary-move-article'."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-move-article n nil nil 'crosspost))
 
 (defcustom gnus-summary-respool-default-method nil
@@ -10377,7 +10377,7 @@ Respooling can be done both from mail groups and 
\"real\" newsgroups.
 In the former case, the articles in question will be moved from the
 current group into whatever groups they are destined to.  In the
 latter case, they will be copied into the relevant groups."
-  (interactive
+  (command gnus-summary-mode
    (list current-prefix-arg
         (let* ((methods (mapcar #'car (gnus-methods-using 'respool)))
                (methname
@@ -10409,7 +10409,7 @@ latter case, they will be copied into the relevant 
groups."
 
 (defun gnus-summary-import-article (file &optional edit)
   "Import an arbitrary file into a mail newsgroup."
-  (interactive "fImport file: \nP")
+  (command gnus-summary-mode "fImport file: \nP")
   (let ((group gnus-newsgroup-name)
        atts lines group-art)
     (unless (gnus-check-backend-function 'request-accept-article group)
@@ -10453,7 +10453,7 @@ latter case, they will be copied into the relevant 
groups."
 
 (defun gnus-summary-create-article ()
   "Create an article in a mail newsgroup."
-  (interactive)
+  (command gnus-summary-mode)
   (let ((group gnus-newsgroup-name)
        (now (current-time))
        group-art)
@@ -10477,7 +10477,7 @@ latter case, they will be copied into the relevant 
groups."
 (defun gnus-summary-article-posted-p ()
   "Say whether the current (mail) article is available from news as well.
 This will be the case if the article has both been mailed and posted."
-  (interactive)
+  (command gnus-summary-mode)
   (let ((id (mail-header-references (gnus-summary-article-header)))
        (gnus-override-method (car (gnus-refer-article-methods))))
     (if (gnus-request-head id "")
@@ -10489,7 +10489,7 @@ This will be the case if the article has both been 
mailed and posted."
 
 (defun gnus-summary-expire-articles (&optional now)
   "Expire all articles that are marked as expirable in the current group."
-  (interactive)
+  (command gnus-summary-mode)
   (when (and (not gnus-group-is-exiting-without-update-p)
             (gnus-check-backend-function
              'request-expire-articles gnus-newsgroup-name))
@@ -10558,7 +10558,7 @@ This will be the case if the article has both been 
mailed and posted."
   "Expunge all expirable articles in the current group.
 This means that *all* articles that are marked as expirable will be
 deleted forever, right now."
-  (interactive)
+  (command gnus-summary-mode)
   (or gnus-expert-user
       (gnus-yes-or-no-p
        "Are you really, really sure you want to delete all expirable messages? 
")
@@ -10578,7 +10578,7 @@ delete these instead.
 
 If `gnus-novice-user' is non-nil you will be asked for
 confirmation before the articles are deleted."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (unless (gnus-check-backend-function 'request-expire-articles
                                       gnus-newsgroup-name)
     (error "The current newsgroup does not support article deletion"))
@@ -10628,7 +10628,7 @@ If ARG is 2, edit the raw articles even in read-only 
groups.
 If ARG is 3, edit the articles with the current handles.
 Otherwise, allow editing of articles even in read-only
 groups."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (let (force raw current-handles)
     (cond
      ((null arg))
@@ -10708,7 +10708,7 @@ groups."
 (defun gnus-summary-edit-article-done (&optional references read-only buffer
                                                 no-highlight)
   "Make edits to the current article permanent."
-  (interactive)
+  (command gnus-summary-mode)
   (save-excursion
     ;; The buffer restriction contains the entire article if it exists.
     (when (article-goto-body)
@@ -10792,7 +10792,7 @@ groups."
 
 (defun gnus-summary-edit-wash (key)
   "Perform editing command KEY in the article buffer."
-  (interactive
+  (command gnus-summary-mode
    (list
     (progn
       (message "%s" (concat (this-command-keys) "- "))
@@ -10809,7 +10809,7 @@ groups."
 
 (defun gnus-summary-respool-query (&optional silent trace)
   "Query where the respool algorithm would put this article."
-  (interactive)
+  (command gnus-summary-mode)
   (let (gnus-mark-article-hook)
     (gnus-summary-select-article)
     (with-current-buffer gnus-original-article-buffer
@@ -10839,7 +10839,7 @@ groups."
 (defun gnus-summary-respool-trace ()
   "Trace where the respool algorithm would put this article.
 Display a buffer showing all fancy splitting patterns which matched."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-respool-query nil t))
 
 ;; Summary marking commands.
@@ -10848,7 +10848,7 @@ Display a buffer showing all fancy splitting patterns 
which matched."
   "Mark articles which has the same subject as read, and then select the next.
 If UNMARK is positive, remove any kind of mark.
 If UNMARK is negative, tick articles."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (when unmark
     (setq unmark (prefix-numeric-value unmark)))
   (let ((count
@@ -10866,7 +10866,7 @@ If UNMARK is negative, tick articles."
   "Mark articles which has the same subject as read.
 If UNMARK is positive, remove any kind of mark.
 If UNMARK is negative, tick articles."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (when unmark
     (setq unmark (prefix-numeric-value unmark)))
   (let ((count
@@ -10916,7 +10916,7 @@ If optional argument UNMARK is negative, mark articles 
as unread instead."
 If N is negative, mark backward instead.  If UNMARK is non-nil, remove
 the process mark instead.  The difference between N and the actual
 number of articles marked is returned."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (if (and (null n) (and transient-mark-mode mark-active))
       (gnus-uu-mark-region (region-beginning) (region-end) unmark)
     (setq n (prefix-numeric-value n))
@@ -10940,12 +10940,12 @@ number of articles marked is returned."
   "Remove the process mark from the next N articles.
 If N is negative, unmark backward instead.  The difference between N and
 the actual number of articles unmarked is returned."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-mark-as-processable n t))
 
 (defun gnus-summary-unmark-all-processable ()
   "Remove the process mark from all articles."
-  (interactive)
+  (command gnus-summary-mode)
   (save-excursion
     (while gnus-newsgroup-processable
       (gnus-summary-remove-process-mark (car gnus-newsgroup-processable))))
@@ -10969,20 +10969,20 @@ the actual number of articles unmarked is returned."
   "Mark N articles forward as expirable.
 If N is negative, mark backward instead.  The difference between N and
 the actual number of articles marked is returned."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-mark-forward n gnus-expirable-mark))
 
 (defun gnus-summary-mark-as-spam (n)
   "Mark N articles forward as spam.
 If N is negative, mark backward instead.  The difference between N and
 the actual number of articles marked is returned."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-mark-forward n gnus-spam-mark))
 
 (defun gnus-summary-mark-article-as-replied (article)
   "Mark ARTICLE as replied to and update the summary line.
 ARTICLE can also be a list of articles."
-  (interactive (list (gnus-summary-article-number)))
+  (command gnus-summary-mode (list (gnus-summary-article-number)))
   (let ((articles (if (listp article) article (list article))))
     (dolist (article articles)
       (unless (numberp article)
@@ -11004,7 +11004,7 @@ ARTICLE can also be a list of articles."
 
 (defun gnus-summary-set-bookmark (article)
   "Set a bookmark in current article."
-  (interactive (list (gnus-summary-article-number)))
+  (command gnus-summary-mode (list (gnus-summary-article-number)))
   (when (or (not (get-buffer gnus-article-buffer))
            (not gnus-current-article)
            (not gnus-article-current)
@@ -11028,7 +11028,7 @@ ARTICLE can also be a list of articles."
 
 (defun gnus-summary-remove-bookmark (article)
   "Remove the bookmark from the current article."
-  (interactive (list (gnus-summary-article-number)))
+  (command gnus-summary-mode (list (gnus-summary-article-number)))
   ;; Remove old bookmark, if one exists.
   (if (not (assq article gnus-newsgroup-bookmarks))
       (gnus-message 6 "No bookmark in current article.")
@@ -11040,7 +11040,7 @@ ARTICLE can also be a list of articles."
   "Mark N articles forward as dormant.
 If N is negative, mark backward instead.  The difference between N and
 the actual number of articles marked is returned."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-mark-forward n gnus-dormant-mark))
 
 (defun gnus-summary-set-process-mark (article)
@@ -11075,7 +11075,7 @@ If N is negative, mark backwards instead.  Mark with 
MARK, ?r by default.
 The difference between N and the actual number of articles marked is
 returned.
 If NO-EXPIRE, auto-expiry will be inhibited."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-show-thread)
   (let ((backward (< n 0))
        (gnus-summary-goto-unread
@@ -11339,20 +11339,20 @@ If NO-EXPIRE, auto-expiry will be inhibited."
   "Tick N articles forwards.
 If N is negative, tick backwards instead.
 The difference between N and the number of articles ticked is returned."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-mark-forward n gnus-ticked-mark))
 
 (defun gnus-summary-tick-article-backward (n)
   "Tick N articles backwards.
 The difference between N and the number of articles ticked is returned."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-mark-forward (- n) gnus-ticked-mark))
 
 (defun gnus-summary-tick-article (&optional article clear-mark)
   "Mark current article as unread.
 Optional 1st argument ARTICLE specifies article number to be marked as unread.
 Optional 2nd argument CLEAR-MARK remove any kinds of mark."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-mark-article article (if clear-mark gnus-unread-mark
                                       gnus-ticked-mark)))
 
@@ -11361,14 +11361,14 @@ Optional 2nd argument CLEAR-MARK remove any kinds of 
mark."
 If N is negative, mark backwards instead.
 The difference between N and the actual number of articles marked is
 returned."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-mark-forward n gnus-del-mark gnus-inhibit-user-auto-expire))
 
 (defun gnus-summary-mark-as-read-backward (n)
   "Mark the N articles as read backwards.
 The difference between N and the actual number of articles marked is
 returned."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-mark-forward
    (- n) gnus-del-mark gnus-inhibit-user-auto-expire))
 
@@ -11382,13 +11382,13 @@ MARK specifies a string to be inserted at the 
beginning of the line."
   "Clear marks from N articles forward.
 If N is negative, clear backward instead.
 The difference between N and the number of marks cleared is returned."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-mark-forward n gnus-unread-mark))
 
 (defun gnus-summary-clear-mark-backward (n)
   "Clear marks from N articles backward.
 The difference between N and the number of marks cleared is returned."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-mark-forward (- n) gnus-unread-mark))
 
 (defun gnus-summary-mark-unread-as-read ()
@@ -11421,7 +11421,7 @@ The difference between N and the number of marks 
cleared is returned."
   "Mark all unread articles between point and mark as read.
 If given a prefix, mark all articles between point and mark as read,
 even ticked and dormant ones."
-  (interactive "r\nP")
+  (command gnus-summary-mode "r\nP")
   (save-excursion
     (let (article)
       (goto-char point)
@@ -11438,7 +11438,7 @@ even ticked and dormant ones."
 
 (defun gnus-summary-mark-below (score mark)
   "Mark articles with score less than SCORE with MARK."
-  (interactive "P\ncMark: ")
+  (command gnus-summary-mode "P\ncMark: ")
   (setq score (if score
                  (prefix-numeric-value score)
                (or gnus-summary-default-score 0)))
@@ -11452,22 +11452,22 @@ even ticked and dormant ones."
 
 (defun gnus-summary-kill-below (&optional score)
   "Mark articles with score below SCORE as read."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-mark-below score gnus-killed-mark))
 
 (defun gnus-summary-clear-above (&optional score)
   "Clear all marks from articles with score above SCORE."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-mark-above score gnus-unread-mark))
 
 (defun gnus-summary-tick-above (&optional score)
   "Tick all articles with score above SCORE."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-mark-above score gnus-ticked-mark))
 
 (defun gnus-summary-mark-above (score mark)
   "Mark articles with score over SCORE with MARK."
-  (interactive "P\ncMark: ")
+  (command gnus-summary-mode "P\ncMark: ")
   (setq score (if score
                  (prefix-numeric-value score)
                (or gnus-summary-default-score 0)))
@@ -11483,7 +11483,7 @@ even ticked and dormant ones."
 (defalias 'gnus-summary-show-all-expunged 'gnus-summary-limit-include-expunged)
 (defun gnus-summary-limit-include-expunged (&optional no-error)
   "Display all the hidden articles that were expunged for low scores."
-  (interactive)
+  (command gnus-summary-mode)
   (let ((inhibit-read-only t))
     (let ((scored gnus-newsgroup-scored)
          headers h)
@@ -11520,7 +11520,7 @@ Note that this function will only catch up the unread 
article
 in the current summary buffer limitation.
 
 The number of articles marked as read is returned."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (prog1
       (save-excursion
        (when (or quietly
@@ -11569,7 +11569,7 @@ The number of articles marked as read is returned."
 (defun gnus-summary-catchup-to-here (&optional all)
   "Mark all unticked articles before the current one as read.
 If ALL is non-nil, also mark ticked and dormant articles as read."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (save-excursion
     (gnus-save-hidden-threads
       (let ((beg (point)))
@@ -11581,7 +11581,7 @@ If ALL is non-nil, also mark ticked and dormant 
articles as read."
 (defun gnus-summary-catchup-from-here (&optional all)
   "Mark all unticked articles after (and including) the current one as read.
 If ALL is non-nil, also mark ticked and dormant articles as read."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (save-excursion
     (gnus-save-hidden-threads
       (let ((beg (point)))
@@ -11594,14 +11594,14 @@ If ALL is non-nil, also mark ticked and dormant 
articles as read."
   "Mark all articles in this newsgroup as read.
 This command is dangerous.  Normally, you want \\[gnus-summary-catchup]
 instead, which marks only unread articles as read."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-catchup t quietly))
 
 (defun gnus-summary-catchup-and-exit (&optional all quietly)
   "Mark all unread articles in this group as read, then exit.
 If prefix argument ALL is non-nil, all articles are marked as read.
 If QUIETLY is non-nil, no questions will be asked."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (when (gnus-summary-catchup all quietly nil 'fast)
     ;; Select next newsgroup or exit.
     (if (and (not (gnus-group-quit-config gnus-newsgroup-name))
@@ -11613,14 +11613,14 @@ If QUIETLY is non-nil, no questions will be asked."
   "Mark all articles in this newsgroup as read, and then exit.
 This command is dangerous.  Normally, you want 
\\[gnus-summary-catchup-and-exit]
 instead, which marks only unread articles as read."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-catchup-and-exit t quietly))
 
 (defun gnus-summary-catchup-and-goto-next-group (&optional all)
   "Mark all articles in this group as read and select the next group.
 If given a prefix, mark all articles, unread as well as ticked, as
 read."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (save-excursion
     (gnus-summary-catchup all))
   (gnus-summary-next-group))
@@ -11629,7 +11629,7 @@ read."
   "Mark all articles in this group as read and select the previous group.
 If given a prefix, mark all articles, unread as well as ticked, as
 read."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (save-excursion
     (gnus-summary-catchup all))
   (gnus-summary-next-group nil nil t))
@@ -11705,7 +11705,7 @@ with that article."
 
 (defun gnus-summary-rethread-current ()
   "Rethread the thread the current article is part of."
-  (interactive)
+  (command gnus-summary-mode)
   (let* ((gnus-show-threads t)
         (article (gnus-summary-article-number))
         (id (mail-header-id (gnus-summary-article-header)))
@@ -11720,7 +11720,7 @@ with that article."
 
 Note that the re-threading will only work if `gnus-thread-ignore-subject'
 is non-nil or the Subject: of both articles are the same."
-  (interactive)
+  (command gnus-summary-mode)
   (unless (not (gnus-group-read-only-p))
     (error "The current newsgroup does not support article editing"))
   (unless (<= (length gnus-newsgroup-processable) 1)
@@ -11739,7 +11739,7 @@ is non-nil or the Subject: of both articles are the 
same."
   "Make PARENT the parent of CHILDREN.
 When called interactively, PARENT is the current article and CHILDREN
 are the process-marked articles."
-  (interactive
+  (command gnus-summary-mode
    (list (gnus-summary-article-number)
         (gnus-summary-work-articles nil)))
   (dolist (child children)
@@ -11774,7 +11774,7 @@ are the process-marked articles."
 (defun gnus-summary-toggle-threads (&optional arg)
   "Toggle showing conversation threads.
 If ARG is positive number, turn showing conversation threads on."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (let ((current (or (gnus-summary-article-number) gnus-newsgroup-end)))
     (setq gnus-show-threads
          (if (null arg) (not gnus-show-threads)
@@ -11786,7 +11786,7 @@ If ARG is positive number, turn showing conversation 
threads on."
 
 (defun gnus-summary-show-all-threads ()
   "Show all threads."
-  (interactive)
+  (command gnus-summary-mode)
   (remove-overlays (point-min) (point-max) 'invisible 'gnus-sum)
   (gnus-summary-position-point))
 
@@ -11796,7 +11796,7 @@ If ARG is positive number, turn showing conversation 
threads on."
 (defun gnus-summary-show-thread ()
   "Show thread subtrees.
 Returns nil if no thread was there to be shown."
-  (interactive)
+  (command gnus-summary-mode)
   (let* ((orig (point))
         (end (point-at-eol))
          (end (or (gnus-summary--inv end) (gnus-summary--inv (1- end))))
@@ -11837,7 +11837,7 @@ Returns nil if no thread was there to be shown."
   "Hide all thread subtrees.
 If PREDICATE is supplied, threads that satisfy this predicate
 will not be hidden."
-  (interactive)
+  (command gnus-summary-mode)
   (save-excursion
     (goto-char (point-min))
     (let ((end nil)
@@ -11856,7 +11856,7 @@ will not be hidden."
 (defun gnus-summary-hide-thread ()
   "Hide thread subtrees.
 Returns nil if no threads were there to be hidden."
-  (interactive)
+  (command gnus-summary-mode)
   (beginning-of-line)
   (let ((start (point))
        (starteol (line-end-position))
@@ -11908,7 +11908,7 @@ Returns the difference between N and the number of 
skips actually
 done.
 
 If SILENT, don't output messages."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (let ((backward (< n 0))
        (n (abs n)))
     (while (and (> n 0)
@@ -11924,7 +11924,7 @@ If SILENT, don't output messages."
   "Go to the same level previous N'th thread.
 Returns the difference between N and the number of skips actually
 done."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-next-thread (- n)))
 
 (defun gnus-summary-go-down-thread ()
@@ -11944,7 +11944,7 @@ done."
 If N is negative, go up instead.
 Returns the difference between N and how many steps down that were
 taken."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (let ((up (< n 0))
        (n (abs n)))
     (while (and (> n 0)
@@ -11961,18 +11961,18 @@ taken."
 If N is negative, go down instead.
 Returns the difference between N and how many steps down that were
 taken."
-  (interactive "p")
+  (command gnus-summary-mode "p")
   (gnus-summary-down-thread (- n)))
 
 (defun gnus-summary-top-thread ()
   "Go to the top of the thread."
-  (interactive)
+  (command gnus-summary-mode)
   (while (gnus-summary-go-up-thread))
   (gnus-summary-article-number))
 
 (defun gnus-summary-expire-thread ()
   "Mark articles under current thread as expired."
-  (interactive)
+  (command gnus-summary-mode)
   (gnus-summary-kill-thread 0))
 
 (defun gnus-summary-kill-thread (&optional unmark)
@@ -11980,7 +11980,7 @@ taken."
 If the prefix argument is positive, remove any kinds of marks.
 If the prefix argument is zero, mark thread as expired.
 If the prefix argument is negative, tick articles instead."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (when unmark
     (setq unmark (prefix-numeric-value unmark)))
   (let ((articles (gnus-summary-articles-in-thread))
@@ -12015,82 +12015,82 @@ If the prefix argument is negative, tick articles 
instead."
 (defun gnus-summary-sort-by-number (&optional reverse)
   "Sort the summary buffer by article number.
 Argument REVERSE means reverse order."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-sort 'number reverse))
 
 (defun gnus-summary-sort-by-most-recent-number (&optional reverse)
   "Sort the summary buffer by most recent article number.
 Argument REVERSE means reverse order."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-sort 'most-recent-number reverse))
 
 (defun gnus-summary-sort-by-random (&optional reverse)
   "Randomize the order in the summary buffer.
 Argument REVERSE means to randomize in reverse order."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-sort 'random reverse))
 
 (defun gnus-summary-sort-by-author (&optional reverse)
   "Sort the summary buffer by author name alphabetically.
 If `case-fold-search' is non-nil, case of letters is ignored.
 Argument REVERSE means reverse order."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-sort 'author reverse))
 
 (defun gnus-summary-sort-by-recipient (&optional reverse)
   "Sort the summary buffer by recipient name alphabetically.
 If `case-fold-search' is non-nil, case of letters is ignored.
 Argument REVERSE means reverse order."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-sort 'recipient reverse))
 
 (defun gnus-summary-sort-by-subject (&optional reverse)
   "Sort the summary buffer by subject alphabetically.  `Re:'s are ignored.
 If `case-fold-search' is non-nil, case of letters is ignored.
 Argument REVERSE means reverse order."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-sort 'subject reverse))
 
 (defun gnus-summary-sort-by-date (&optional reverse)
   "Sort the summary buffer by date.
 Argument REVERSE means reverse order."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-sort 'date reverse))
 
 (defun gnus-summary-sort-by-most-recent-date (&optional reverse)
   "Sort the summary buffer by most recent date.
 Argument REVERSE means reverse order."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-sort 'most-recent-date reverse))
 
 (defun gnus-summary-sort-by-score (&optional reverse)
   "Sort the summary buffer by score.
 Argument REVERSE means reverse order."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-sort 'score reverse))
 
 (defun gnus-summary-sort-by-lines (&optional reverse)
   "Sort the summary buffer by the number of lines.
 Argument REVERSE means reverse order."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-sort 'lines reverse))
 
 (defun gnus-summary-sort-by-chars (&optional reverse)
   "Sort the summary buffer by article length.
 Argument REVERSE means reverse order."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-sort 'chars reverse))
 
 (defun gnus-summary-sort-by-marks (&optional reverse)
   "Sort the summary buffer by article marks.
 Argument REVERSE means reverse order."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (gnus-summary-sort 'marks reverse))
 
 (defun gnus-summary-sort-by-original (&optional _reverse)
   "Sort the summary buffer using the default sorting method.
 Argument REVERSE means reverse order."
-  (interactive)
+  (command gnus-summary-mode)
   (let* ((inhibit-read-only t)
         (gnus-summary-prepare-hook nil))
     ;; We do the sorting by regenerating the threads.
@@ -12139,7 +12139,7 @@ will not be marked as saved.
 
 The `gnus-prompt-before-saving' variable says how prompting is
 performed."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (require 'gnus-art)
   (let* ((articles (gnus-summary-work-articles n))
         (save-buffer (save-excursion
@@ -12208,7 +12208,7 @@ is neither omitted nor the symbol `r', force including 
all headers
 regardless of the `:headers' property.  If it is the symbol `r',
 articles that are not decoded and include all headers will be piped
 no matter what the properties `:decode' and `:headers' are."
-  (interactive (gnus-interactive "P\ny"))
+  (command gnus-summary-mode (gnus-interactive "P\ny"))
   (require 'gnus-art)
   (let* ((articles (gnus-summary-work-articles n))
         (result-buffer shell-command-buffer-name)
@@ -12260,7 +12260,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")
+  (command gnus-summary-mode "P")
   (require 'gnus-art)
   (let ((gnus-default-article-saver 'gnus-summary-save-in-mail))
     (gnus-summary-save-article arg)))
@@ -12271,7 +12271,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")
+  (command gnus-summary-mode "P")
   (require 'gnus-art)
   (let ((gnus-default-article-saver 'gnus-summary-save-in-rmail))
     (gnus-summary-save-article arg)))
@@ -12282,7 +12282,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")
+  (command gnus-summary-mode "P")
   (require 'gnus-art)
   (let ((gnus-default-article-saver 'gnus-summary-save-in-file))
     (gnus-summary-save-article arg)))
@@ -12293,7 +12293,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")
+  (command gnus-summary-mode "P")
   (require 'gnus-art)
   (let ((gnus-default-article-saver 'gnus-summary-write-to-file))
     (gnus-summary-save-article arg)))
@@ -12304,7 +12304,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")
+  (command gnus-summary-mode "P")
   (require 'gnus-art)
   (let ((gnus-default-article-saver 'gnus-summary-save-body-in-file))
     (gnus-summary-save-article arg)))
@@ -12315,7 +12315,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")
+  (command gnus-summary-mode "P")
   (require 'gnus-art)
   (let ((gnus-default-article-saver 'gnus-summary-write-body-to-file))
     (gnus-summary-save-article arg)))
@@ -12326,14 +12326,14 @@ 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")
+  (command gnus-summary-mode "P")
   (require 'gnus-art)
   (let ((gnus-default-article-saver 'gnus-summary-pipe-to-muttprint))
     (gnus-summary-save-article arg t)))
 
 (defun gnus-summary-pipe-message (program)
   "Pipe the current article through PROGRAM."
-  (interactive "sProgram: ")
+  (command gnus-summary-mode "sProgram: ")
   (gnus-summary-select-article)
   (let ((mail-header-separator ""))
     (gnus-eval-in-buffer-window gnus-article-buffer
@@ -12437,7 +12437,7 @@ save those articles instead."
 (defun gnus-summary-save-parts (type dir n &optional reverse)
   "Save parts matching TYPE to DIR.
 If REVERSE, save parts that do not match TYPE."
-  (interactive
+  (command gnus-summary-mode
    (list (completing-read "Save parts of type: "
                          (progn
                            (gnus-summary-select-article nil t)
@@ -12590,12 +12590,12 @@ If REVERSE, save parts that do not match TYPE."
 
 (defun gnus-summary-edit-global-kill (article)
   "Edit the \"global\" kill file."
-  (interactive (list (gnus-summary-article-number)))
+  (command gnus-summary-mode (list (gnus-summary-article-number)))
   (gnus-group-edit-global-kill article))
 
 (defun gnus-summary-edit-local-kill ()
   "Edit a local kill file applied to the current newsgroup."
-  (interactive)
+  (command gnus-summary-mode)
   (setq gnus-current-headers (gnus-summary-article-header))
   (gnus-group-edit-local-kill
    (gnus-summary-article-number) gnus-newsgroup-name))
@@ -12893,7 +12893,7 @@ UNREAD is a sorted list."
   "Display the current article buffer fully MIME-buttonized.
 If SHOW-ALL-PARTS (the prefix) is non-nil, all multipart/* parts are
 treated as multipart/mixed."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (require 'gnus-art)
   (let ((gnus-unbuttonized-mime-types nil)
        (gnus-mime-display-multipart-as-mixed show-all-parts))
@@ -12901,7 +12901,7 @@ treated as multipart/mixed."
 
 (defun gnus-summary-repair-multipart (article)
   "Add a Content-Type header to a multipart article without one."
-  (interactive (list (gnus-summary-article-number)))
+  (command gnus-summary-mode (list (gnus-summary-article-number)))
   (gnus-with-article article
     (message-narrow-to-head)
     (message-remove-header "Mime-Version")
@@ -12921,7 +12921,7 @@ treated as multipart/mixed."
 
 (defun gnus-summary-toggle-display-buttonized ()
   "Toggle the buttonizing of the article buffer."
-  (interactive)
+  (command gnus-summary-mode)
   (require 'gnus-art)
   (if (setq gnus-inhibit-mime-unbuttonizing
            (not gnus-inhibit-mime-unbuttonizing))
@@ -13059,7 +13059,7 @@ returned."
   "Insert all old articles in this group.
 If ALL is non-nil, already read articles become readable.
 If ALL is a number, fetch this number of articles."
-  (interactive "P")
+  (command gnus-summary-mode "P")
   (prog1
       (let ((old (sort (mapcar #'gnus-data-number gnus-newsgroup-data) #'<))
            older len)
@@ -13133,7 +13133,7 @@ If ALL is a number, fetch this number of articles."
 
 (defun gnus-summary-insert-new-articles ()
   "Insert all new articles in this group."
-  (interactive)
+  (command gnus-summary-mode)
   (let ((old (sort (mapcar #'gnus-data-number gnus-newsgroup-data) #'<))
        (old-high gnus-newsgroup-highest)
        (nnmail-fetched-sources (list t))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]