diff options
| author | Arash Esbati | 2019-10-26 13:25:19 +0200 |
|---|---|---|
| committer | Tassilo Horn | 2019-10-26 20:38:16 +0200 |
| commit | 368e88b8cbeceaac898f5d6793257378866c99c8 (patch) | |
| tree | e0ef3a01ddf354dd4fe7875b5479b0b67b13ce6c | |
| parent | 5fcb8d8ba08a3f153064cd1346662e716da41546 (diff) | |
| download | emacs-368e88b8cbeceaac898f5d6793257378866c99c8.tar.gz emacs-368e88b8cbeceaac898f5d6793257378866c99c8.zip | |
Avoid infloop's by doing a case-sensitive match
* lisp/textmodes/reftex-ref.el (reftex-format-special): Be
case-sensitive when checking the actual reference macro against
\ref. This avoids infloop when \Ref is chosen.
| -rw-r--r-- | lisp/textmodes/reftex-ref.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el index 3ec96aa67db..fd47514d690 100644 --- a/lisp/textmodes/reftex-ref.el +++ b/lisp/textmodes/reftex-ref.el | |||
| @@ -841,7 +841,8 @@ Replace 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 | (cond | 843 | (cond |
| 844 | ((while (string-match "\\(\\\\ref\\)[ \t]*{" fmt) | 844 | ((while (let ((case-fold-search nil)) |
| 845 | (string-match "\\(\\\\ref\\)[ \t]*{" fmt)) | ||
| 845 | (setq fmt (replace-match refstyle t t fmt 1)))) | 846 | (setq fmt (replace-match refstyle t t fmt 1)))) |
| 846 | ((string-match "\\(\\\\[[:alpha:]]+\\)[ \t]*{" fmt) | 847 | ((string-match "\\(\\\\[[:alpha:]]+\\)[ \t]*{" fmt) |
| 847 | (setq fmt (replace-match refstyle t t fmt 1)))) | 848 | (setq fmt (replace-match refstyle t t fmt 1)))) |