]> git.eshelyaron.com Git - emacs.git/commitdiff
eglot: Support signature labels without a function name
authorMichal Dubiel <majkijin@gmail.com>
Sun, 23 Oct 2022 17:54:31 +0000 (19:54 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Sat, 12 Nov 2022 21:29:42 +0000 (22:29 +0100)
* lisp/progmodes/eglot.el (eglot--sig-info): Support signature labels
without a function name.  (Bug#58777)

Copyright-paperwork-exempt: yes

lisp/progmodes/eglot.el

index c59606a7cb4833ca1ec3adafccb3b358e2f7b739..97c674f7aa9dd7d7461675176e80060df0a0b047 100644 (file)
@@ -2934,7 +2934,7 @@ for which LSP on-type-formatting should be requested."
        (let ((active-param (or activeParameter sig-help-active-param))
              params-start params-end)
          ;; Ad-hoc attempt to parse label as <name>(<params>)
-         (when (looking-at "\\([^(]+\\)(\\([^)]+\\))")
+         (when (looking-at "\\([^(]*\\)(\\([^)]+\\))")
            (setq params-start (match-beginning 2) params-end (match-end 2))
            (add-face-text-property (match-beginning 1) (match-end 1)
                                    'font-lock-function-name-face))