changeset 5306:a2f8f9c4e29b

(outline-minor-mode): When turning off the mode, turn ^Ms back to \n's. (outline-mode): Set change-major-mode-hook.
author Richard M. Stallman <rms@gnu.org>
date Thu, 23 Dec 1993 04:47:13 +0000
parents 1a32c9c9cfbb
children 069c54e77fd1
files lisp/textmodes/ooutline.el
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/ooutline.el	Thu Dec 23 04:46:18 1993 +0000
+++ b/lisp/textmodes/ooutline.el	Thu Dec 23 04:47:13 1993 +0000
@@ -162,6 +162,7 @@
   (make-local-variable 'paragraph-separate)
   (setq paragraph-separate (concat paragraph-separate "\\|^\\("
 				   outline-regexp "\\)"))
+  (add-hooks 'change-major-mode-hook 'show-all)
   (run-hooks 'text-mode-hook 'outline-mode-hook))
 
 (defvar outline-minor-mode-prefix "\C-c"
@@ -195,6 +196,9 @@
 	(setq selective-display t)
 	(run-hooks 'outline-minor-mode-hook))
     (setq selective-display nil))
+  ;; When turning off outline mode, get rid of any ^M's.
+  (or outline-minor-mode
+      (outline-flag-region (point-min) (point-max) ?\n))
   (set-buffer-modified-p (buffer-modified-p)))
 
 (defvar outline-level 'outline-level