1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-12 16:23:57 +00:00

(which-func-mode): Invert which-func-mode-global.

Fix from Juanma Barranquero <lektu@uol.com.br>.
This commit is contained in:
Stefan Monnier 2001-02-08 22:14:49 +00:00
parent e57c6a7709
commit 532f519779
2 changed files with 35 additions and 30 deletions

View File

@ -1,3 +1,8 @@
2001-02-08 Stefan Monnier <monnier@cs.yale.edu>
* which-func.el (which-func-mode): Invert which-func-mode-global.
Fix from Juanma Barranquero <lektu@uol.com.br>.
2001-02-08 Dave Love <fx@gnu.org>
* textmodes/paragraphs.el (sentence-end): Doc fix.
@ -5,24 +10,24 @@
* eshell/em-rebind.el (eshell-cannot-leave-input-list): Remove
`backward-line'.
* play/pong.el (pong-blank-color, pong-bat-color)
(pong-ball-color, pong-border-color, pong-left-key)
(pong-right-key, pong-up-key, pong-down-key, pong-quit-key)
(pong-pause-key, pong-resume-key, pong-timer-delay):
* mail/mh-comp.el (mh-compose-letter-function):
* eshell/esh-mode.el (eshell-skip-prompt-function):
* emulation/viper-ex.el (ex-unix-type-shell-options):
* recentf.el (recentf-menu-filter):
* ps-print.el (ps-print-region-function):
* lpr.el (print-region-function):
* forms.el (forms-mode-hooks):
* dirtrack.el (dirtrack-directory-change-hook):
* cus-start.el (temp-buffer-show-function, display-buffer-function):
* textmodes/spell.el (spell-filter):
* textmodes/fill.el (adaptive-fill-function):
* textmodes/bibtex.el (bibtex-autokey-before-presentation-function):
* progmodes/etags.el (find-tag-default-function):
* progmodes/dcl-mode.el (dcl-calc-command-indent-function):
* play/pong.el (pong-blank-color, pong-bat-color)
(pong-ball-color, pong-border-color, pong-left-key)
(pong-right-key, pong-up-key, pong-down-key, pong-quit-key)
(pong-pause-key, pong-resume-key, pong-timer-delay):
* mail/mh-comp.el (mh-compose-letter-function):
* eshell/esh-mode.el (eshell-skip-prompt-function):
* emulation/viper-ex.el (ex-unix-type-shell-options):
* recentf.el (recentf-menu-filter):
* ps-print.el (ps-print-region-function):
* lpr.el (print-region-function):
* forms.el (forms-mode-hooks):
* dirtrack.el (dirtrack-directory-change-hook):
* cus-start.el (temp-buffer-show-function, display-buffer-function):
* textmodes/spell.el (spell-filter):
* textmodes/fill.el (adaptive-fill-function):
* textmodes/bibtex.el (bibtex-autokey-before-presentation-function):
* progmodes/etags.el (find-tag-default-function):
* progmodes/dcl-mode.el (dcl-calc-command-indent-function):
* progmodes/ada-mode.el (ada-popup-key): Fix :type.
2001-02-07 Eli Zaretskii <eliz@is.elta.co.il>

View File

@ -188,21 +188,21 @@ With prefix ARG, turn Which Function mode on iff arg is positive,
and off otherwise."
(interactive "P")
(setq which-func-mode-global
(or (and (null arg) which-func-mode-global)
(<= (prefix-numeric-value arg) 0)))
(and (or arg (not which-func-mode-global))
(> (prefix-numeric-value arg) 0)))
(if which-func-mode-global
;; Turn it off
;;Turn it on
(progn
(remove-hook 'post-command-idle-hook 'which-func-update)
(dolist (buf (buffer-list))
(with-current-buffer buf (setq which-func-mode nil))))
;;Turn it on
(add-hook 'post-command-idle-hook 'which-func-update)
(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
(or (eq which-func-modes t)
(member major-mode which-func-modes)))))))
(with-current-buffer buf (setq which-func-mode nil)))))
(defun which-function ()
"Return current function name based on point.