@@ -1096,12 +1096,12 @@ update the buffer containing the preview and return the buffer."
10961096 :type 'function)
10971097
10981098(defcustom markdown-live-preview-delete-export 'delete-on-destroy
1099- "Delete exported html file when using `markdown-live-preview-sync-export ' on every
1099+ "Delete exported html file when using `markdown-live-preview-mode ' on every
11001100export by setting to 'delete-on-export, when quitting
11011101`markdown-live-preview-mode' by setting to 'delete-on-destroy, or not at all
11021102when nil."
11031103 :group 'markdown
1104- :type 'symbol)
1104+ :type '( symbol :validate markdown-live-preview-validate-delete-export) )
11051105
11061106(defcustom markdown-live-preview-idle-delay 1
11071107 "Delay to wait idle before refreshing `markdown-live-preview-mode' output."
@@ -5876,6 +5876,13 @@ current filename, but with the extension removed and replaced with .html."
58765876
58775877;;; Live Preview ===============================================================
58785878
5879+ (defun markdown-live-preview-validate-delete-export (widget)
5880+ (let ((sym (widget-value widget)))
5881+ (unless (memq sym '(delete-on-export delete-on-destroy nil))
5882+ (widget-put widget :error (format "Invalid value: '%s'"
5883+ (symbol-name sym)))
5884+ widget)))
5885+
58795886(defvar markdown-live-preview-view-buffer nil
58805887 "Buffer used to preview markdown output in
58815888`markdown-live-preview-sync-export' and `markdown-live-preview-async-export'.")
@@ -6126,8 +6133,8 @@ output buffer in another window."
61266133(defun markdown-live-preview-re-export ()
61276134 (interactive)
61286135 "If the current buffer is a buffer displaying the exported version of a
6129- `markdown-live-preview-mode' buffer, call `markdown-live-preview-sync -export'
6130- and update this buffer's contents."
6136+ `markdown-live-preview-mode' buffer, call `markdown-live-preview-async -export'
6137+ or `markdown-live-preview-sync-export' and update this buffer's contents."
61316138 (when markdown-live-preview-source-buffer
61326139 (with-current-buffer markdown-live-preview-source-buffer
61336140 (if markdown-live-preview-current-buffer-sync-async
0 commit comments