From: Andreas Politz Date: Sun, 16 Oct 2016 13:56:25 +0000 (+0300) Subject: Catch the imenu-unavailable error in sh-mode completion table X-Git-Tag: emacs-25.1.90~117 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=55ebb708cf65156085003ea0e5cd08a06353be05;p=emacs.git Catch the imenu-unavailable error in sh-mode completion table * lisp/progmodes/sh-script.el (sh--cmd-completion-table): Catch the imenu-unavailable error (bug#24238). --- diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index f089c81fe56..0040adc2c2b 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1741,7 +1741,10 @@ This adds rules for comments and assignments." (defun sh--cmd-completion-table (string pred action) (let ((cmds (append (when (fboundp 'imenu--make-index-alist) - (mapcar #'car (imenu--make-index-alist))) + (mapcar #'car + (condition-case nil + (imenu--make-index-alist) + (imenu-unavailable nil)))) (mapcar (lambda (v) (concat v "=")) (sh--vars-before-point)) (locate-file-completion-table