Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmark buffer modified at markdown-unfontify-region-wiki-links #146

Merged
merged 1 commit into from
Jun 29, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions markdown-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -6274,8 +6274,12 @@ See `markdown-wiki-link-p' and `markdown-follow-wiki-link'."
(defun markdown-unfontify-region-wiki-links (from to)
"Remove wiki link faces from the region specified by FROM and TO."
(interactive "*r")
(remove-text-properties from to '(font-lock-face markdown-link-face))
(remove-text-properties from to '(font-lock-face markdown-missing-link-face)))
(let ((modified (buffer-modified-p)))
(remove-text-properties from to '(font-lock-face markdown-link-face))
(remove-text-properties from to '(font-lock-face markdown-missing-link-face))
;; remove-text-properties marks the buffer modified in emacs 24.3,
;; undo that if it wasn't originally marked modified
(set-buffer-modified-p modified)))

(defun markdown-fontify-region-wiki-links (from to)
"Search region given by FROM and TO for wiki links and fontify them.
Expand Down