From 60cc2646b8beba1ed3357a00a7df224fadc13da2 Mon Sep 17 00:00:00 2001 From: Igor Shymko Date: Mon, 29 Aug 2016 19:33:19 +0300 Subject: [PATCH] version bump --- markdown-preview-mode.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/markdown-preview-mode.el b/markdown-preview-mode.el index 058103a..4c1a1a6 100644 --- a/markdown-preview-mode.el +++ b/markdown-preview-mode.el @@ -5,7 +5,7 @@ ;; Author: Igor Shymko ;; URL: https://github.com/ancane/markdown-preview-mode ;; Keywords: markdown, preview -;; Version: 0.4 +;; Version: 0.5 ;; Package-Requires: ((websocket "1.6") (markdown-mode "2.1") (cl-lib "0.5")) ;; This file is not part of GNU Emacs. @@ -51,6 +51,12 @@ :group 'markdown-preview :type 'string) +(defcustom markdown-preview-file-name + ".markdown-preview.html" + "Markdown preview file name" + :group 'markdown-preview + :type 'string) + (defvar markdown-preview--websocket-server nil "`markdown-preview' Websocket server.") @@ -74,9 +80,8 @@ (defun markdown-preview--open-browser-preview () "Open the markdown preview in the browser." - (let* ((dir-of-buffer-to-preview (file-name-directory - (buffer-file-name (get-buffer (buffer-name))))) - (preview-file (concat dir-of-buffer-to-preview ".markdown-preview.html"))) + (let* ((dir-of-buffer-to-preview (file-name-directory (buffer-file-name))) + (preview-file (concat dir-of-buffer-to-preview markdown-preview-file-name))) (if (not (file-exists-p preview-file)) (copy-file markdown-preview--preview-url preview-file)) (browse-url preview-file)))