Commit 9061f667 authored by Tassilo Horn's avatar Tassilo Horn
Browse files

* textmodes/reftex-ref.el (reftex-goto-label): If point is inside

a \ref{} or \pageref{} macro, then use its value as initial input.
parent 18c01d76
2010-11-19 Tassilo Horn <tassilo@member.fsf.org>
* 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 <jay.p.belanger@gmail.com>
* calc/calc-units.el (math-build-units-table-buffer):
......
......@@ -831,7 +831,12 @@ Optional prefix argument OTHER-WINDOW goes to the label in another window."
(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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment