Skip to content

Commit

Permalink
Add missing save-match-data
Browse files Browse the repository at this point in the history
  • Loading branch information
phst authored and Jason Blevins committed Jul 10, 2017
1 parent 8c3bb3f commit 00a92b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion markdown-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,11 @@ and END are the previous region to refontify."
;; (point-max) is deleted, but font-lock-extend-region-functions
;; are called. Force a syntax property update in that case.
(when (= end (point-max))
(markdown-syntax-propertize (car res) (cdr res)))
;; This function is called in a buffer modification hook.
;; `markdown-syntax-propertize' doesn't save the match data,
;; so we have to do it here.
(save-match-data
(markdown-syntax-propertize (car res) (cdr res))))
(setq jit-lock-start (car res)
jit-lock-end (cdr res)))))

Expand Down

0 comments on commit 00a92b6

Please sign in to comment.