comparison lisp/foldout.el @ 15984:111178229e50

(foldout-hide-flag, foldout-show-flag): New variables. (foldout-exit-fold): Use those variables.
author Richard M. Stallman <rms@gnu.org>
date Fri, 30 Aug 1996 03:17:56 +0000
parents 83f275dcd93a
children eb628ee6aa2b
comparison
equal deleted inserted replaced
15983:9a41bae14122 15984:111178229e50
234 (error "Can't find outline-minor-mode in minor-mode-alist")) 234 (error "Can't find outline-minor-mode in minor-mode-alist"))
235 235
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)
242 "Open the subtree under the current heading and narrow to it. 251 "Open the subtree under the current heading and narrow to it.
243 252
356 (forward-char -1)) 365 (forward-char -1))
357 (point)) 366 (point))
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
370 (set-marker start-marker nil) 380 (set-marker start-marker nil)
371 (if end-marker (set-marker end-marker nil)) 381 (if end-marker (set-marker end-marker nil))