Subject: Re: bug#23795: 24.5; rx eval on variable gives symbol error
From: Andreas Schwab <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Sat, 18 Jun 2016 18:19:03 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

[email-masked] writes:

> Insert this into a .el file and load it in using emacs -Q:
>
> (let ((page-name "the page"))
>        (let ((regexp
> 	      ;; (concat "[[" page-name "]]")
> 	      (rx "[[" (eval page-name) "]]" )))
> 	 regexp
> 	 ))

Since rx is a macro it cannot refer to runtime values.  You need to use
rx-to-string to construct the regexp at run time.  Or just use concat as
in the comment.

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."