diff options
| author | Karl Heuer | 1998-06-01 03:09:43 +0000 |
|---|---|---|
| committer | Karl Heuer | 1998-06-01 03:09:43 +0000 |
| commit | 2576f5d2700e3e18e684fc4f6e3d52c5d20d4f17 (patch) | |
| tree | dfe3adc703ff1a7641ea7380b6c5a95f13cd4a11 /lisp | |
| parent | d1208263cd848364650baafc62412528573f8a8d (diff) | |
| download | emacs-2576f5d2700e3e18e684fc4f6e3d52c5d20d4f17.tar.gz emacs-2576f5d2700e3e18e684fc4f6e3d52c5d20d4f17.zip | |
(which-func-ff-hook): If imenu gets error,
clear which-func-mode.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/which-func.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/which-func.el b/lisp/which-func.el index cf0e2e571dc..121ccf5a6b7 100644 --- a/lisp/which-func.el +++ b/lisp/which-func.el | |||
| @@ -136,12 +136,15 @@ It creates the Imenu index for the buffer, if necessary." | |||
| 136 | (setq which-func-mode which-func-mode-global) | 136 | (setq which-func-mode which-func-mode-global) |
| 137 | (setq which-func-mode nil)) | 137 | (setq which-func-mode nil)) |
| 138 | 138 | ||
| 139 | (if (and which-func-mode | 139 | (condition-case nil |
| 140 | (not (member major-mode which-func-non-auto-modes)) | 140 | (if (and which-func-mode |
| 141 | (or (< buffer-saved-size which-func-maxout) | 141 | (not (member major-mode which-func-non-auto-modes)) |
| 142 | (= which-func-maxout 0))) | 142 | (or (< buffer-saved-size which-func-maxout) |
| 143 | (setq imenu--index-alist | 143 | (= which-func-maxout 0))) |
| 144 | (save-excursion (funcall imenu-create-index-function))))) | 144 | (setq imenu--index-alist |
| 145 | (save-excursion (funcall imenu-create-index-function)))) | ||
| 146 | (error | ||
| 147 | (setq which-func-mode nil)))) | ||
| 145 | 148 | ||
| 146 | (defun which-func-update () | 149 | (defun which-func-update () |
| 147 | ;; Update the string containing the current function. | 150 | ;; Update the string containing the current function. |