comparison lisp/which-func.el @ 22308:87366acfb1e9

(which-func-ff-hook): If imenu gets error, clear which-func-mode.
author Karl Heuer <kwzh@gnu.org>
date Mon, 01 Jun 1998 03:09:43 +0000
parents 29c2db002dd5
children 114211878bf9
comparison
equal deleted inserted replaced
22307:57d1e5467c24 22308:87366acfb1e9
134 It creates the Imenu index for the buffer, if necessary." 134 It creates the Imenu index for the buffer, if necessary."
135 (if (or (eq which-func-modes t) (member major-mode which-func-modes)) 135 (if (or (eq which-func-modes t) (member major-mode which-func-modes))
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.
148 (condition-case info 151 (condition-case info
149 (progn 152 (progn