]> git.eshelyaron.com Git - emacs.git/commitdiff
Adjust active param highlighting in first line of signature (3/3)
authorFredrik Bergroth <fbergroth@gmail.com>
Thu, 13 Dec 2018 12:03:42 +0000 (13:03 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sun, 16 Dec 2018 13:52:12 +0000 (13:52 +0000)
Highlight only first active parameter match (even if there are many)

Copyright-paperwork-exempt: yes

* eglot.el (eglot--sig-info): Simplify.

lisp/progmodes/eglot.el

index ae18493f11cab8c4f17979193bc37ec921973a87..01f6960047f6db6111a8c965232786c7f6ef65b9 100644 (file)
@@ -1962,13 +1962,10 @@ is not active."
              (goto-char params-start)
              (let ((regex (concat "\\<" (regexp-quote label) "\\>"))
                    (case-fold-search nil))
-               (cl-loop for nmatches from 0
-                        while (re-search-forward regex params-end t)
-                        finally do
-                        (when (= 1 nmatches)
-                          (add-face-text-property
-                           (- (point) (length label)) (point)
-                           'eldoc-highlight-function-argument))))
+               (when (re-search-forward regex params-end t)
+                 (add-face-text-property
+                  (- (point) (length label)) (point)
+                  'eldoc-highlight-function-argument)))
              (when documentation
                (goto-char (point-max))
                (insert "\n"