[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/setup f578ff7 7/8: Document if a macro uses deferred ev
From: |
ELPA Syncer |
Subject: |
[elpa] externals/setup f578ff7 7/8: Document if a macro uses deferred evaluation |
Date: |
Thu, 30 Sep 2021 14:57:27 -0400 (EDT) |
branch: externals/setup
commit f578ff7a2f0ee1d3fd5f13be0ee849f7b1c4c673
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Document if a macro uses deferred evaluation
---
setup.el | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/setup.el b/setup.el
index f26ebb7..63c2327 100644
--- a/setup.el
+++ b/setup.el
@@ -90,7 +90,13 @@ NAME is a symbol or string designating the default feature."
"\n\n")
(if (null setup-macros)
(insert "No local macros are defined.")
- (insert "Within BODY, `setup' provides these local macros:")
+ (insert "Within BODY, `setup' is able to expand context-sensitive local
macros. "
+ "Some of these may be evaluated after the respective current
feature "
+ "has been loaded, by wrapping the expression in a
`with-eval-after-load' block. "
+ "In the following list this is indicated by a \"*\". "
+ "Otherwise a \"-\" is used for all macros that expand to code "
+ "that is immediately evaluated.")
+ (fill-paragraph)
(dolist (sym (sort (mapcar #'car setup-macros) #'string-lessp))
(newline 2)
(let ((sig (mapcar
@@ -99,7 +105,10 @@ NAME is a symbol or string designating the default feature."
arg
(intern (upcase (symbol-name arg)))))
(get sym 'setup-signature))))
- (insert (format " - %s\n\n" (cons sym sig))
+ (insert (format " %c %s\n\n"
+ (if (get sym 'setup-delayed-eval)
+ ?* ?-)
+ (cons sym sig))
(or (get sym 'setup-documentation)
"No documentation.")))))
(buffer-string)))
@@ -169,6 +178,7 @@ If not given, it is assumed nothing is evaluated."
(if (plist-get opts :repeatable) '(...)))))
(put name 'setup-shorthand (plist-get opts :shorthand))
(put name 'setup-definition-file (or load-file-name buffer-file-name))
+ (put name 'setup-delayed-eval (plist-get opts :after-loaded))
(put name 'lisp-indent-function (plist-get opts :indent))
;; define macro for `macroexpand-all'
(setf (alist-get name setup-macros) ;New in Emacs-25.
- [elpa] externals/setup updated (2e1f7c3 -> 261ed62), ELPA Syncer, 2021/09/30
- [elpa] externals/setup 9591ff2 6/8: Consistently use "local macro" instead of "keyword", ELPA Syncer, 2021/09/30
- [elpa] externals/setup 1b8b968 1/8: Remove lexical-binding check, ELPA Syncer, 2021/09/30
- [elpa] externals/setup d96fb5f 2/8: Indent the first two forms of setup-define, ELPA Syncer, 2021/09/30
- [elpa] externals/setup 2d3b4f2 3/8: Generalize macro processing into setup-modifier-list, ELPA Syncer, 2021/09/30
- [elpa] externals/setup 261ed62 8/8: Remove :without-error-demotion, ELPA Syncer, 2021/09/30
- [elpa] externals/setup f578ff7 7/8: Document if a macro uses deferred evaluation,
ELPA Syncer <=
- [elpa] externals/setup 9433a3a 5/8: Allow :when-loaded to handle multiple expressions, ELPA Syncer, 2021/09/30
- [elpa] externals/setup 7107c78 4/8: Remove examples from package commentary section, ELPA Syncer, 2021/09/30