[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102438: * textmodes/reftex-ref.el (r
From: |
Tassilo Horn |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102438: * textmodes/reftex-ref.el (reftex-goto-label): If point is inside |
Date: |
Fri, 19 Nov 2010 12:18:15 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102438
committer: Tassilo Horn <address@hidden>
branch nick: trunk
timestamp: Fri 2010-11-19 12:18:15 +0100
message:
* textmodes/reftex-ref.el (reftex-goto-label): If point is inside
a \ref{} or \pageref{} macro, then use its value as initial input.
modified:
lisp/ChangeLog
lisp/textmodes/reftex-ref.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-11-19 01:14:36 +0000
+++ b/lisp/ChangeLog 2010-11-19 11:18:15 +0000
@@ -1,3 +1,8 @@
+2010-11-19 Tassilo Horn <address@hidden>
+
+ * textmodes/reftex-ref.el (reftex-goto-label): If point is inside
+ a \ref{} or \pageref{} macro, then use its value as initial input.
+
2010-11-19 Jay Belanger <address@hidden>
* calc/calc-units.el (math-build-units-table-buffer):
=== modified file 'lisp/textmodes/reftex-ref.el'
--- a/lisp/textmodes/reftex-ref.el 2010-11-06 19:11:38 +0000
+++ b/lisp/textmodes/reftex-ref.el 2010-11-19 11:18:15 +0000
@@ -831,7 +831,12 @@
(let* ((wcfg (current-window-configuration))
(docstruct (symbol-value reftex-docstruct-symbol))
(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_*.:"))))
(selection (assoc label docstruct))
(where (progn
(reftex-show-label-location selection t nil 'stay)
- [Emacs-diffs] /srv/bzr/emacs/trunk r102438: * textmodes/reftex-ref.el (reftex-goto-label): If point is inside,
Tassilo Horn <=