diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2025-02-07 18:52:26 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2025-02-17 16:24:53 +0100 |
commit | 89f88f06a4667a01612704e57f8af43ca19b82c0 (patch) | |
tree | 55dda7cab49d8d888b4d855ce0c55f88b13fbe1e /lisp/emacs-lisp | |
parent | ba6779ab2afcd3177c9c118a0383aa21ad1ab45f (diff) | |
download | emacs-89f88f06a4667a01612704e57f8af43ca19b82c0.tar.gz emacs-89f88f06a4667a01612704e57f8af43ca19b82c0.tar.bz2 emacs-89f88f06a4667a01612704e57f8af43ca19b82c0.zip |
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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/rx.el | 2 |
1 files changed, 1 insertions, 1 deletions
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)." |