emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/foldout.el


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/foldout.el
Date: Fri, 09 Dec 2005 15:50:17 -0500

Index: emacs/lisp/foldout.el
diff -c emacs/lisp/foldout.el:1.15 emacs/lisp/foldout.el:1.16
*** emacs/lisp/foldout.el:1.15  Sat Aug  6 22:13:42 2005
--- emacs/lisp/foldout.el       Fri Dec  9 20:50:15 2005
***************
*** 308,314 ****
  Normally causes exited folds to be hidden, but with ARG < 0, -ARG folds are
  exited and text is left visible."
    (interactive "p")
!   (let (start-marker end-marker (hide-fold t))
  
      ;; check there are some folds to leave
      (if (null foldout-fold-list)
--- 308,315 ----
  Normally causes exited folds to be hidden, but with ARG < 0, -ARG folds are
  exited and text is left visible."
    (interactive "p")
!   (let ((hide-fold t) start-marker end-marker
!       beginning-of-heading end-of-subtree)
  
      ;; check there are some folds to leave
      (if (null foldout-fold-list)
***************
*** 355,380 ****
        ;; is \n otherwise it will be hidden.  If there is a newline
        ;; before this one, make it visible too so we do the same as
        ;; outline.el and leave a blank line before the heading.
!       (if (zerop num-folds)
!         (let ((beginning-of-heading (point))
!               (end-of-subtree (if end-marker
!                                   (progn
!                                     (forward-char -1)
!                                     (if (memq (preceding-char)
!                                               '(?\n ?\^M))
!                                         (forward-char -1))
!                                     (point))
!                                 (point-max))))
!           ;; hide the subtree
!           (if hide-fold
!               (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
!                                    foldout-show-flag))
!           ))
  
        ;; zap the markers so they don't slow down editing
        (set-marker start-marker nil)
--- 356,378 ----
        ;; is \n otherwise it will be hidden.  If there is a newline
        ;; before this one, make it visible too so we do the same as
        ;; outline.el and leave a blank line before the heading.
!       (when (zerop num-folds)
!       (if end-marker
!           (setq beginning-of-heading (point)
!                 end-of-subtree (progn (forward-char -1)
!                                       (if (memq (preceding-char)
!                                                 '(?\n ?\^M))
!                                           (forward-char -1))
!                                       (point))))
!       ;; hide the subtree
!       (when hide-fold
!         (goto-char start-marker)
!         (hide-subtree))
! 
!       ;; make sure the next heading is exposed
!       (if end-marker
!           (outline-flag-region end-of-subtree beginning-of-heading
!                                foldout-show-flag)))
  
        ;; zap the markers so they don't slow down editing
        (set-marker start-marker nil)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]