summaryrefslogtreecommitdiff
path: root/llama.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2024-03-23 23:37:09 +0100
committerJonas Bernoulli <jonas@bernoul.li>2024-03-23 23:37:09 +0100
commitc1f4b4ff28fbb4e4bb72473b26b8fd103ccc3ca2 (patch)
treea81016a9279c20cce1b1d5b0553a33fabbb7de21 /llama.el
parent9315f49f2f4446ee0660206052e5324ae3df4526 (diff)
Update documentation
Diffstat (limited to 'llama.el')
-rw-r--r--llama.el28
1 files changed, 28 insertions, 0 deletions
diff --git a/llama.el b/llama.el
index 9f06a9c..3e72131 100644
--- a/llama.el
+++ b/llama.el
@@ -61,6 +61,20 @@
;; (lambda (%1 _%2 &optional &3 &rest &*)
;; (foo %1 (bar &3) &*))
+;; Unused trailing arguments and mandatory unused arguments at the
+;; border between mandatory and optional arguments are also supported:
+;;
+;; (##list %1 _%3 &5 _&6)
+;;
+;; becomes:
+;;
+;; (lambda (%1 _%2 _%3 &optional _&4 &5 _&6)
+;; (list %1 &5))
+;;
+;; Note how `_%3' and `_&6' are removed from the body, because their
+;; names begin with an underscore. Also note that `_&4' is optional,
+;; unlike the explicitly specified `_%3'.
+
;; The name `##' was chosen because that allows (optionally)
;; omitting the whitespace between it and the following symbol.
;; It also looks similar to #'function.
@@ -100,6 +114,20 @@ which expands to:
(lambda (%1 _%2 &optional &3 &rest &*)
(foo %1 (bar &3) &*))
+Unused trailing arguments and mandatory unused arguments at the
+border between mandatory and optional arguments are also supported:
+
+ (##list %1 _%3 &5 _&6)
+
+becomes:
+
+ (lambda (%1 _%2 _%3 &optional _&4 &5 _&6)
+ (list %1 &5))
+
+Note how `_%3' and `_&6' are removed from the body, because their
+names begin with an underscore. Also note that `_&4' is optional,
+unlike the explicitly specified `_%3'.
+
The name `##' was chosen because that allows (optionally)
omitting the whitespace between it and the following symbol.
It also looks a bit like #\\='function."