emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: query-replace-regexp-eval is quite nice, but...


From: Andreas Schwab
Subject: Re: query-replace-regexp-eval is quite nice, but...
Date: Mon, 02 Feb 2004 14:03:26 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

"Ehud Karni" <address@hidden> writes:

> How about checking regexp-flag (which is bound by `perform-replace') ?
>
> Assuming your "literal" result string (containing \n) is STR you can
> add something like this to your lisp:
>
>        (if regexp-flag
>            (regexp-quote STR)
>            STR)

regexp-flag is always non-nil when called from query-replace-regexp-eval,
and regexp-quote quotes too much for replace-match.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]