Skip to content

Commit

Permalink
fix cleanup-list-numbers infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny McClanahan committed Feb 19, 2016
1 parent acd2c4c commit 6c44b03
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions markdown-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -5166,8 +5166,9 @@ a list."
(setq cpfx (match-string-no-properties 1))
(cond
((string= cpfx pfx)
(replace-match
(concat pfx (number-to-string (setq idx (1+ idx))) ". "))
(save-excursion
(replace-match
(concat pfx (number-to-string (setq idx (1+ idx))) ". ")))
(setq sep nil))
;; indented a level
((string< pfx cpfx)
Expand Down

0 comments on commit 6c44b03

Please sign in to comment.