[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/which-func.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/which-func.el |
Date: |
Sat, 24 May 2003 22:02:45 -0400 |
Index: emacs/lisp/which-func.el
diff -c emacs/lisp/which-func.el:1.32 emacs/lisp/which-func.el:1.33
*** emacs/lisp/which-func.el:1.32 Sun May 18 11:07:11 2003
--- emacs/lisp/which-func.el Sat May 24 22:02:45 2003
***************
*** 175,180 ****
--- 175,182 ----
;;;###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,201 ****
(if which-function-mode
;;Turn it on
(progn
! (add-hook 'post-command-idle-hook '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)
(dolist (buf (buffer-list))
(with-current-buffer buf (setq which-func-mode nil)))))
--- 190,205 ----
(if which-function-mode
;;Turn it on
(progn
! (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
! (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,228 ****
(while alist
(setq elem (car-safe alist)
alist (cdr-safe alist))
! ;; Elements of alist are either ("name" . marker), or
;; ("submenu" ("name" . marker) ... ).
(unless (listp (cdr elem))
(setq elem (list elem)))
--- 226,232 ----
(while alist
(setq elem (car-safe alist)
alist (cdr-safe alist))
! ;; Elements of alist are either ("name" . marker), or
;; ("submenu" ("name" . marker) ... ).
(unless (listp (cdr elem))
(setq elem (list elem)))