]> code.delx.au - gnu-emacs/blobdiff - lisp/outline.el
Merge from emacs-23
[gnu-emacs] / lisp / outline.el
index d5761cb205da725b6659e6e83b8239ec7e18acbe..4729f3665d546b9b8cd6ffb99b13908f1c9301de 100644 (file)
@@ -41,7 +41,7 @@
 (defgroup outlines nil
   "Support for hierarchical outlining."
   :prefix "outline-"
-  :group 'editing)
+  :group 'wp)
 
 (defcustom outline-regexp "[*\^L]+"
   "Regular expression to match the beginning of a heading.
@@ -445,10 +445,6 @@ at the end of the buffer."
   "Non-nil if the character after point is invisible."
   (get-char-property (or pos (point)) 'invisible))
 
-(defun outline-visible ()
-  (not (outline-invisible-p)))
-(make-obsolete 'outline-visible 'outline-invisible-p "21.1")
-
 (defun outline-back-to-heading (&optional invisible-ok)
   "Move to previous heading line, or beg of this line if it's a heading.
 Only visible heading lines are considered, unless INVISIBLE-OK is non-nil."
@@ -915,7 +911,11 @@ Show the heading too, if it is currently invisible."
        (lambda ()
         (if (<= (funcall outline-level) levels)
             (outline-show-heading)))
-       beg end)))
+       beg end)
+      ;; Finally unhide any trailing newline.
+      (goto-char (point-max))
+      (if (and (bolp) (not (bobp)) (outline-invisible-p (1- (point))))
+          (outline-flag-region (1- (point)) (point) nil))))
   (run-hooks 'outline-view-change-hook))
 
 (defun hide-other ()