summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-06-03 20:55:21 -0700
committerKaz Kylheku <kaz@kylheku.com>2025-06-03 20:55:21 -0700
commit78c7b4ed0638580f20092cfbc4ca1c5f447427cb (patch)
treeb957ec52548d5cb2d2fa999d61d4ec123c94c2e1
parentd6463465f7bb95cc15e02d589186a6c3107e6fbe (diff)
downloadtxr-78c7b4ed0638580f20092cfbc4ca1c5f447427cb.tar.gz
txr-78c7b4ed0638580f20092cfbc4ca1c5f447427cb.tar.bz2
txr-78c7b4ed0638580f20092cfbc4ca1c5f447427cb.zip
infix: no phony infix over lambdas and such.
* stdlib/infix.tl (funp): Do not recognize list forms as functions, such as lambda expressions or (meth ...) syntax. It causes surprisingly wrong transformations.
-rw-r--r--stdlib/infix.tl3
1 files changed, 2 insertions, 1 deletions
diff --git a/stdlib/infix.tl b/stdlib/infix.tl
index 66bd9037..30f95081 100644
--- a/stdlib/infix.tl
+++ b/stdlib/infix.tl
@@ -262,7 +262,8 @@
((@else) else))
(defmacro funp (env sym)
- ^(or (fboundp ,sym) (lexical-fun-p ,env ,sym)))
+ ^(unless (consp ,sym)
+ (or (fboundp ,sym) (lexical-fun-p ,env ,sym))))
(defun-match detect-infix
(((@x @y . @rest) @env)