diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 43ff5e85474..78dcac1399e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-05-25 Tassilo Horn + + * textmodes/reftex-ref.el (reftex-format-special): Make it work + also for AMS Math's \eqref macro. + 2014-05-25 Thien-Thi Nguyen 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." Replace any occurrences of \"\\ref\" with REFSTYLE." ;; Replace instances of \ref in `fmt' with the special reference ;; style selected by the user. - (while (string-match "\\(\\\\ref\\)[ \t]*{" fmt) - (setq fmt (replace-match refstyle t t fmt 1))) + (cond + ((while (string-match "\\(\\\\ref\\)[ \t]*{" fmt) + (setq fmt (replace-match refstyle t t fmt 1)))) + ((string-match "\\(\\\\[[:alpha:]]+\\)[ \t]*{" fmt) + (setq fmt (replace-match refstyle t t fmt 1)))) (format fmt label)) ;;;###autoload