diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-07-17 15:41:33 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-07-17 15:41:33 +0200 |
commit | 153c9d5ff4576b74ff9f9589f620c58d590862e8 (patch) | |
tree | 7ed7db55c80b68972c2af5b5a16a0776f5bed203 /lisp/emacs-lisp/shortdoc.el | |
parent | 109c27341e35fae778b95e0eb5d4d72927bf4ea8 (diff) | |
download | emacs-153c9d5ff4576b74ff9f9589f620c58d590862e8.tar.gz emacs-153c9d5ff4576b74ff9f9589f620c58d590862e8.tar.bz2 emacs-153c9d5ff4576b74ff9f9589f620c58d590862e8.zip |
Make 'n'/'p' work again in shortdoc after previous changes
* lisp/emacs-lisp/shortdoc.el (shortdoc--goto-section): Adjust to
changes in how the text properties are inserted in 22a5482ab6
(bug#49605). Also make into a regular function.
Diffstat (limited to 'lisp/emacs-lisp/shortdoc.el')
-rw-r--r-- | lisp/emacs-lisp/shortdoc.el | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index 3a32f632573..4beba1dbed1 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -1319,16 +1319,15 @@ Example: (define-derived-mode shortdoc-mode special-mode "shortdoc" "Mode for shortdoc.") -(defmacro shortdoc--goto-section (arg sym &optional reverse) - `(progn - (unless (natnump ,arg) - (setq ,arg 1)) - (while (< 0 ,arg) - (,(if reverse - 'text-property-search-backward - 'text-property-search-forward) - ,sym t) - (setq ,arg (1- ,arg))))) +(defun shortdoc--goto-section (arg sym &optional reverse) + (unless (natnump arg) + (setq arg 1)) + (while (> arg 0) + (funcall + (if reverse 'text-property-search-backward + 'text-property-search-forward) + sym nil t t) + (setq arg (1- arg)))) (defun shortdoc-next (&optional arg) "Move cursor to the next function. |