preview file cleanup

This commit is contained in:
Igor Shymko 2016-08-29 23:58:12 +03:00
parent 60cc2646b8
commit 8d48d92324

View File

@ -170,7 +170,11 @@
(defun markdown-preview--stop () (defun markdown-preview--stop ()
"Stop `markdown-preview' mode." "Stop `markdown-preview' mode."
(remove-hook 'after-save-hook 'markdown-preview--send-preview t) (remove-hook 'after-save-hook 'markdown-preview--send-preview t)
(markdown-preview--stop-idle-timer)) (markdown-preview--stop-idle-timer)
(let ((preview-file (concat (file-name-directory (buffer-file-name)) markdown-preview-file-name)))
(if (file-exists-p preview-file)
(delete-file preview-file)))
)
;;;###autoload ;;;###autoload
(defun markdown-preview-open-browser () (defun markdown-preview-open-browser ()