summaryrefslogtreecommitdiff
path: root/lisp/foldout.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-08-30 03:17:56 +0000
committerRichard M. Stallman <rms@gnu.org>1996-08-30 03:17:56 +0000
commit4fcb3ccf63429b01d95f3d22b28223f644bdccf2 (patch)
tree62b29e07b61b350ef64f0093ab49b62707796f80 /lisp/foldout.el
parent9fc0eb951065e13f82e55148444c734612adf3d0 (diff)
downloademacs-4fcb3ccf63429b01d95f3d22b28223f644bdccf2.tar.gz
(foldout-hide-flag, foldout-show-flag): New variables.
(foldout-exit-fold): Use those variables.
Diffstat (limited to 'lisp/foldout.el')
-rw-r--r--lisp/foldout.el16
1 files changed, 13 insertions, 3 deletions
diff --git a/lisp/foldout.el b/lisp/foldout.el
index f89c9c28771..ad9bfe2c2ec 100644
--- a/lisp/foldout.el
+++ b/lisp/foldout.el
@@ -236,6 +236,15 @@ An end marker of NIL means the fold ends after (point-max).")
;; slip our fold announcement into the list
(setcdr outl-entry (nconc foldout-entry (cdr outl-entry)))
))
+
+;; outline-flag-region has different `flag' values in outline.el and
+;; noutline.el for hiding and showing text.
+
+(defconst foldout-hide-flag
+ (if (featurep 'noutline) t ?\^M))
+
+(defconst foldout-show-flag
+ (if (featurep 'noutline) nil ?\n))
(defun foldout-zoom-subtree (&optional exposure)
@@ -358,12 +367,13 @@ exited and text is left visible."
(point-max))))
;; hide the subtree
(if hide-fold
- (outline-flag-region start-marker end-of-subtree ?\^M))
+ (outline-flag-region start-marker end-of-subtree
+ foldout-hide-flag))
;; make sure the next heading is exposed
(if end-marker
- (outline-flag-region end-of-subtree
- beginning-of-heading ?\n))
+ (outline-flag-region end-of-subtree beginning-of-heading
+ foldout-show-flag))
))
;; zap the markers so they don't slow down editing