diff options
| author | Chong Yidong | 2007-03-31 18:32:05 +0000 |
|---|---|---|
| committer | Chong Yidong | 2007-03-31 18:32:05 +0000 |
| commit | 996ae468d4b75767bc92f9a64cfef2a58ff1b495 (patch) | |
| tree | 5550e72385fc1d55cf2b097b209c967b02e02130 | |
| parent | d0653e2160effb00ad0bc74508ad2c5b3086b179 (diff) | |
| download | emacs-996ae468d4b75767bc92f9a64cfef2a58ff1b495.tar.gz emacs-996ae468d4b75767bc92f9a64cfef2a58ff1b495.zip | |
(turn-off-hideshow): New function.
(hs-minor-mode): Use it instead of a lambda expression in
change-major-mode-hook.
| -rw-r--r-- | lisp/progmodes/hideshow.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 3bc1c55cc7d..ee88417bfc0 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -184,7 +184,6 @@ | |||
| 184 | ;; (5) Hideshow interacts badly with Ediff and `vc-diff'. At the moment, the | 184 | ;; (5) Hideshow interacts badly with Ediff and `vc-diff'. At the moment, the |
| 185 | ;; suggested workaround is to turn off hideshow entirely, for example: | 185 | ;; suggested workaround is to turn off hideshow entirely, for example: |
| 186 | ;; | 186 | ;; |
| 187 | ;; (defun turn-off-hideshow () (hs-minor-mode -1)) | ||
| 188 | ;; (add-hook 'ediff-prepare-buffer-hook 'turn-off-hideshow) | 187 | ;; (add-hook 'ediff-prepare-buffer-hook 'turn-off-hideshow) |
| 189 | ;; (add-hook 'vc-before-checkin-hook 'turn-off-hideshow) | 188 | ;; (add-hook 'vc-before-checkin-hook 'turn-off-hideshow) |
| 190 | ;; | 189 | ;; |
| @@ -908,7 +907,7 @@ Key bindings: | |||
| 908 | (hs-grok-mode-type) | 907 | (hs-grok-mode-type) |
| 909 | ;; Turn off this mode if we change major modes. | 908 | ;; Turn off this mode if we change major modes. |
| 910 | (add-hook 'change-major-mode-hook | 909 | (add-hook 'change-major-mode-hook |
| 911 | (lambda () (hs-minor-mode -1)) | 910 | 'turn-off-hideshow |
| 912 | nil t) | 911 | nil t) |
| 913 | (easy-menu-add hs-minor-mode-menu) | 912 | (easy-menu-add hs-minor-mode-menu) |
| 914 | (set (make-local-variable 'line-move-ignore-invisible) t) | 913 | (set (make-local-variable 'line-move-ignore-invisible) t) |
| @@ -920,6 +919,11 @@ Key bindings: | |||
| 920 | (hs-show-all))) | 919 | (hs-show-all))) |
| 921 | (run-hooks 'hs-minor-mode-hook)) | 920 | (run-hooks 'hs-minor-mode-hook)) |
| 922 | 921 | ||
| 922 | ;;;###autoload | ||
| 923 | (defun turn-off-hideshow () | ||
| 924 | "Unconditionally turn off hideshow minor mode." | ||
| 925 | (hs-minor-mode -1)) | ||
| 926 | |||
| 923 | ;;--------------------------------------------------------------------------- | 927 | ;;--------------------------------------------------------------------------- |
| 924 | ;; load-time actions | 928 | ;; load-time actions |
| 925 | 929 | ||