|
From: | Michael Heerdegen |
Subject: | bug#50136: 28.0.50; A problem with rx-let expansion |
Date: | Fri, 20 Aug 2021 16:50:01 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Michael Heerdegen <michael_heerdegen@web.de> writes: > #+begin_src emacs-lisp > (rx-let ((scatter (s) (regex (mapconcat #'string (string-to-list s) ".*")))) > (rx (scatter "abc"))) ==> "a.*b.*c" > #+end_src AFAIU, the current approach doesn't allow to extend this with an optional CHARS argument to specify with chars are allowed "in between" (instead of "any"). The "&optional" keyword makes it barf. And I can't actually "look" at the arguments to provide a conditional replacement. All I can do is to use `regex' to eval a constant expression I specify (at run-time). This seems a quite limiting approach. Something more macro-like would be appropriate IMO. Michael.
[Prev in Thread] | Current Thread | [Next in Thread] |