diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2024-10-03 21:06:02 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2024-10-03 21:06:02 +0200 |
| commit | ad20e98b6b98ccd6dbdd02217a839b61a01fcdde (patch) | |
| tree | c6de504f10697133c4e525564be763a3b4edfde6 | |
| parent | f76edf2745f9ea5b08fb3d999c1f27ff42fe98aa (diff) | |
llama--{collect,fontify}: Stop at nested llama expression
| -rw-r--r-- | llama-test.el | 4 | ||||
| -rw-r--r-- | llama.el | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/llama-test.el b/llama-test.el index 1ba4f6c..79cbabf 100644 --- a/llama-test.el +++ b/llama-test.el @@ -387,6 +387,10 @@ (should (equal (llama list %1 %2) (lambda (%1 %2) (list %1 %2)))) + + (should (equal (llama list %1 (llama list %)) + (lambda (%1) + (list %1 (lambda (%) (list %)))))) ) (ert-deftest llama-test-901-errors-first nil @@ -185,7 +185,7 @@ to view this docstring.)" (defun llama--collect (expr args &optional fnpos backquoted) (cond - ((memq (car-safe expr) '(## quote)) expr) + ((memq (car-safe expr) '(## llama quote)) expr) ((and backquoted (symbolp expr)) expr) ((and backquoted (eq (car-safe expr) backquote-unquote-symbol)) (cons backquote-unquote-symbol @@ -395,7 +395,7 @@ expansion, and the looks of this face should hint at that.") (cond ((eq (car-safe expr) 'quote)) ((eq (ignore-errors (bare-symbol (car-safe expr))) 'quote)) - ((and (eq (car-safe expr) '##) (not top))) + ((and (memq (car-safe expr) '(## llama)) (not top))) ((and backquoted (symbol-with-pos-p expr))) ((and backquoted (eq (car-safe expr) backquote-unquote-symbol)) (llama--fontify expr)) |
