]> git.eshelyaron.com Git - emacs.git/commitdiff
(outline-insert-heading): Tighten up match.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 21 Jan 2004 03:26:30 +0000 (03:26 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 21 Jan 2004 03:26:30 +0000 (03:26 +0000)
(outline-demote, outline-move-subtree-down): Don't assume anything
about outline-regexp.

lisp/ChangeLog
lisp/outline.el

index cbe11dc95607cda1e6c06504622ca2013e5be772..448625463929fd06b7bd3141986e95550665b279 100644 (file)
@@ -1,3 +1,12 @@
+2004-01-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * outline.el (outline-insert-heading): Tighten up match.
+       (outline-demote, outline-move-subtree-down): Don't assume anything
+       about outline-regexp.
+
+       * textmodes/texinfo.el (texinfo-mode): Remove ^ from outline-regexp.
+       (texinfo-show-structure): Explicitly add ^, and simplify.
+
 2004-01-20  Glenn Morris  <gmorris@ast.cam.ac.uk>
 
        * calendar/appt.el (appt-check): Restore usage of
        * vc.el (vc-default-previous-version): Doc enhancement.
        (vc-default-next-version): New function.
        (vc-print-log): New arg FOCUS-REV.
-       (vc-annotate-mode):  Derives from view-mode now.
-       (vc-annotate):  New args REVISION, DISPLAY-MODE.
-       (vc-annotate-prev-version): New function.
-       (vc-annotate-prev-version): New function.
-       (vc-annotate-next-version): New function.
-       (vc-annotate-workfile-version): New function.
-       (vc-annotate-extract-revision-at-line): New function.
-       (vc-annotate-revision-at-line): New function.
-       (vc-annotate-revision-previous-to-line): New function.
-       (vc-annotate-show-log-revision-at-line): New function.
-       (vc-annotate-show-diff-revision-at-line): New function.
-       (vc-current-line): New function.
-       (vc-annotate-warp-version): New function.
-        
-       * vc-cvs.el (vc-cvs-annotate-extract-revision-at-line): New
-       function.
+       (vc-annotate-mode): Derive from view-mode.
+       (vc-annotate): New args REVISION, DISPLAY-MODE.
+       (vc-annotate-workfile-version, vc-annotate-extract-revision-at-line)
+       (vc-annotate-revision-at-line, vc-annotate-revision-previous-to-line)
+       (vc-annotate-show-log-revision-at-line, vc-annotate-warp-version)
+       (vc-annotate-show-diff-revision-at-line, vc-current-line)
+       (vc-annotate-prev-version, vc-annotate-next-version): New functions.
+
+       * vc-cvs.el (vc-cvs-annotate-extract-revision-at-line): New function.
 
 2004-01-19  Karl Berry  <karl@gnu.org>
 
 
 2004-01-19  Karl Berry  <karl@gnu.org>
 
-       * textmodes/texinfo.el (texinfo-mode): define outline-regexp to start
+       * textmodes/texinfo.el (texinfo-mode): Define outline-regexp to start
        with ^, since that's what texinfo-show-structure
        documentation says (plus it works much better in texinfo.txi).
 
 2004-01-18  Jesper Harder  <harder@ifa.au.dk>
 
-       * mail/smtpmail.el (smtpmail-send-data): Don't append spurious
-        newline.
+       * mail/smtpmail.el (smtpmail-send-data): Don't append spurious newline.
 
 2004-01-18   David Ponce  <david@dponce.com>  (tiny change)
 
        * progmodes/which-func.el (which-function-mode): Don't cancel
-        which-func-update-timer if not set.
+       which-func-update-timer if not set.
 
 2004-01-17  Thien-Thi Nguyen  <ttn@gnu.org>
 
@@ -77,7 +78,7 @@
        Save and restore the deletion status of old messages when reading
        new mail with spam filter, so that expunging spam does not expunge
        msgs deleted by the user.
-       (rmail-only-expunge): added an optional argument dont-show to
+       (rmail-only-expunge): Add an optional argument dont-show to
        prevent showing message after expunge.
 
 2004-01-15  Luc Teirlinck  <teirllm@auburn.edu>
index fa63fef66a4a2637f9dd36e2e919931ab230f43c..59aeb233fdd8a4fdd6c4f98065fe770ae6680cfa 100644 (file)
@@ -1,6 +1,6 @@
 ;;; outline.el --- outline mode commands for Emacs
 
-;; Copyright (C) 1986, 93, 94, 95, 97, 2000, 2001
+;; Copyright (C) 1986, 93, 94, 95, 97, 2000, 01, 2004
 ;;   Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
@@ -410,7 +410,8 @@ If INVISIBLE-OK is non-nil, an invisible heading line is ok too."
                    (or (caar outline-heading-alist) "")
                  (match-string 0)))))
     (unless (or (string-match "[ \t]\\'" head)
-               (not (string-match outline-regexp (concat head " "))))
+               (not (string-match (concat "\\`\\(?:" outline-regexp "\\)")
+                                  (concat head " "))))
       (setq head (concat head " ")))
     (unless (bolp) (end-of-line) (newline))
     (insert head)
@@ -486,7 +487,8 @@ in the region."
                  ;; Bummer!! There is no lower heading in the buffer.
                  ;; Let's try to invent one by repeating the first char.
                  (let ((new-head (concat (substring head 0 1) head)))
-                   (if (string-match (concat "\\`" outline-regexp) new-head)
+                   (if (string-match (concat "\\`\\(?:" outline-regexp "\\)")
+                                     new-head)
                        ;; Why bother checking that it is indeed lower level ?
                        new-head
                      ;; Didn't work: keep it as is so it's still a heading.
@@ -557,7 +559,7 @@ the match data is set appropriately."
 (defun outline-move-subtree-down (&optional arg)
   "Move the currrent subtree down past ARG headlines of the same level."
   (interactive "p")
-  (let ((re (concat "^" outline-regexp))
+  (let ((re (concat "^\\(?:" outline-regexp "\\)"))
        (movfunc (if (> arg 0) 'outline-get-next-sibling
                   'outline-get-last-sibling))
        (ins-point (make-marker))