From: Stefan Monnier Date: Fri, 30 Nov 2001 23:58:24 +0000 (+0000) Subject: (hide-ifdef-mode): Only modify X-Git-Tag: ttn-vms-21-2-B4~18001 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f71d927d8b0175b29dc5b79508e7a3360d533618;p=emacs.git (hide-ifdef-mode): Only modify `change-major-mode-hook' locally. Reset invisibility spec. --- diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index ab7aad28931..ba12b7cbffd 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -207,7 +207,8 @@ how the hiding is done: (default-value 'hide-ifdef-hiding)) (set (make-local-variable 'hif-outside-read-only) buffer-read-only) (set (make-local-variable 'line-move-ignore-invisible) t) - (add-hook 'change-major-mode-hook (lambda () (hide-ifdef-mode -1))) + (add-hook 'change-major-mode-hook + (lambda () (hide-ifdef-mode -1)) nil t) (add-to-invisibility-spec '(hide-ifdef . t)) @@ -216,6 +217,7 @@ how the hiding is done: (show-ifdefs))) ;; else end hide-ifdef-mode (kill-local-variable 'line-move-ignore-invisible) + (remove-from-invisibility-spec '(hide-ifdef . t)) (if hide-ifdef-hiding (show-ifdefs))))