# HG changeset patch # User Juri Linkov # Date 1125348541 0 # Node ID aefa34357e063fe9b85311ae25f6efc46effd4af # Parent 2670e06003350b0ebcda364062e5c88b14d1f131 (hide-entry, hide-leaves, outline-toggle-children): Put outline-back-to-heading function call inside save-excursion. diff -r 2670e0600335 -r aefa34357e06 lisp/outline.el --- a/lisp/outline.el Mon Aug 29 14:44:55 2005 +0000 +++ b/lisp/outline.el Mon Aug 29 20:49:01 2005 +0000 @@ -749,8 +749,8 @@ (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 +802,8 @@ (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 +860,12 @@ (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