emacs-devel
[Top][All Lists]
Advanced

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

Re: query-replace-interactive not documented


From: David Kastrup
Subject: Re: query-replace-interactive not documented
Date: 16 Jun 2004 01:13:03 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

address@hidden (Kim F. Storm) writes:

> David Kastrup <address@hidden> writes:
> 
> > Andreas Schwab <address@hidden> writes:
> > 
> > > Juri Linkov <address@hidden> writes:
> > > 
> > > > Index: replace.el
> > > > ===================================================================
> > > > RCS file: /cvsroot/emacs/emacs/lisp/replace.el,v
> > > > retrieving revision 1.172
> > > > diff -c -r1.172 replace.el
> > > > *** replace.el  10 Jun 2004 04:21:14 -0000      1.172
> > > > --- replace.el  15 Jun 2004 17:57:28 -0000
> > > > ***************
> > > > *** 174,179 ****
> > > > --- 183,199 ----
> > > >            (if (and transient-mark-mode mark-active)
> > > >                (region-end)))))
> > > >   
> > > > +   (if (string-match "\\\\'" to-string)
> > > > +       (let (to expr)
> > > > +         (while (string-match "\\\\'" to-string)
> > > 
> > > That needs more careful treatment, to handle cases like "\\\\'" where one
> > > wants to substitute a backslash followed by a single quote.
> > 
> > I am going to take a stab at this.
> 
> 
> I don't like the \'(...) form  -- to me ' means "DONT INTERPRET"

Well, it _is_ a delayed interpretation after all.

Another option may be
\`read-expression optionally followed by ' which gives us

\\footnote{\\label{fn:\`replace-count'}}

as well as

\\footnote{\\label{fn:\`(or replace-count)}}

\` has somewhat more of a "will be evaluated later" scent and it has
the advantage that it is somewhat natural to match it up with ' in
case we need to explicitly end the read expression.

> Maybe \=(...) is better ?

= is really comparison in my book instead of evaluation...

> Also, \? could be used to ask the user for a string to insert at
> that point in each replacement...

One after the other.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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