Mercurial > emacs
changeset 76844:ab61d371ed56
(turn-off-hideshow): New function.
(hs-minor-mode): Use it instead of a lambda expression in
change-major-mode-hook.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 31 Mar 2007 18:32:05 +0000 |
parents | 56e7e274cc62 |
children | 638ed5cc0e55 |
files | lisp/progmodes/hideshow.el |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/hideshow.el Sat Mar 31 18:31:51 2007 +0000 +++ b/lisp/progmodes/hideshow.el Sat Mar 31 18:32:05 2007 +0000 @@ -184,7 +184,6 @@ ;; (5) Hideshow interacts badly with Ediff and `vc-diff'. At the moment, the ;; suggested workaround is to turn off hideshow entirely, for example: ;; -;; (defun turn-off-hideshow () (hs-minor-mode -1)) ;; (add-hook 'ediff-prepare-buffer-hook 'turn-off-hideshow) ;; (add-hook 'vc-before-checkin-hook 'turn-off-hideshow) ;; @@ -908,7 +907,7 @@ (hs-grok-mode-type) ;; Turn off this mode if we change major modes. (add-hook 'change-major-mode-hook - (lambda () (hs-minor-mode -1)) + 'turn-off-hideshow nil t) (easy-menu-add hs-minor-mode-menu) (set (make-local-variable 'line-move-ignore-invisible) t) @@ -920,6 +919,11 @@ (hs-show-all))) (run-hooks 'hs-minor-mode-hook)) +;;;###autoload +(defun turn-off-hideshow () + "Unconditionally turn off hideshow minor mode." + (hs-minor-mode -1)) + ;;--------------------------------------------------------------------------- ;; load-time actions