Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0ec0b89f
Commit
0ec0b89f
authored
May 25, 2003
by
Juanma Barranquero
Browse files
(which-func-update-timer): New variable.
(which-function-mode): Use it.
parent
ea82f0df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
lisp/which-func.el
lisp/which-func.el
+7
-3
No files found.
lisp/which-func.el
View file @
0ec0b89f
...
...
@@ -175,6 +175,8 @@ It creates the Imenu index for the buffer, if necessary."
;;;###autoload
(
defalias
'which-func-mode
'which-function-mode
)
(
defvar
which-func-update-timer
nil
)
;; This is the name people would normally expect.
;;;###autoload
(
define-minor-mode
which-function-mode
...
...
@@ -188,14 +190,16 @@ and off otherwise."
(
if
which-function-mode
;;Turn it on
(
progn
(
add-hook
'post-command-idle-hook
'which-func-update
)
(
setq
which-func-update-timer
(
run-with-idle-timer
idle-update-delay
t
'which-func-update
))
(
dolist
(
buf
(
buffer-list
))
(
with-current-buffer
buf
(
setq
which-func-mode
(
or
(
eq
which-func-modes
t
)
(
member
major-mode
which-func-modes
))))))
;; Turn it off
(
remove-hook
'post-command-idle-hook
'which-func-update
)
(
cancel-timer
which-func-update-timer
)
(
setq
which-func-update-timer
nil
)
(
dolist
(
buf
(
buffer-list
))
(
with-current-buffer
buf
(
setq
which-func-mode
nil
)))))
...
...
@@ -222,7 +226,7 @@ If no function name is found, return nil."
(
while
alist
(
setq
elem
(
car-safe
alist
)
alist
(
cdr-safe
alist
))
;; Elements of alist are either ("name" . marker), or
;; Elements of alist are either ("name" . marker), or
;; ("submenu" ("name" . marker) ... ).
(
unless
(
listp
(
cdr
elem
))
(
setq
elem
(
list
elem
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment