* bug#50064: [PATCH] Do interactive mode tagging for shortdoc.el
@ 2021-08-15 6:40 tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-15 9:55 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-08-15 6:40 UTC (permalink / raw)
To: 50064
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#50064: [PATCH] Do interactive mode tagging for shortdoc.el
2021-08-15 6:40 bug#50064: [PATCH] Do interactive mode tagging for shortdoc.el tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-08-15 9:55 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-15 9:55 UTC (permalink / raw)
To: tsuucat; +Cc: 50064
tsuucat <tsuucat@icloud.com> writes:
> 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; applied to Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-15 9:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-15 6:40 bug#50064: [PATCH] Do interactive mode tagging for shortdoc.el tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-15 9:55 ` Lars Ingebrigtsen
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).