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: Stefan Monnier
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r102438: * textmodes/reftex-ref.el (reftex-goto-label): If point is inside
Date: Sun, 21 Nov 2010 11:46:29 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>           (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.
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))


-- Stefan



reply via email to

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