diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2024-09-15 18:29:32 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2024-09-15 18:29:32 +0200 |
| commit | aab72b513fc661ddc76abf55ab2437bc56f86202 (patch) | |
| tree | 3a589af95e368c9ca934f3a7f4f88377705179d0 /llama.el | |
| parent | a5fb525684260dee7c3381740e61421f7bb0ecc3 (diff) | |
Support backquote construct in place of FN
Diffstat (limited to 'llama.el')
| -rw-r--r-- | llama.el | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -135,8 +135,13 @@ The name `##' was chosen because that allows (optionally) omitting the whitespace between it and the following symbol. If you dislike this trickery, you can alternatively use this macro under the name `llama'." - (unless (symbolp fn) - (signal 'wrong-type-argument (list 'symbolp fn))) + (cond ((symbolp fn)) + ((and (eq (car-safe fn) backquote-backquote-symbol) + (not body)) + (setq body (cdr fn)) + (setq fn backquote-backquote-symbol)) + ((signal 'wrong-type-argument + (list 'symbolp backquote-backquote-symbol fn)))) (let* ((args (make-vector 10 nil)) (body (cdr (llama--collect (cons fn body) args))) (rest (aref args 0)) |
