From 3d0dd8ff4a6681225b4e64728c820833c61773f7 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 15 Apr 2009 23:32:23 +0000 Subject: [PATCH] * outline.el (hide-sublevels): Ensure that arguments are passed to outline-flag-region in the correct order (Bug#3000). --- lisp/ChangeLog | 5 +++++ lisp/outline.el | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9b5e6cd6176..7e333b37db7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-04-15 William Xu + + * outline.el (hide-sublevels): Ensure that arguments are passed to + outline-flag-region in the correct order (Bug#3000). + 2009-04-15 Katsumi Yamaoka * net/browse-url.el (browse-url-filename-alist): Correct file diff --git a/lisp/outline.el b/lisp/outline.el index e1e91271883..250f2e16335 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -905,6 +905,8 @@ Show the heading too, if it is currently invisible." (goto-char (point-max)) ;; Keep empty last line, if available. (if (bolp) (1- (point)) (point))))) + (if (< end beg) + (setq beg (prog1 end (setq end beg)))) ;; First hide everything. (outline-flag-region beg end t) ;; Then unhide the top level headers. -- 2.11.4.GIT