From: Stefan Monnier Date: Mon, 27 Apr 2015 04:01:36 +0000 (-0400) Subject: * elisp-mode.el: Catch errors from `documentation' X-Git-Tag: emacs-25.0.90~2289 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d32d0fae2a7e37a065f1dd2372763c4dc0e409f4;p=emacs.git * elisp-mode.el: Catch errors from `documentation' Fixes: debbugs:20418 * lisp/progmodes/elisp-mode.el (elisp--get-fnsym-args-string): Catch errors from documentation. (emacs-lisp-mode-abbrev-table): Remove redundant defvar. --- diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index ad35c48a101..f2890686e79 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -30,7 +30,6 @@ (require 'lisp-mode) -(defvar emacs-lisp-mode-abbrev-table nil) (define-abbrev-table 'emacs-lisp-mode-abbrev-table () "Abbrev table for Emacs Lisp mode. It has `lisp-mode-abbrev-table' as its parent." @@ -1164,7 +1163,10 @@ or elsewhere, return a 1-line docstring." (args (cond ((listp advertised) advertised) - ((setq doc (help-split-fundoc (documentation sym t) sym)) + ((setq doc (help-split-fundoc + (condition-case nil (documentation sym t) + (invalid-function nil)) + sym)) (car doc)) (t (help-function-arglist sym))))) ;; Stringify, and store before highlighting, downcasing, etc.