diff options
| author | Andreas Politz | 2016-10-16 16:56:25 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2016-10-16 16:56:25 +0300 |
| commit | 55ebb708cf65156085003ea0e5cd08a06353be05 (patch) | |
| tree | 8eec87e71ce382d8b068f86f3ffb3cc727d3be57 | |
| parent | 993acb5088a9766f3af240edcb9c6ffb93530034 (diff) | |
| download | emacs-55ebb708cf65156085003ea0e5cd08a06353be05.tar.gz emacs-55ebb708cf65156085003ea0e5cd08a06353be05.zip | |
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).
| -rw-r--r-- | lisp/progmodes/sh-script.el | 5 |
1 files changed, 4 insertions, 1 deletions
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." | |||
| 1741 | (defun sh--cmd-completion-table (string pred action) | 1741 | (defun sh--cmd-completion-table (string pred action) |
| 1742 | (let ((cmds | 1742 | (let ((cmds |
| 1743 | (append (when (fboundp 'imenu--make-index-alist) | 1743 | (append (when (fboundp 'imenu--make-index-alist) |
| 1744 | (mapcar #'car (imenu--make-index-alist))) | 1744 | (mapcar #'car |
| 1745 | (condition-case nil | ||
| 1746 | (imenu--make-index-alist) | ||
| 1747 | (imenu-unavailable nil)))) | ||
| 1745 | (mapcar (lambda (v) (concat v "=")) | 1748 | (mapcar (lambda (v) (concat v "=")) |
| 1746 | (sh--vars-before-point)) | 1749 | (sh--vars-before-point)) |
| 1747 | (locate-file-completion-table | 1750 | (locate-file-completion-table |