mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-02 11:21:42 +00:00
Avoid describe-key error with lambdas
Problem reported by Sho Takemori (Bug#22716). * lisp/cedet/mode-local.el (describe-mode-local-overload) (xref-mode-local-overload): Use function-overload-p instead of assuming the argument is a symbol.
This commit is contained in:
parent
a05fb21d73
commit
1e4aa42aa5
@ -638,7 +638,7 @@ SYMBOL is a function that can be overridden."
|
||||
|
||||
(defun describe-mode-local-overload (symbol)
|
||||
"For `help-fns-describe-function-functions'; add overloads for SYMBOL."
|
||||
(when (get symbol 'mode-local-overload)
|
||||
(when (function-overload-p symbol)
|
||||
(let ((default (or (intern-soft (format "%s-default" (symbol-name symbol)))
|
||||
symbol))
|
||||
(override (with-current-buffer describe-function-orig-buffer
|
||||
@ -684,7 +684,7 @@ SYMBOL is a function that can be overridden."
|
||||
(defun xref-mode-local-overload (symbol)
|
||||
"For `elisp-xref-find-def-functions'; add overloads for SYMBOL."
|
||||
;; Current buffer is the buffer where xref-find-definitions was invoked.
|
||||
(when (get symbol 'mode-local-overload)
|
||||
(when (function-overload-p symbol)
|
||||
(let* ((symbol-file (find-lisp-object-file-name symbol (symbol-function symbol)))
|
||||
(default (intern-soft (format "%s-default" (symbol-name symbol))))
|
||||
(default-file (when default (find-lisp-object-file-name default (symbol-function default))))
|
||||
|
Loading…
Reference in New Issue
Block a user