emacs-diffs
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r102438: * textmodes/reftex-ref.e


From: Tassilo Horn
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r102438: * textmodes/reftex-ref.el (reftex-goto-label): If point is inside
Date: Mon, 22 Nov 2010 09:10:25 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

Hi Stefan,

>>           (label (completing-read "Label: " docstruct
>> -                                 (lambda (x) (stringp (car x))) t))
>> +                                 (lambda (x) (stringp (car x))) t
>> +                             ;; If point is inside a \ref{} or
>> +                             ;; \pageref{}, use that as initial
>> +                             ;; input.
>> +                             (when (looking-back 
>> "\\\\\\(?:page\\)?ref{[-a-zA-Z0-9_*.:]*")
>> +                               (reftex-this-word "-a-zA-Z0-9_*.:"))))
>
> This seems to go against our conventions of keeping the initial
> minibuffer contents empty and rely on the default value instead.

Ah, I didn't know about that convention, but I can see that this is
indeed better.  I fixed it in the way you suggested...

> I.e. the above should be something like:
>
>          ;; If point is inside a \ref{} or \pageref{}, use that as
>        ;; initial input.
>          (default (when (looking-back 
> "\\\\\\(?:page\\)?ref{[-a-zA-Z0-9_*.:]*")
>                   (reftex-this-word "-a-zA-Z0-9_*.:"))))
>          (label (completing-read (if default
>                                      (format "Label (default %s): " default)
>                                    "Label: ")
>                                  docstruct
>                                  (lambda (x) (stringp (car x))) t nil nil
>                                default))

... and also adapted the comment. ;-)

Bye,
Tassilo



reply via email to

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