diff lisp/outline.el @ 90361:a7364c1a561e

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-40 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 135-143) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 49-55) - Merge from emacs--devo--0 - Update from CVS - Update from CVS: Makefile.in (release-*): New targets.
author Miles Bader <miles@gnu.org>
date Thu, 09 Mar 2006 07:15:37 +0000
parents c5406394f567 c379d6c262b1
children a5812696f7bf
line wrap: on
line diff
--- a/lisp/outline.el	Thu Mar 09 01:23:04 2006 +0000
+++ b/lisp/outline.el	Thu Mar 09 07:15:37 2006 +0000
@@ -46,7 +46,7 @@
   :group 'editing)
 
 (defcustom outline-regexp "[*\^L]+"
-  "*Regular expression to match the beginning of a heading.
+  "Regular expression to match the beginning of a heading.
 Any line whose beginning matches this regexp is considered to start a heading.
 Note that Outline mode only checks this regexp at the start of a line,
 so the regexp need not (and usually does not) start with `^'.
@@ -56,7 +56,7 @@
   :group 'outlines)
 
 (defcustom outline-heading-end-regexp "\n"
-  "*Regular expression to match the end of a heading line.
+  "Regular expression to match the end of a heading line.
 You can assume that point is at the beginning of a heading when this
 regexp is searched for.  The heading ends at the end of the match.
 The recommended way to set this is with a `Local Variables:' list
@@ -828,7 +828,13 @@
 
 (defun hide-sublevels (levels)
   "Hide everything but the top LEVELS levels of headers, in whole buffer."
-  (interactive "p")
+  (interactive (list
+		(cond
+		 (current-prefix-arg (prefix-numeric-value current-prefix-arg))
+		 ((save-excursion (beginning-of-line)
+				  (looking-at outline-regexp))
+		  (funcall outline-level))
+		 (t 1))))
   (if (< levels 1)
       (error "Must keep at least one level of headers"))
   (let (outline-view-change-hook)