[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/lentic 26b68cd9da 152/333: init functions are now state
From: |
ELPA Syncer |
Subject: |
[elpa] externals/lentic 26b68cd9da 152/333: init functions are now stateless. |
Date: |
Tue, 27 Feb 2024 13:00:23 -0500 (EST) |
branch: externals/lentic
commit 26b68cd9dad81036bb0a530ff69f32a0351ea825
Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
Commit: Phillip Lord <phillip.lord@newcastle.ac.uk>
init functions are now stateless.
Previously, the init function had to set the config by side-effect,
which didn't really make sense. So, now, it returns a value instead.
---
lentic-asciidoc.el | 6 ++----
lentic-latex-code.el | 6 ++----
lentic-org.el | 18 ++++++------------
lentic.el | 12 ++++++------
4 files changed, 16 insertions(+), 26 deletions(-)
diff --git a/lentic-asciidoc.el b/lentic-asciidoc.el
index 7c7c63141d..0606d7331c 100644
--- a/lentic-asciidoc.el
+++ b/lentic-asciidoc.el
@@ -41,8 +41,7 @@
:comment ";; "))
(defun lentic-clojure-asciidoc-init ()
- (setq lentic-config
- (lentic-asciidoc-commented-new)))
+ (lentic-asciidoc-commented-new))
(add-to-list 'lentic-init-functions
'lentic-clojure-asciidoc-init)
@@ -58,8 +57,7 @@
:comment ";; "))
(defun lentic-asciidoc-clojure-init ()
- (setq lentic-config
- (lentic-asciidoc-uncommented-new)))
+ (lentic-asciidoc-uncommented-new))
(add-to-list 'lentic-init-functions
'lentic-asciidoc-clojure-init)
diff --git a/lentic-latex-code.el b/lentic-latex-code.el
index 597eddfa03..693f718e4e 100644
--- a/lentic-latex-code.el
+++ b/lentic-latex-code.el
@@ -50,8 +50,7 @@
;;;###autoload
(defun lentic-clojure-latex-init ()
- (setq lentic-config
- (lentic-clojure-to-latex-new)))
+ (lentic-clojure-to-latex-new))
(add-to-list 'lentic-init-functions
'lentic-clojure-latex-init)
@@ -71,8 +70,7 @@
;;;###autoload
(defun lentic-latex-clojure-init ()
- (setq lentic-config
- (lentic-latex-to-clojure-new)))
+ (lentic-latex-to-clojure-new))
(add-to-list 'lentic-init-functions
'lentic-clojure-latex-init)
diff --git a/lentic-org.el b/lentic-org.el
index 68c09efe1b..a709d6f819 100644
--- a/lentic-org.el
+++ b/lentic-org.el
@@ -85,8 +85,7 @@
;;;###autoload
(defun lentic-org-el-init ()
- (setq lentic-config
- (lentic-org-to-el-new)))
+ (lentic-org-to-el-new))
(add-to-list 'lentic-init-functions
'lentic-org-el-init)
@@ -106,8 +105,7 @@
;;;###autoload
(defun lentic-el-org-init ()
- (setq lentic-config
- (lentic-el-to-org-new)))
+ (lentic-el-to-org-new))
(add-to-list 'lentic-init-functions
'lentic-el-org-init)
@@ -324,8 +322,7 @@
:comment-start "#\\\+END_SRC"))
(defun lentic-org-orgel-init ()
- (setq lentic-config
- (lentic-org-to-orgel-new)))
+ (lentic-org-to-orgel-new))
(add-to-list 'lentic-init-functions
'lentic-org-orgel-init)
@@ -387,8 +384,7 @@
:comment-start "#\\\+END_SRC"))
(defun lentic-orgel-org-init ()
- (setq lentic-config
- (lentic-orgel-to-org-new)))
+ (lentic-orgel-to-org-new))
(add-to-list 'lentic-init-functions
'lentic-orgel-org-init)
@@ -418,8 +414,7 @@
:case-fold-search nil))
(defun lentic-org-clojure-init ()
- (setq lentic-config
- (lentic-org-to-clojure-new)))
+ (lentic-org-to-clojure-new))
(add-to-list 'lentic-init-functions
'lentic-org-clojure-init)
@@ -438,8 +433,7 @@
:comment-start "#\\\+END_SRC"))
(defun lentic-clojure-org-init ()
- (setq lentic-config
- (lentic-clojure-to-org-new)))
+ (lentic-clojure-to-org-new))
(add-to-list 'lentic-init-functions
'lentic-clojure-org-init)
diff --git a/lentic.el b/lentic.el
index 0e2b9706f8..2a1f23b4d4 100644
--- a/lentic.el
+++ b/lentic.el
@@ -340,10 +340,9 @@ Currently, this is just a clone all method but may use
regions in future."
(defun lentic-default-init ()
"Default init function.
see `lentic-init' for details."
- (setq lentic-config
- (lentic-default-configuration
- (lentic-config-name (current-buffer))
- :this-buffer (current-buffer))))
+ (lentic-default-configuration
+ (lentic-config-name (current-buffer))
+ :this-buffer (current-buffer)))
(add-to-list 'lentic-init-functions
'lentic-default-init)
@@ -411,7 +410,7 @@ It is useful to toggle this state on during development.
Once
enabled, buffers will not update automaticaly but only when
explicitly told to. This is much easier than try to debug errors
happening on the after-change-hooks. The
-`lentic-emergency' and `lentic-unemergency' hooks
+`lentic-emergency' and `lentic-unemergency' functions
enable this.")
(defvar lentic-emergency-debug nil
@@ -527,7 +526,8 @@ A and B are the buffers."
lentic-config :that-buffer)
(buffer-live-p (lentic-that
lentic-config)))
- (funcall lentic-init)))
+ (setq lentic-config
+ (funcall lentic-init))))
(defun lentic-init-create ()
"Create the lentic for current-buffer."
- [elpa] externals/lentic a740327d41 126/333: More efficient detection of first line., (continued)
- [elpa] externals/lentic a740327d41 126/333: More efficient detection of first line., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 37eb0a74cd 128/333: More Emacs versions added., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 6ce64ab475 131/333: Test only two versions!, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 7e39bf724c 134/333: Incorporate new functions from m-buffer., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic b71b478f51 139/333: Test expected to fail., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic c60736c5c6 140/333: Comment removed because it is out of date., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic f0e3d7b287 145/333: Limit to lentic to allow some support files., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 2cfc982759 147/333: New tests added., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 6480e71885 148/333: Fixed some accidentally lower casing., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic b8c096b6d6 149/333: Add autoloads to ignore., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 26b68cd9da 152/333: init functions are now stateless.,
ELPA Syncer <=
- [elpa] externals/lentic 6ac53794c5 156/333: More examples added., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e338bfabbc 166/333: Only use lentic-this/that for access., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic fb77d5ba4b 165/333: Examples update to lentic., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic d23012e739 168/333: Autoload added., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 7c4efb1239 167/333: A more testable lentic-delayed, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 576199a197 172/333: Quieten test., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 00239795af 164/333: Update README for 0.6 release., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 3fce06e21c 171/333: Update for all examples., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 81dbcf298e 177/333: Update documentation to refer to lentic-autoloads., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic d022ddc9a5 174/333: kill line, erase buffer test., ELPA Syncer, 2024/02/27