emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/outline.el [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/outline.el [emacs-unicode-2]
Date: Mon, 28 Jun 2004 04:36:22 -0400

Index: emacs/lisp/outline.el
diff -c emacs/lisp/outline.el:1.3.2.1 emacs/lisp/outline.el:1.3.2.2
*** emacs/lisp/outline.el:1.3.2.1       Fri Apr 16 12:50:08 2004
--- emacs/lisp/outline.el       Mon Jun 28 07:28:43 2004
***************
*** 216,221 ****
--- 216,224 ----
  (defvar outline-mode-hook nil
    "*This hook is run when outline mode starts.")
  
+ (defvar outline-blank-line nil
+   "*Non-nil means to leave unhidden blank line before heading.")
+ 
  ;;;###autoload
  (define-derived-mode outline-mode text-mode "Outline"
    "Set major mode for editing outlines with selective display.
***************
*** 349,355 ****
    (if (re-search-forward (concat "\n\\(?:" outline-regexp "\\)")
                         nil 'move)
        (goto-char (match-beginning 0)))
!   (if (and (bolp) (not (bobp)))
        (forward-char -1)))
  
  (defun outline-next-heading ()
--- 352,358 ----
    (if (re-search-forward (concat "\n\\(?:" outline-regexp "\\)")
                         nil 'move)
        (goto-char (match-beginning 0)))
!   (if (and (bolp) (or outline-blank-line (eobp)) (not (bobp)))
        (forward-char -1)))
  
  (defun outline-next-heading ()
***************
*** 706,713 ****
    "Hide the body directly following this heading."
    (interactive)
    (outline-back-to-heading)
-   (outline-end-of-heading)
    (save-excursion
      (outline-flag-region (point) (progn (outline-next-preface) (point)) t)))
  
  (defun show-entry ()
--- 709,716 ----
    "Hide the body directly following this heading."
    (interactive)
    (outline-back-to-heading)
    (save-excursion
+     (outline-end-of-heading)
      (outline-flag-region (point) (progn (outline-next-preface) (point)) t)))
  
  (defun show-entry ()
***************
*** 770,778 ****
  (defun outline-show-heading ()
    "Show the current heading and move to its end."
    (outline-flag-region (- (point)
!                         (if (bobp) 0
!                           (if (eq (char-before (1- (point))) ?\n)
!                               2 1)))
                       (progn (outline-end-of-heading) (point))
                       nil))
  
--- 773,782 ----
  (defun outline-show-heading ()
    "Show the current heading and move to its end."
    (outline-flag-region (- (point)
!                         (if (bobp) 0
!                           (if (and outline-blank-line
!                                      (eq (char-before (1- (point))) ?\n))
!                               2 1)))
                       (progn (outline-end-of-heading) (point))
                       nil))
  
***************
*** 841,849 ****
        (progn
          ;; Go to end of line before heading
          (forward-char -1)
!         (if (bolp)
!             ;; leave blank line before heading
!             (forward-char -1))))))
  
  (defun show-branches ()
    "Show all subheadings of this heading, but not their bodies."
--- 845,853 ----
        (progn
          ;; Go to end of line before heading
          (forward-char -1)
!           (if (and outline-blank-line (bolp))
!             ;; leave blank line before heading
!             (forward-char -1))))))
  
  (defun show-branches ()
    "Show all subheadings of this heading, but not their bodies."
***************
*** 884,889 ****
--- 888,895 ----
  With argument, move up ARG levels.
  If INVISIBLE-OK is non-nil, also consider invisible lines."
    (interactive "p")
+   (and (eq this-command 'outline-up-heading)
+        (or (eq last-command 'outline-up-heading) (push-mark)))
    (outline-back-to-heading invisible-ok)
    (let ((start-level (funcall outline-level)))
      (if (eq start-level 1)




reply via email to

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