Use the correct label in the warning

* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label): Add
missing space in the prompt.  Use the new user defined label in
the warning (bug#36235).
This commit is contained in:
Arash Esbati 2021-10-08 11:12:30 +02:00 committed by Tassilo Horn
parent 6e83a4100a
commit 915e044d60

View file

@ -856,10 +856,10 @@ label prefix determines the wording of a reference."
(label (car toc)) newlabel)
(if (not (stringp label))
(error "This is not a label entry"))
(setq newlabel (read-string (format "Rename label \"%s\" to:" label)))
(setq newlabel (read-string (format "Rename label \"%s\" to :" label)))
(if (assoc newlabel (symbol-value reftex-docstruct-symbol))
(if (not (y-or-n-p
(format-message "Label `%s' exists. Use anyway? " label)))
(format-message "Label `%s' exists. Use anyway? " newlabel)))
(error "Abort")))
(save-excursion
(save-window-excursion