unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: tsuucat via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 50064@debbugs.gnu.org
Subject: bug#50064: [PATCH] Do interactive mode tagging for shortdoc.el
Date: Sun, 15 Aug 2021 15:40:25 +0900	[thread overview]
Message-ID: <746D24DB-F0FE-4F28-AF98-BC40E2313361@icloud.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 264 bytes --]

I tried shortdoc.el in Emacs 28 and I noticed shortdoc’s commands don’t 
have interactive mode tags. So I made a patch.

If shortdoc.el is not uploaded to elpa (or only supports Emacs 28 or
higher), this patch can be acceptable.

Thanks.

--
tsuucat

[-- Attachment #2: 0001-Mark-up-commands-in-shortdoc.el-for-modes.patch --]
[-- Type: application/octet-stream, Size: 1855 bytes --]

From fd6c2dea02e81efda05d967ffd36474739db4bd0 Mon Sep 17 00:00:00 2001
From: Masahiro Nakamura <tsuucat@icloud.com>
Date: Sun, 15 Aug 2021 14:31:04 +0900
Subject: [PATCH] Mark up commands in shortdoc.el for modes

---
 lisp/emacs-lisp/shortdoc.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index a74a5a4225..1b0fbfdf71 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -1317,7 +1317,8 @@ shortdoc-mode-map
   "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 @@ shortdoc--goto-section
 (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))
 
-- 
2.28.0


             reply	other threads:[~2021-08-15  6:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-15  6:40 tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-08-15  9:55 ` bug#50064: [PATCH] Do interactive mode tagging for shortdoc.el Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=746D24DB-F0FE-4F28-AF98-BC40E2313361@icloud.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=50064@debbugs.gnu.org \
    --cc=tsuucat@icloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).