From: Richard M. Stallman Date: Sat, 17 May 1997 03:12:03 +0000 (+0000) Subject: (outline-mode): Use `add-to-invisibility-spec' and X-Git-Tag: emacs-20.1~2092 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=65c1b8a19e31db9be66e84699f0b41bcc7b2c7b9;p=emacs.git (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. --- diff --git a/lisp/textmodes/outline.el b/lisp/textmodes/outline.el index f2f32405fda..bf15f6186f0 100644 --- a/lisp/textmodes/outline.el +++ b/lisp/textmodes/outline.el @@ -214,7 +214,7 @@ Turning on outline mode calls the value of `text-mode-hook' and then of (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 @@ See the command `outline-mode' for more information on this mode." (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 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden." (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))