Skip to content

Commit 6c44b03

Browse files
author
Danny McClanahan
committed
fix cleanup-list-numbers infinite loop
1 parent acd2c4c commit 6c44b03

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

markdown-mode.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5166,8 +5166,9 @@ a list."
51665166
(setq cpfx (match-string-no-properties 1))
51675167
(cond
51685168
((string= cpfx pfx)
5169-
(replace-match
5170-
(concat pfx (number-to-string (setq idx (1+ idx))) ". "))
5169+
(save-excursion
5170+
(replace-match
5171+
(concat pfx (number-to-string (setq idx (1+ idx))) ". ")))
51715172
(setq sep nil))
51725173
;; indented a level
51735174
((string< pfx cpfx)

0 commit comments

Comments
 (0)