diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 888b39645fd..80f5c801f7b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-02-08 Stefan Monnier + + * which-func.el (which-func-mode): Invert which-func-mode-global. + Fix from Juanma Barranquero . + 2001-02-08 Dave Love * 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 diff --git a/lisp/which-func.el b/lisp/which-func.el index b043753e688..5a70d5478c7 100644 --- a/lisp/which-func.el +++ b/lisp/which-func.el @@ -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.