Mark up commands in shortdoc.el for modes
authorMasahiro Nakamura <tsuucat@icloud.com>
Sun, 15 Aug 2021 09:54:56 +0000 (11:54 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 15 Aug 2021 09:55:34 +0000 (11:55 +0200)
* lisp/emacs-lisp/shortdoc.el: Add command mode tagging
(bug#50064).

lisp/emacs-lisp/shortdoc.el

index a74a5a4225c6748a30a298d22a8c8fe63fdbc6bd..1b0fbfdf7152d27f03fad3a637e72abdd721d554 100644 (file)
@@ -1317,7 +1317,8 @@ Example:
   "Keymap for `shortdoc-mode'.")
 
 (define-derived-mode shortdoc-mode special-mode "shortdoc"
-  "Mode for shortdoc.")
+  "Mode for shortdoc."
+  :interactive nil)
 
 (defun shortdoc--goto-section (arg sym &optional reverse)
   (unless (natnump arg)
@@ -1332,26 +1333,26 @@ Example:
 (defun shortdoc-next (&optional arg)
   "Move cursor to the next function.
 With ARG, do it that many times."
-  (interactive "p")
+  (interactive "p" shortdoc-mode)
   (shortdoc--goto-section arg 'shortdoc-function))
 
 (defun shortdoc-previous (&optional arg)
   "Move cursor to the previous function.
 With ARG, do it that many times."
-  (interactive "p")
+  (interactive "p" shortdoc-mode)
   (shortdoc--goto-section arg 'shortdoc-function t)
   (backward-char 1))
 
 (defun shortdoc-next-section (&optional arg)
   "Move cursor to the next section.
 With ARG, do it that many times."
-  (interactive "p")
+  (interactive "p" shortdoc-mode)
   (shortdoc--goto-section arg 'shortdoc-section))
 
 (defun shortdoc-previous-section (&optional arg)
   "Move cursor to the previous section.
 With ARG, do it that many times."
-  (interactive "p")
+  (interactive "p" shortdoc-mode)
   (shortdoc--goto-section arg 'shortdoc-section t)
   (forward-line -2))