[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/leaf 6b827f5 15/29: tagged v4.2.9
From: |
Stefan Monnier |
Subject: |
[elpa] externals/leaf 6b827f5 15/29: tagged v4.2.9 |
Date: |
Tue, 10 Nov 2020 14:47:42 -0500 (EST) |
branch: externals/leaf
commit 6b827f50338f09a28fcb0e8e39e47f7d078bfbb6
Author: conao3 <conao3@gmail.com>
Commit: conao3 <conao3@gmail.com>
tagged v4.2.9
---
README.org | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
leaf.el | 2 +-
2 files changed, 75 insertions(+), 1 deletion(-)
diff --git a/README.org b/README.org
index 834fa53..c3badca 100644
--- a/README.org
+++ b/README.org
@@ -57,6 +57,7 @@
- [[#contribution][Contribution]]
- [[#leafel-mechanism][leaf.el mechanism]]
- [[#adding-new-keywords][Adding new keywords]]
+ - [[#customize-leaf-keywords][Customize leaf keywords]]
- [[#migration][Migration]]
- [[#leaf-v10-to-v20][leaf v3.0 to v4.0]]
- [[#leaf-v20-to-v30][leaf v2.0 to v3.0]]
@@ -2258,6 +2259,79 @@ In
[[https://github.com/conao3/leaf-keywords.el][leaf-keywords.el]], you can see
Note that leaf only contains keywords for packages that come with the Emacs
standard,
and that keywords that depend on external packages are added to its repository.
+*** Customize leaf keywords
+~leaf~ stores "keyword" and corresponding "expandion" in ~leaf-keywords~.
+You can customize ~leaf~ expandion to customize ~leaf-keywords~.
+
+#+begin_src emacs-lisp
+(leaf-plist-get :custom leaf-keywords)
+;;=> ...
+
+(ppp-macroexpand
+ (leaf foo-package
+ :custom
+ (foo-package-to-enable . t)
+ (foo-package-to-disable . nil)
+ (foo-package-to-symbol . 'symbol)
+ (foo-package-to-function . #'ignore)
+ (foo-package-to-lambda . (lambda (elm) (message elm)))))
+;;=> (prog1 'foo-package
+;; (customize-set-variable 'foo-package-to-enable t "Customized with leaf
in foo-package block")
+;; (customize-set-variable 'foo-package-to-disable nil "Customized with
leaf in foo-package block")
+;; (customize-set-variable 'foo-package-to-symbol 'symbol "Customized with
leaf in foo-package block")
+;; (customize-set-variable 'foo-package-to-function #'ignore "Customized
with leaf in foo-package block")
+;; (customize-set-variable 'foo-package-to-lambda
+;; (lambda (elm)
+;; (message elm))
+;; "Customized with leaf in foo-package block"))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(setf (leaf-plist-get :custom leaf-keywords)
+ '`(,@(mapcar (lambda (elm) `(customize-set-variable ',(car elm) ,(cdr
elm) ,(format "leaf block" leaf--name))) leaf--value) ,@leaf--body))
+;;=> ...
+
+(ppp-macroexpand
+ (leaf foo-package
+ :custom
+ (foo-package-to-enable . t)
+ (foo-package-to-disable . nil)
+ (foo-package-to-symbol . 'symbol)
+ (foo-package-to-function . #'ignore)
+ (foo-package-to-lambda . (lambda (elm) (message elm)))))
+;;=> (prog1 'foo-package
+;; (customize-set-variable 'foo-package-to-enable t "leaf block")
+;; (customize-set-variable 'foo-package-to-disable nil "leaf block")
+;; (customize-set-variable 'foo-package-to-symbol 'symbol "leaf block")
+;; (customize-set-variable 'foo-package-to-function #'ignore "leaf block")
+;; (customize-set-variable 'foo-package-to-lambda
+;; (lambda (elm)
+;; (message elm))
+;; "leaf block"))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(setf (leaf-plist-get :custom leaf-keywords)
+ '`(,@(mapcar (lambda (elm) `(setq ',(car elm) ,(cdr elm))) leaf--value)
,@leaf--body))
+;;=> ...
+
+(ppp-macroexpand
+ (leaf foo-package
+ :custom
+ (foo-package-to-enable . t)
+ (foo-package-to-disable . nil)
+ (foo-package-to-symbol . 'symbol)
+ (foo-package-to-function . #'ignore)
+ (foo-package-to-lambda . (lambda (elm) (message elm)))))
+;;=> (prog1 'foo-package
+;; (setq 'foo-package-to-enable t)
+;; (setq 'foo-package-to-disable nil)
+;; (setq 'foo-package-to-symbol 'symbol)
+;; (setq 'foo-package-to-function #'ignore)
+;; (setq 'foo-package-to-lambda (lambda (elm)
+;; (message elm))))
+#+end_src
+
** Migration
*** leaf v3.0 to v4.0
**** Drop support for Emacs versions lower than Emacs-24.4
diff --git a/leaf.el b/leaf.el
index 84ea83a..aaacf04 100644
--- a/leaf.el
+++ b/leaf.el
@@ -5,7 +5,7 @@
;; Author: Naoya Yamashita <conao3@gmail.com>
;; Maintainer: Naoya Yamashita <conao3@gmail.com>
;; Keywords: lisp settings
-;; Version: 4.2.8
+;; Version: 4.2.9
;; URL: https://github.com/conao3/leaf.el
;; Package-Requires: ((emacs "24.4"))
- [elpa] externals/leaf updated (a0f6132 -> ef0bdd4), Stefan Monnier, 2020/11/10
- [elpa] externals/leaf 990d886 03/29: properly detect a leaf block that is not the beginning of a line, Stefan Monnier, 2020/11/10
- [elpa] externals/leaf 19c8fa3 01/29: tagged v4.2.6, Stefan Monnier, 2020/11/10
- [elpa] externals/leaf a2f9c2b 02/29: Merge pull request #442 from conao3/externals/leaf, Stefan Monnier, 2020/11/10
- [elpa] externals/leaf 02081f4 12/29: tagged v4.2.8, Stefan Monnier, 2020/11/10
- [elpa] externals/leaf 6b827f5 15/29: tagged v4.2.9,
Stefan Monnier <=
- [elpa] externals/leaf d5fe958 11/29: indent test.tml, Stefan Monnier, 2020/11/10
- [elpa] externals/leaf 09f2e23 04/29: tagged v4.2.7, Stefan Monnier, 2020/11/10
- [elpa] externals/leaf f733e8d 18/29: tagged v4.3.0, Stefan Monnier, 2020/11/10
- [elpa] externals/leaf 450448d 19/29: Merge pull request #452 from conao3/feature#451, Stefan Monnier, 2020/11/10
- [elpa] externals/leaf 17d00e7 21/29: use string-match-p instead of string-suffix-p, Stefan Monnier, 2020/11/10
- [elpa] externals/leaf 4e73a44 26/29: follow org-mode grammar and better conventions, Stefan Monnier, 2020/11/10
- [elpa] externals/leaf 447b152 07/29: Merge pull request #446 from jidicula/fix-grammar-#445, Stefan Monnier, 2020/11/10
- [elpa] externals/leaf 06935bd 14/29: add leaf-plist-get gv-expander, Stefan Monnier, 2020/11/10
- [elpa] externals/leaf 272fd44 06/29: [docs][README] Fix grammatical errors, Stefan Monnier, 2020/11/10
- [elpa] externals/leaf 74d3498 05/29: Merge pull request #444 from conao3/feature#443, Stefan Monnier, 2020/11/10