[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/setup 5862007 1/3: Improve documentation of setup-opts
From: |
ELPA Syncer |
Subject: |
[elpa] externals/setup 5862007 1/3: Improve documentation of setup-opts and setup-get |
Date: |
Sat, 25 Sep 2021 09:57:25 -0400 (EDT) |
branch: externals/setup
commit 586200795b91415c1e911e1b684aa8c33985706d
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Improve documentation of setup-opts and setup-get
---
setup.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/setup.el b/setup.el
index 5ea667d..d46fe30 100644
--- a/setup.el
+++ b/setup.el
@@ -84,8 +84,11 @@
(defvar setup--need-quit) ;see `setup-quit'
(defvar setup-opts `((quit . ,(make-symbol "setup-quit")))
- "Alist defining context-specific options.
-Values are extracted using `setup-get'.")
+ "Alist defining the context for local macros.
+Context-modifying macros (`:with-feature', `:with-mode', ...)
+prepend the new context to this variable using `let', before
+calling `setup-expand'. Within the macro definitions `setup-get'
+is used to retrieve the current context.")
(defvar setup-macros nil
"Local macro definitions to be bound in `setup' bodies.
@@ -232,7 +235,9 @@ If not given, it is assumed nothing is evaluated."
;;; common utility functions for keywords
(defun setup-get (opt)
- "Return value for OPT."
+ "Retrieve the context-sensitive value for OPT.
+If the context is not defined, an error is thrown. See
+`setup-opts' for more details."
(or (cdr (assq opt setup-opts))
(error "Cannot deduce %S from context" opt)))