From: Paul Eggert Date: Tue, 5 Apr 2016 20:58:57 +0000 (-0700) Subject: Avoid describe-key error with lambdas X-Git-Tag: emacs-25.0.93~68 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1e4aa42;p=emacs.git 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. --- diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el index c7e6615e0df..4f424313ab7 100644 --- a/lisp/cedet/mode-local.el +++ b/lisp/cedet/mode-local.el @@ -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))))