branch: externals/leaf commit eb8ce411d4e839ed0f52968e4007559eb7d2553b Merge: d695f24 9e9d06c Author: Naoya Yamashita <con...@gmail.com> Commit: GitHub <nore...@github.com>
Merge pull request #490 from zonuexe/refactor/typing-leaf-defaults Add custom type for leaf-defaults and change leaf-system-defaults to defvar --- leaf.el | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/leaf.el b/leaf.el index 64baac2..2b1a2a1 100644 --- a/leaf.el +++ b/leaf.el @@ -5,7 +5,7 @@ ;; Author: Naoya Yamashita <con...@gmail.com> ;; Maintainer: Naoya Yamashita <con...@gmail.com> ;; Keywords: lisp settings -;; Version: 4.4.5 +;; Version: 4.4.6 ;; URL: https://github.com/conao3/leaf.el ;; Package-Requires: ((emacs "24.1")) @@ -361,15 +361,21 @@ Sort by `leaf-sort-leaf--values-plist' in this order.") (defcustom leaf-defaults '() "The value that are interpreted as specified for all `leaf' blocks." - :type 'sexp + :type '(plist :key-type (choice (const :leaf-autoload) + (const :leaf-defer) + (const :leaf-protect) + (const :leaf-defun) + (const :leaf-defvar) + (const :leaf-path) + (symbol :tag "A keyword in `M-x leaf-available-keywords`")) + :value-type (choice boolean + (sexp :tag "Default value of the keyword"))) :group 'leaf) -(defcustom leaf-system-defaults (leaf-list - :leaf-autoload t :leaf-defer t :leaf-protect t - :leaf-defun t :leaf-defvar t :leaf-path t) - "The value for all `leaf' blocks for leaf system." - :type 'sexp - :group 'leaf) +(defvar leaf-system-defaults (list + :leaf-autoload t :leaf-defer t :leaf-protect t + :leaf-defun t :leaf-defvar t :leaf-path t) + "The value for all `leaf' blocks for leaf system.") (defcustom leaf-defer-keywords (list :bind :bind*