emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/lentic 497a4eda39 267/333: Checks lentic-config before


From: ELPA Syncer
Subject: [elpa] externals/lentic 497a4eda39 267/333: Checks lentic-config before re-running init.
Date: Tue, 27 Feb 2024 13:00:43 -0500 (EST)

branch: externals/lentic
commit 497a4eda39caa7767553a2ae59b42502e93614bb
Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
Commit: Phillip Lord <phillip.lord@newcastle.ac.uk>

    Checks lentic-config before re-running init.
    
    Lentic-mode now inits all only if lentic-config is nil, or if it is
    forced. The message now reports the number of buffers created, rather
    than the number that actually exist.
    
    Closes #31
---
 lentic-mode.el | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/lentic-mode.el b/lentic-mode.el
index f11988977d..4e9de58a18 100644
--- a/lentic-mode.el
+++ b/lentic-mode.el
@@ -108,11 +108,15 @@ Lentics are listed in the same order as in fundamental
     (bury-buffer before-buffer)))
 
 ;;;###autoload
-(defun lentic-mode-create-from-init ()
-  (interactive)
-  (let ((all (lentic-init-all-create)))
-    (message "Created %s buffers"
-             (length all))))
+(defun lentic-mode-create-from-init (&optional force)
+  (interactive "P")
+  (if (and lentic-config (not force))
+      (message "Already initialized. C-u to force.")
+    (let ((before (length lentic-config))
+          (all (lentic-init-all-create)))
+      (message "Created %s buffers"
+               (- (length all)
+                  before)))))
 
 
 ;;;###autoload



reply via email to

[Prev in Thread] Current Thread [Next in Thread]