mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-18 10:57:34 +00:00
(outline-next-heading): Make sure the match-data is correct where returning.
This commit is contained in:
parent
869331eef1
commit
baaec43f3d
1 changed files with 4 additions and 2 deletions
|
|
@ -326,9 +326,11 @@ at the end of the buffer."
|
|||
(defun outline-next-heading ()
|
||||
"Move to the next (possibly invisible) heading line."
|
||||
(interactive)
|
||||
(if (re-search-forward (concat "\n\\(?:" outline-regexp "\\)")
|
||||
;; Make sure we don't match the heading we're at.
|
||||
(if (and (bolp) (not (eobp))) (forward-char 1))
|
||||
(if (re-search-forward (concat "^\\(?:" outline-regexp "\\)")
|
||||
nil 'move)
|
||||
(goto-char (1+ (match-beginning 0)))))
|
||||
(goto-char (match-beginning 0))))
|
||||
|
||||
(defun outline-previous-heading ()
|
||||
"Move to the previous (possibly invisible) heading line."
|
||||
|
|
|
|||
Loading…
Reference in a new issue