Skip to content

Commit

Permalink
add markdown-live-preview-re-export
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny McClanahan committed Jan 4, 2016
1 parent c0bb1c9 commit b14cdbc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions markdown-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -5240,6 +5240,15 @@ output buffer in another window."
(markdown-display-buffer-other-window (markdown-live-preview-export)))
(markdown-live-preview-mode))

(defun markdown-live-preview-re-export ()
(interactive)
"If the current buffer is a buffer displaying the exported version of a
`markdown-live-preview-mode' buffer, call `markdown-live-preview-export' and
update this buffer's contents."
(when markdown-live-preview-source-buffer
(with-current-buffer markdown-live-preview-source-buffer
(markdown-live-preview-export))))

(defun markdown-open ()
"Open file for the current buffer with `markdown-open-command'."
(interactive)
Expand Down

0 comments on commit b14cdbc

Please sign in to comment.