From 89f88f06a4667a01612704e57f8af43ca19b82c0 Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd Date: Fri, 7 Feb 2025 18:52:26 +0100 Subject: Make the rx `eval` form use lexical binding when active Previously, it always used dynamic binding. * lisp/emacs-lisp/rx.el (rx--expand-eval): Heed `lexical-binding`. * test/lisp/emacs-lisp/rx-tests.el (rx-tests--x, rx-tests--get-x) (rx-eval): Add test case. * etc/NEWS: Announce. --- lisp/emacs-lisp/rx.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index 8fbe35220f1..c512d42cd15 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -1072,7 +1072,7 @@ Return (REGEXP . PRECEDENCE)." "Expand `eval' arguments. Return a new rx form." (unless (and body (null (cdr body))) (error "rx `eval' form takes exactly one argument")) - (eval (car body))) + (eval (car body) lexical-binding)) (defun rx--translate-eval (body) "Translate the `eval' form. Return (REGEXP . PRECEDENCE)." -- cgit v1.2.3