]> git.eshelyaron.com Git - emacs.git/commitdiff
* elisp-mode.el: Catch errors from `documentation'
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 27 Apr 2015 04:01:36 +0000 (00:01 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 27 Apr 2015 04:01:36 +0000 (00:01 -0400)
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.

lisp/progmodes/elisp-mode.el

index ad35c48a101015ccf7d0da7b93edb7de2a60d251..f2890686e799b8446f02f4b2beef3056b65538d5 100644 (file)
@@ -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.