[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/preview-tailor be0dd57dca 2/6: Save only when initializ
From: |
ELPA Syncer |
Subject: |
[elpa] externals/preview-tailor be0dd57dca 2/6: Save only when initialized |
Date: |
Mon, 17 Jun 2024 21:58:57 -0400 (EDT) |
branch: externals/preview-tailor
commit be0dd57dca414707415911f53ba7dd0a3b8c5340
Author: Paul Nelson <ultrono@gmail.com>
Commit: Paul Nelson <ultrono@gmail.com>
Save only when initialized
* preview-tailor.el (preview-tailor--initialized): New variable.
(preview-tailor-save): Save only when initialized.
---
preview-tailor.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/preview-tailor.el b/preview-tailor.el
index acf6eb2b02..65701381bd 100644
--- a/preview-tailor.el
+++ b/preview-tailor.el
@@ -137,19 +137,24 @@ Use SCALE if provided, otherwise prompt for it."
(insert-file-contents preview-tailor-storage-file)
(setq preview-tailor-multipliers (read (current-buffer))))))
+(defvar preview-tailor--initialized nil
+ "Non-nil if preview-tailor has been initialized.")
+
;;;###autoload
(defun preview-tailor-init ()
"Initialize preview-tailor."
(interactive)
(preview-tailor-load)
- (setq preview-scale-function #'preview-tailor--calculate))
+ (setq preview-scale-function #'preview-tailor--calculate)
+ (setq preview-tailor--initialized t))
;;;###autoload
(defun preview-tailor-save ()
"Save preview-tailor customization to a dotfile."
(interactive)
- (with-temp-file preview-tailor-storage-file
- (prin1 preview-tailor-multipliers (current-buffer))))
+ (when preview-tailor--initialized
+ (with-temp-file preview-tailor-storage-file
+ (prin1 preview-tailor-multipliers (current-buffer)))))
(provide 'preview-tailor)
;;; preview-tailor.el ends here
- [elpa] externals/preview-tailor updated (0904a48f72 -> bb92fac553), ELPA Syncer, 2024/06/17
- [elpa] externals/preview-tailor 5edd89fe65 1/6: update docs, ELPA Syncer, 2024/06/17
- [elpa] externals/preview-tailor a0afea231e 3/6: tweak readme, ELPA Syncer, 2024/06/17
- [elpa] externals/preview-tailor b44c0bcb26 5/6: FSF copyright, ELPA Syncer, 2024/06/17
- [elpa] externals/preview-tailor bb92fac553 6/6: bump version to 0.2, ELPA Syncer, 2024/06/17
- [elpa] externals/preview-tailor be0dd57dca 2/6: Save only when initialized,
ELPA Syncer <=
- [elpa] externals/preview-tailor b61313e3c2 4/6: tweak readme, ELPA Syncer, 2024/06/17