emacs-devel
[Top][All Lists]
Advanced

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

Re: should query-replace-regexp-eval be in the manual?


From: David Kastrup
Subject: Re: should query-replace-regexp-eval be in the manual?
Date: Mon, 16 Apr 2007 19:22:02 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     Basically it has been my experience that query-replace-regexp-eval is
>     a nice idea, but in practice quite unusable.  \, achieves a similar
>     purpose but with a much more convenient interface.
>
> Could you write some text to document the \ feature in the Emacs Manual?

\, has been documented in
(info "(emacs) Regexp Replace")
the Emacs manual pretty much since its inception.

>     To get back to the original question: since \, has all of the
>     functionality of query-replace-regexp-eval with a more convenient
>     interface, query-replace-regexp-eval could be considered obsolete or
>     at least obscure.
>
> I think its doc string should mention that the \ feature is more
> convenient for interactive use, and the function should be marked
> obsolete.

Since the only advantage appears to be with non-interactive use, and
for non-interactive use, the query-replace functions are not
recommended, I'll put something to this effect into the doc string.

As to obsoletion: its main effect would appear to be a byte-compiler
warning.  So perhaps something like

(make-obsolete 'query-replace-regexp-eval
  "For interactive use, use the special `\\,' feature of
`query-replace-regexp' instead.  Non-interactively, a loop
using `search-forward-regexp' and `replace-match' is
preferred." "22.1")

would be ok, even though we had no `deprecation' before `obsoletion'
and `\,' is new in Emacs 22.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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