aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-05-06 21:18:00 +0000
committerRichard M. Stallman1998-05-06 21:18:00 +0000
commit4962cb1a7fa383b7bc361b3c603e055e15078e6a (patch)
treea83f91f51bb76b02bbe76717557205351867fc8a
parent9d99031fcfa519d0efdce52d1b76e058c7ac277c (diff)
downloademacs-4962cb1a7fa383b7bc361b3c603e055e15078e6a.tar.gz
emacs-4962cb1a7fa383b7bc361b3c603e055e15078e6a.zip
(which-func-non-auto-modes): New variable.
(which-func-amodes): Variable deleted. (which-func-ff-hook): Use which-func-non-auto-modes instead of which-func-amodes.
-rw-r--r--lisp/which-func.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/which-func.el b/lisp/which-func.el
index dceb3bf40e8..c55e392c23d 100644
--- a/lisp/which-func.el
+++ b/lisp/which-func.el
@@ -80,12 +80,12 @@ then current-function recognition is enabled in any mode."
80 :type '(choice (const :tag "All modes" t) 80 :type '(choice (const :tag "All modes" t)
81 (list (symbol :tag "Major mode")))) 81 (list (symbol :tag "Major mode"))))
82 82
83(defcustom which-func-amodes '(emacs-lisp-mode c-mode c++-mode) 83(defcustom which-func-non-auto-modes nil
84 "List of major modes for which the Imenu menu should be computed automatically. 84 "List of major modes where Which Function mode is inactive till Imenu is used.
85It is computed when you visit a file in one of these major modes. 85
86If the variable's value is nil, then the Imenu menu is not computed 86Note that the menu is never computed automatically if the buffer size
87automatically in any mode. Note that the menu is never computed 87exceeds `which-func-maxout'."
88automatically if the buffer size exceeds `which-func-maxout'." 88
89 :group 'which-func 89 :group 'which-func
90 :type '(list (symbol :tag "Major mode"))) 90 :type '(list (symbol :tag "Major mode")))
91 91
@@ -137,7 +137,7 @@ It creates the Imenu index for the buffer, if necessary."
137 (setq which-func-mode nil)) 137 (setq which-func-mode nil))
138 138
139 (if (and which-func-mode 139 (if (and which-func-mode
140 (member major-mode which-func-amodes) 140 (not (member major-mode which-func-non-auto-modes))
141 (or (< buffer-saved-size which-func-maxout) 141 (or (< buffer-saved-size which-func-maxout)
142 (= which-func-maxout 0))) 142 (= which-func-maxout 0)))
143 (setq imenu--index-alist 143 (setq imenu--index-alist