]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/reftex-ref.el
Update copyright year to 2016
[gnu-emacs] / lisp / textmodes / reftex-ref.el
index be119d9db58682ba15714cd4ad27be431f6babc5..5ac0e284eedc3223de20d862dc336d5de181ecf5 100644 (file)
@@ -1,6 +1,6 @@
 ;;; reftex-ref.el --- code to create labels and references with RefTeX
 
-;; Copyright (C) 1997-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2016 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@science.uva.nl>
 ;; Maintainer: auctex-devel@gnu.org
@@ -228,7 +228,7 @@ This function is controlled by the settings of reftex-insert-label-flags."
                                  (symbol-value reftex-docstruct-symbol)))
               (ding)
               (if (y-or-n-p
-                   (format "Label '%s' exists. Use anyway? " label))
+`                  (format-message "Label `%s' exists. Use anyway? " label))
                   (setq valid t)))
 
              ;; Label is ok
@@ -857,7 +857,8 @@ Optional prefix argument OTHER-WINDOW goes to the label in another window."
          (docstruct (symbol-value reftex-docstruct-symbol))
         ;; If point is inside a \ref{} or \pageref{}, use that as
         ;; default value.
-        (default (when (looking-back "\\\\\\(?:page\\)?ref{[-a-zA-Z0-9_*.:]*")
+        (default (when (looking-back "\\\\\\(?:page\\)?ref{[-a-zA-Z0-9_*.:]*"
+                                      (line-beginning-position))
                    (reftex-this-word "-a-zA-Z0-9_*.:")))
          (label (completing-read (if default
                                     (format "Label (default %s): " default)