[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102471: * textmodes/reftex-ref.el (r
From: |
Tassilo Horn |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102471: * textmodes/reftex-ref.el (reftex-goto-label): Use the current |
Date: |
Mon, 22 Nov 2010 09:09:41 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102471
committer: Tassilo Horn <address@hidden>
branch nick: trunk
timestamp: Mon 2010-11-22 09:09:41 +0100
message:
* textmodes/reftex-ref.el (reftex-goto-label): Use the current
\ref's or \pageref's value as default instead of initial input.
modified:
lisp/ChangeLog
lisp/textmodes/reftex-ref.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-11-21 19:39:21 +0000
+++ b/lisp/ChangeLog 2010-11-22 08:09:41 +0000
@@ -1,3 +1,8 @@
+2010-11-22 Tassilo Horn <address@hidden>
+
+ * textmodes/reftex-ref.el (reftex-goto-label): Use the current
+ \ref's or \pageref's value as default instead of initial input.
+
2010-11-21 Michael Albinus <address@hidden>
* files.el (backup-by-copying-when-mismatch): The default value is
=== modified file 'lisp/textmodes/reftex-ref.el'
--- a/lisp/textmodes/reftex-ref.el 2010-11-19 11:18:15 +0000
+++ b/lisp/textmodes/reftex-ref.el 2010-11-22 08:09:41 +0000
@@ -237,9 +237,9 @@
(setq label default))
;; Insert the label into the label list
- (let* ((here-I-am-info
+ (let* ((here-I-am-info
(save-excursion
- (if (and (or naked no-insert)
+ (if (and (or naked no-insert)
(integerp (cdr macro-cell)))
(goto-char (cdr macro-cell)))
(reftex-where-am-I)))
@@ -830,13 +830,16 @@
(reftex-access-scan-info)
(let* ((wcfg (current-window-configuration))
(docstruct (symbol-value reftex-docstruct-symbol))
- (label (completing-read "Label: " docstruct
- (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_*.:"))))
+ ;; If point is inside a \ref{} or \pageref{}, use that as
+ ;; default value.
+ (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))
(selection (assoc label docstruct))
(where (progn
(reftex-show-label-location selection t nil 'stay)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102471: * textmodes/reftex-ref.el (reftex-goto-label): Use the current,
Tassilo Horn <=