aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTassilo Horn2014-05-25 19:40:54 +0200
committerTassilo Horn2014-05-25 19:40:54 +0200
commit5e26d9849a79bf78fda821979fc937f7e5e6df52 (patch)
tree804b256ac18c0a0a821dd173e0df802f5dd7cb34
parent770a6a917f9ef4a30cc6aceedc746869416813b3 (diff)
downloademacs-5e26d9849a79bf78fda821979fc937f7e5e6df52.tar.gz
emacs-5e26d9849a79bf78fda821979fc937f7e5e6df52.zip
Improve reftex-format-special
* lisp/textmodes/reftex-ref.el (reftex-format-special): Make it work also for AMS Math's \eqref macro.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/textmodes/reftex-ref.el7
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 43ff5e85474..78dcac1399e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-05-25 Tassilo Horn <tsdh@gnu.org>
2
3 * textmodes/reftex-ref.el (reftex-format-special): Make it work
4 also for AMS Math's \eqref macro.
5
12014-05-25 Thien-Thi Nguyen <ttn@gnu.org> 62014-05-25 Thien-Thi Nguyen <ttn@gnu.org>
2 7
3 Arrange to never byte-compile the generated -pkg.el file. 8 Arrange to never byte-compile the generated -pkg.el file.
diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el
index 7b48c8a62c2..ac01b6852ec 100644
--- a/lisp/textmodes/reftex-ref.el
+++ b/lisp/textmodes/reftex-ref.el
@@ -840,8 +840,11 @@ package.\n\nThis is a generated function."
840Replace any occurrences of \"\\ref\" with REFSTYLE." 840Replace any occurrences of \"\\ref\" with REFSTYLE."
841 ;; Replace instances of \ref in `fmt' with the special reference 841 ;; Replace instances of \ref in `fmt' with the special reference
842 ;; style selected by the user. 842 ;; style selected by the user.
843 (while (string-match "\\(\\\\ref\\)[ \t]*{" fmt) 843 (cond
844 (setq fmt (replace-match refstyle t t fmt 1))) 844 ((while (string-match "\\(\\\\ref\\)[ \t]*{" fmt)
845 (setq fmt (replace-match refstyle t t fmt 1))))
846 ((string-match "\\(\\\\[[:alpha:]]+\\)[ \t]*{" fmt)
847 (setq fmt (replace-match refstyle t t fmt 1))))
845 (format fmt label)) 848 (format fmt label))
846 849
847;;;###autoload 850;;;###autoload