From d32d0fae2a7e37a065f1dd2372763c4dc0e409f4 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 27 Apr 2015 00:01:36 -0400 Subject: [PATCH] * 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. --- lisp/progmodes/elisp-mode.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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. -- 2.39.2