]> git.eshelyaron.com Git - emacs.git/commitdiff
Make 'n'/'p' work again in shortdoc after previous changes
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 17 Jul 2021 13:41:33 +0000 (15:41 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 17 Jul 2021 13:41:33 +0000 (15:41 +0200)
* 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.

lisp/emacs-lisp/shortdoc.el

index 3a32f63257338e30feb8ca82dfbae64eb07a6c16..4beba1dbed10b9c257ea3b1c531e531495ed425b 100644 (file)
@@ -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.