emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master b68d52c 1/2: * lisp/emacs-lisp/lisp-mnt.el (lm-section-end): Stop


From: Stefan Monnier
Subject: master b68d52c 1/2: * lisp/emacs-lisp/lisp-mnt.el (lm-section-end): Stop at the right heading
Date: Wed, 23 Dec 2020 18:32:01 -0500 (EST)

branch: master
commit b68d52c81b53ebe993620e1b80a1c923987b089b
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * lisp/emacs-lisp/lisp-mnt.el (lm-section-end): Stop at the right heading
    
    `lisp-outline-level` assumes the match-data is that set by
    `outline-regexp`.
---
 lisp/emacs-lisp/lisp-mnt.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el
index 0d57bc1..f190156 100644
--- a/lisp/emacs-lisp/lisp-mnt.el
+++ b/lisp/emacs-lisp/lisp-mnt.el
@@ -208,6 +208,7 @@ a section."
     (when start
       (save-excursion
         (goto-char start)
+        (looking-at outline-regexp)
         (let ((level (lisp-outline-level))
               (case-fold-search t)
               next-section-found)
@@ -218,6 +219,7 @@ a section."
                              nil t))
                       (> (save-excursion
                            (beginning-of-line)
+                           (looking-at outline-regexp)
                            (lisp-outline-level))
                          level)))
          (min (if next-section-found



reply via email to

[Prev in Thread] Current Thread [Next in Thread]