Skip to content

Commit

Permalink
Save buffer before executing markdown-open-command
Browse files Browse the repository at this point in the history
Closes GH-248
  • Loading branch information
jrblevin committed Oct 17, 2017
1 parent 9614c21 commit 6b40a3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

- Allow `markdown-command` and `markdown-open-command` to be
functions. ([GH-255][], [GH-263][])
- Save the buffer before running `markdown-open-command`.
Thanks to Dmitry Safronov for a patch.
([GH-248][])

* Bug fixes:

Expand All @@ -34,6 +37,7 @@
[gh-229]: https://github.com/jrblevin/markdown-mode/pull/229
[gh-238]: https://github.com/jrblevin/markdown-mode/issues/238
[gh-246]: https://github.com/jrblevin/markdown-mode/issues/246
[gh-248]: https://github.com/jrblevin/markdown-mode/issues/248
[gh-252]: https://github.com/jrblevin/markdown-mode/pull/252
[gh-254]: https://github.com/jrblevin/markdown-mode/issues/254
[gh-255]: https://github.com/jrblevin/markdown-mode/issues/255
Expand Down
1 change: 1 addition & 0 deletions markdown-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -7837,6 +7837,7 @@ update this buffer's contents."
(if (stringp markdown-open-command)
(if (not buffer-file-name)
(user-error "Must be visiting a file")
(save-buffer)
(call-process markdown-open-command nil nil nil buffer-file-name))
(funcall markdown-open-command))
nil)
Expand Down

0 comments on commit 6b40a3b

Please sign in to comment.