aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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).")
236 ;; slip our fold announcement into the list 236 ;; slip our fold announcement into the list
237 (setcdr outl-entry (nconc foldout-entry (cdr outl-entry))) 237 (setcdr outl-entry (nconc foldout-entry (cdr outl-entry)))
238 )) 238 ))
239
240;; outline-flag-region has different `flag' values in outline.el and
241;; noutline.el for hiding and showing text.
242
243(defconst foldout-hide-flag
244 (if (featurep 'noutline) t ?\^M))
245
246(defconst foldout-show-flag
247 (if (featurep 'noutline) nil ?\n))
239 248
240 249
241(defun foldout-zoom-subtree (&optional exposure) 250(defun foldout-zoom-subtree (&optional exposure)
@@ -358,12 +367,13 @@ exited and text is left visible."
358 (point-max)))) 367 (point-max))))
359 ;; hide the subtree 368 ;; hide the subtree
360 (if hide-fold 369 (if hide-fold
361 (outline-flag-region start-marker end-of-subtree ?\^M)) 370 (outline-flag-region start-marker end-of-subtree
371 foldout-hide-flag))
362 372
363 ;; make sure the next heading is exposed 373 ;; make sure the next heading is exposed
364 (if end-marker 374 (if end-marker
365 (outline-flag-region end-of-subtree 375 (outline-flag-region end-of-subtree beginning-of-heading
366 beginning-of-heading ?\n)) 376 foldout-show-flag))
367 )) 377 ))
368 378
369 ;; zap the markers so they don't slow down editing 379 ;; zap the markers so they don't slow down editing