[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/lentic 0e6e64e0b6 306/333: Autoload lentic-script-hook
From: |
ELPA Syncer |
Subject: |
[elpa] externals/lentic 0e6e64e0b6 306/333: Autoload lentic-script-hook |
Date: |
Tue, 27 Feb 2024 13:00:47 -0500 (EST) |
branch: externals/lentic
commit 0e6e64e0b6b441a1cfbf6f1f06f92fdd9467ec6a
Author: Phillip Lord <phillip.lord@russet.org.uk>
Commit: Phillip Lord <phillip.lord@russet.org.uk>
Autoload lentic-script-hook
---
lentic-script.el | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/lentic-script.el b/lentic-script.el
index 530d21690e..5d80495674 100644
--- a/lentic-script.el
+++ b/lentic-script.el
@@ -33,13 +33,20 @@
(defvar lentic-script-temp-location
temporary-file-directory "/lentic-script")
-(defun lentic-script-hook (mode-hook init)
- (add-to-list 'lentic-init-functions
- init)
- (add-hook mode-hook
- (lambda ()
- (unless lentic-init
- (setq lentic-init init)))))
+;;;###autoload
+;; We need to copy this entire form into the autoloads file. If we use a
+;; normal autoload, it force loading of the entire package when it is called
+;; during autoload which defeats the point. Unfortunately, autoload files are
+;; normally dynamically bound, and we use closures. The eval form addresses
+;; both of these simultaneously.
+(eval
+ '(defun lentic-script-hook (mode-hook init)
+ (add-to-list 'lentic-init-functions init)
+ (add-hook mode-hook
+ (lambda nil
+ (unless lentic-init
+ (setq lentic-init init)))))
+ t)
(defun lentic-script--lentic-file-1 (file)
(concat
- [elpa] externals/lentic 9178ace0c4 256/333: lentic-batch now returns config., (continued)
- [elpa] externals/lentic 9178ace0c4 256/333: lentic-batch now returns config., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e5c09af545 254/333: Git cleanups., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic eb558ae8e3 260/333: Prepare for v0.12 release., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 3a2df0f8c5 263/333: Image added to README, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic a1cb301c84 258/333: Convert lentic-blk-marker-boundaries to method., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic d50b1924f3 257/333: Prepare for next iteration., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 83e75f48a6 251/333: lentic-dev now adds a "pulse" to the dirty region., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 8885bfcde8 277/333: 0.10 Release, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic b2d664c72d 278/333: Videos for README., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 1f7d929f37 303/333: Fix header line of lentic-script, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 0e6e64e0b6 306/333: Autoload lentic-script-hook,
ELPA Syncer <=
- [elpa] externals/lentic af2e447a65 287/333: Run installation test on every commit., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 597a717ac6 316/333: Support for external publishing, add include dir, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 497a4eda39 267/333: Checks lentic-config before re-running init., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 4f6d564988 301/333: Add support for out-of-the-box script files., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 8e0d0b1205 325/333: Fix error when swapping is not possible., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 02073c4f1c 285/333: Remove buffer-list-update-hook., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e395e44723 270/333: lentic-block changed to lentic-chunk., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic f1f77812b0 330/333: Add markdown example, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e3c56fbf11 307/333: Migrate all tests to assess, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e6d013bf57 329/333: Fix missing files, ELPA Syncer, 2024/02/27