[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/lentic 621671d1a7 269/333: Garbage Collects configs on
From: |
ELPA Syncer |
Subject: |
[elpa] externals/lentic 621671d1a7 269/333: Garbage Collects configs on init. |
Date: |
Tue, 27 Feb 2024 13:00:43 -0500 (EST) |
branch: externals/lentic
commit 621671d1a7b7583872127282f38f5e179a7289ed
Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
Commit: Phillip Lord <phillip.lord@newcastle.ac.uk>
Garbage Collects configs on init.
We now garbage collect old config objects when attempting to initialize
all buffers. Previously, if a lentic had already been created,
subsequent creations required forcing even if all the config objects
were pointing to killed buffers. We now clean these out first.
---
lentic-mode.el | 1 +
lentic.el | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/lentic-mode.el b/lentic-mode.el
index 4e9de58a18..931bbefa2f 100644
--- a/lentic-mode.el
+++ b/lentic-mode.el
@@ -110,6 +110,7 @@ Lentics are listed in the same order as in fundamental
;;;###autoload
(defun lentic-mode-create-from-init (&optional force)
(interactive "P")
+ (lentic-garbage-collect-config)
(if (and lentic-config (not force))
(message "Already initialized. C-u to force.")
(let ((before (length lentic-config))
diff --git a/lentic.el b/lentic.el
index 20e7a670e5..c777f2fe53 100644
--- a/lentic.el
+++ b/lentic.el
@@ -682,14 +682,22 @@ SEEN-BUFFER is a list of buffers to ignore."
(funcall fn that)
(lentic-each that fn seen-buffer))))
lentic-config)))
-;; #+end_src
+(defun lentic-garbage-collect-config ()
+ "Remove non-live configs in current-buffer."
+ (setq lentic-config
+ (--filter
+ (buffer-live-p
+ (lentic-that it))
+ lentic-config)))
+;; #+end_src
;; *** Initialisation
;; #+begin_src emacs-lisp
(defun lentic-ensure-init ()
"Ensure that the `lentic-init' has been run."
+ (lentic-garbage-collect-config)
(setq lentic-config
;; and attach to lentic-config
(-concat
- [elpa] externals/lentic 7d27529728 239/333: Bye-Bye Info, (continued)
- [elpa] externals/lentic 7d27529728 239/333: Bye-Bye Info, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic bc973d85d1 236/333: Merge branch 'patch-1' of https://github.com/Prathyvsh/lentic into Prathyvsh-patch-1, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic ae8ac15494 213/333: lentic-when-buffer added., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 53283a1fc3 223/333: README update and roadmap added., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 6d52e00c01 246/333: Explicitly exclude -autoloads and -pkg files., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 4abbcd4b7f 259/333: Org-mode now support multiple src blocks., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic a5ad1e2215 299/333: Move lentic-test-clone to assess, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e8e448e149 324/333: Merge pull request #55 from ether42/master, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 37f9fedb44 284/333: Remove marmalade., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 0f7664a90f 318/333: Log to external-debugging-output, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 621671d1a7 269/333: Garbage Collects configs on init.,
ELPA Syncer <=
- [elpa] externals/lentic 08f9b0f4d1 274/333: Merge branch 'master' of github.com:phillord/lentic, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 90fb12acdf 326/333: Fix duplicated code error., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e41580a2dc 319/333: Fix typo in markup, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 8655ecd51e 293/333: v0.11 release., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 6b4737219e 297/333: Document tests, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 90a05765eb 313/333: Add autoload cookie to lentic-init-functions, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 0a96ba6fe8 304/333: Remove pointless oset, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic f0253ea3e7 290/333: New menu option "force clone"., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 91f231555e 283/333: Unmatched config returns correct type for invert., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic ee916b45fe 314/333: Add support for asciidoc->el, ELPA Syncer, 2024/02/27