branch: elpa/llama
commit ad20e98b6b98ccd6dbdd02217a839b61a01fcdde
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    llama--{collect,fontify}: Stop at nested llama expression
---
 llama-test.el | 4 ++++
 llama.el      | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/llama-test.el b/llama-test.el
index 1ba4f6c5a1..79cbabffd7 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
diff --git a/llama.el b/llama.el
index 56441ac531..27bf743954 100644
--- a/llama.el
+++ b/llama.el
@@ -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))

Reply via email to