]> code.delx.au - gnu-emacs/blobdiff - lisp/outline.el
(byte-compile-file-form-defalias):
[gnu-emacs] / lisp / outline.el
index 714e7ec02ea6d8ad003a3c7a760eaf9b87f9ab4c..8a05aaf0cd93ac82403fcde8bf2d25b083529c9c 100644 (file)
@@ -37,6 +37,9 @@
 
 ;;; Code:
 
+(defvar font-lock-warning-face)
+
+
 (defgroup outlines nil
   "Support for hierarchical outlining."
   :prefix "outline-"
@@ -682,7 +685,7 @@ This puts point at the start of the current subtree, and mark at the end."
       (outline-previous-visible-heading 1))
     (setq beg (point))
     (outline-end-of-subtree)
-    (push-mark (point))
+    (push-mark (point) nil t)
     (goto-char beg)))
 \f
 
@@ -749,8 +752,8 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden."
 (defun hide-entry ()
   "Hide the body directly following this heading."
   (interactive)
-  (outline-back-to-heading)
   (save-excursion
+    (outline-back-to-heading)
     (outline-end-of-heading)
     (outline-flag-region (point) (progn (outline-next-preface) (point)) t)))
 
@@ -802,8 +805,8 @@ Show the heading too, if it is currently invisible."
 (defun hide-leaves ()
   "Hide all body after this heading at deeper levels."
   (interactive)
-  (outline-back-to-heading)
   (save-excursion
+    (outline-back-to-heading)
     (outline-end-of-heading)
     (hide-region-body (point) (progn (outline-end-of-subtree) (point)))))
 
@@ -860,11 +863,12 @@ Show the heading too, if it is currently invisible."
 (defun outline-toggle-children ()
   "Show or hide the current subtree depending on its current state."
   (interactive)
-  (outline-back-to-heading)
-  (if (not (outline-invisible-p (line-end-position)))
-      (hide-subtree)
-    (show-children)
-    (show-entry)))
+  (save-excursion
+    (outline-back-to-heading)
+    (if (not (outline-invisible-p (line-end-position)))
+       (hide-subtree)
+      (show-children)
+      (show-entry))))
 
 (defun outline-flag-subtree (flag)
   (save-excursion