]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use incf/decf in eldoc.el
authorStefan Kangas <stefankangas@gmail.com>
Fri, 28 Feb 2025 01:20:40 +0000 (02:20 +0100)
committerEshel Yaron <me@eshelyaron.com>
Fri, 28 Feb 2025 11:20:22 +0000 (12:20 +0100)
* lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy): Don't use incf or
decf.  This is a :core package and supports Emacs 26.3.  (Bug#76604)

(cherry picked from commit 64edd5a5eb832c2ca9f4495c17e880a86179f826)

lisp/emacs-lisp/eldoc.el

index 26049844447056b15315fbf95c447065679bbc8e..37e398002561337ca3816a8783ae903faf4c339c 100644 (file)
@@ -872,7 +872,7 @@ the docstrings eventually produced, using
            interactive))
          (make-callback
           (method origin)
-          (let ((pos (prog1 howmany (incf howmany))))
+          (let ((pos (prog1 howmany (cl-incf howmany))))
             (cl-ecase method
               (:enthusiast
                (lambda (string &rest plist)
@@ -889,10 +889,10 @@ the docstrings eventually produced, using
                                     nil #'display-doc))
                  t))
               (:patient
-               (incf want)
+               (cl-incf want)
                (lambda (string &rest plist)
                  (register-doc pos string plist origin)
-                 (when (zerop (decf want)) (display-doc))
+                 (when (zerop (cl-decf want)) (display-doc))
                  t))
               (:eager
                (lambda (string &rest plist)