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


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/outline.el
Date: Mon, 28 Jul 2003 17:50:05 -0400

Index: emacs/lisp/outline.el
diff -c emacs/lisp/outline.el:1.1 emacs/lisp/outline.el:1.2
*** emacs/lisp/outline.el:1.1   Fri May 30 19:30:10 2003
--- emacs/lisp/outline.el       Mon Jul 28 17:50:05 2003
***************
*** 152,158 ****
                                         (cons '(--- "---") (cdr x))))
                                   outline-mode-menu-bar-map))))))
      map))
!             
  
  (defvar outline-mode-map
    (let ((map (make-sparse-keymap)))
--- 152,158 ----
                                         (cons '(--- "---") (cdr x))))
                                   outline-mode-menu-bar-map))))))
      map))
! 
  
  (defvar outline-mode-map
    (let ((map (make-sparse-keymap)))
***************
*** 213,218 ****
--- 213,221 ----
  (defvar outline-view-change-hook nil
    "Normal hook to be run after outline visibility changes.")
  
+ (defvar outline-mode-hook nil
+   "*This hook is run when outline mode starts.")
+ 
  ;;;###autoload
  (define-derived-mode outline-mode text-mode "Outline"
    "Set major mode for editing outlines with selective display.
***************
*** 268,274 ****
         '(outline-font-lock-keywords t nil nil backward-paragraph))
    (setq imenu-generic-expression
        (list (list nil (concat "^\\(?:" outline-regexp "\\).*$") 0)))
!   (add-hook 'change-major-mode-hook 'show-all nil t))
  
  (defcustom outline-minor-mode-prefix "\C-c@"
    "*Prefix key to use for Outline commands in Outline minor mode.
--- 271,278 ----
         '(outline-font-lock-keywords t nil nil backward-paragraph))
    (setq imenu-generic-expression
        (list (list nil (concat "^\\(?:" outline-regexp "\\).*$") 0)))
!   (add-hook 'change-major-mode-hook 'show-all nil t)
!   (run-hooks 'outline-mode-hook))
  
  (defcustom outline-minor-mode-prefix "\C-c@"
    "*Prefix key to use for Outline commands in Outline minor mode.
***************
*** 440,449 ****
                          (save-match-data
                            (outline-up-heading 1 t)
                            (match-string 0))))))
!       
        (unless (rassoc level outline-heading-alist)
        (push (cons head level) outline-heading-alist))
!       
        (replace-match up-head nil t)))))
  
  (defun outline-demote (&optional children)
--- 444,453 ----
                          (save-match-data
                            (outline-up-heading 1 t)
                            (match-string 0))))))
! 
        (unless (rassoc level outline-heading-alist)
        (push (cons head level) outline-heading-alist))
! 
        (replace-match up-head nil t)))))
  
  (defun outline-demote (&optional children)
***************
*** 555,561 ****
    "Move the currrent subtree down past ARG headlines of the same level."
    (interactive "p")
    (let ((re (concat "^" outline-regexp))
!       (movfunc (if (> arg 0) 'outline-get-next-sibling 
                   'outline-get-last-sibling))
        (ins-point (make-marker))
        (cnt (abs arg))
--- 559,565 ----
    "Move the currrent subtree down past ARG headlines of the same level."
    (interactive "p")
    (let ((re (concat "^" outline-regexp))
!       (movfunc (if (> arg 0) 'outline-get-next-sibling
                   'outline-get-last-sibling))
        (ins-point (make-marker))
        (cnt (abs arg))
***************
*** 563,570 ****
      ;; Select the tree
      (outline-back-to-heading)
      (setq beg (point))
!     (save-match-data 
!       (save-excursion (outline-end-of-heading) 
                      (setq folded (outline-invisible-p)))
        (outline-end-of-subtree))
      (if (= (char-after) ?\n) (forward-char 1))
--- 567,574 ----
      ;; Select the tree
      (outline-back-to-heading)
      (setq beg (point))
!     (save-match-data
!       (save-excursion (outline-end-of-heading)
                      (setq folded (outline-invisible-p)))
        (outline-end-of-subtree))
      (if (= (char-after) ?\n) (forward-char 1))
***************
*** 578,584 ****
        (setq cnt (1- cnt)))
      (if (> arg 0)
        ;; Moving forward - still need to move over subtree
!       (progn (outline-end-of-subtree) 
               (if (= (char-after) ?\n) (forward-char 1))))
      (move-marker ins-point (point))
      (insert (delete-and-extract-region beg end))
--- 582,588 ----
        (setq cnt (1- cnt)))
      (if (> arg 0)
        ;; Moving forward - still need to move over subtree
!       (progn (outline-end-of-subtree)
               (if (= (char-after) ?\n) (forward-char 1))))
      (move-marker ins-point (point))
      (insert (delete-and-extract-region beg end))
***************
*** 657,663 ****
        ;; reveal do the rest, by simply doing:
        ;; (remove-overlays (overlay-start o) (overlay-end o)
        ;;                  'invisible 'outline)
!       ;; 
        ;; That works fine as long as everything is in sync, but if the
        ;; structure of the document is changed while revealing parts of it,
        ;; the resulting behavior can be ugly.  I.e. we need to make
--- 661,667 ----
        ;; reveal do the rest, by simply doing:
        ;; (remove-overlays (overlay-start o) (overlay-end o)
        ;;                  'invisible 'outline)
!       ;;
        ;; That works fine as long as everything is in sync, but if the
        ;; structure of the document is changed while revealing parts of it,
        ;; the resulting behavior can be ugly.  I.e. we need to make




reply via email to

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