changeset 17853:3af728d1f6cf

(outline-mode): Use `add-to-invisibility-spec' and set the invisible property to `outline'. (outline-minor-mode): Likewise. Also, use `remove-from-invisibility-spec'. (outline-flag-region): Set `outline' as the invisible property.
author Richard M. Stallman <rms@gnu.org>
date Sat, 17 May 1997 03:12:03 +0000
parents a9f18d920c11
children 853150d40e56
files lisp/textmodes/outline.el
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/outline.el	Sat May 17 02:01:42 1997 +0000
+++ b/lisp/textmodes/outline.el	Sat May 17 03:12:03 1997 +0000
@@ -214,7 +214,7 @@
   (make-local-variable 'line-move-ignore-invisible)
   (setq line-move-ignore-invisible t)
   ;; Cause use of ellipses for invisible text.
-  (setq buffer-invisibility-spec '((t . t)))
+  (add-to-invisibility-spec '(outline . t))
   (make-local-variable 'paragraph-start)
   (setq paragraph-start (concat paragraph-start "\\|\\("
 				outline-regexp "\\)"))
@@ -270,11 +270,11 @@
 	(make-local-variable 'line-move-ignore-invisible)
 	(setq line-move-ignore-invisible t)
 	;; Cause use of ellipses for invisible text.
-	(setq buffer-invisibility-spec '((t . t)))
+	(add-to-invisibility-spec '(outline . t))
 	(run-hooks 'outline-minor-mode-hook))
     (setq line-move-ignore-invisible nil)
     ;; Cause use of ellipses for invisible text.
-    (setq buffer-invisibility-spec t))
+    (remove-from-invisibility-spec '(outline . t)))
   ;; When turning off outline mode, get rid of any outline hiding.
   (or outline-minor-mode
       (show-all))
@@ -402,7 +402,7 @@
       (outline-discard-overlays (point) to 'outline)
       (if flag
 	  (let ((o (make-overlay (point) to)))
-	    (overlay-put o 'invisible flag)
+	    (overlay-put o 'invisible 'outline)
 	    (overlay-put o 'outline t)))))
   (run-hooks 'outline-view-change-hook))