emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 368e88b 1/2: Avoid infloop's by doing a case-sensitive match


From: Tassilo Horn
Subject: master 368e88b 1/2: Avoid infloop's by doing a case-sensitive match
Date: Sat, 26 Oct 2019 14:40:09 -0400 (EDT)

branch: master
commit 368e88b8cbeceaac898f5d6793257378866c99c8
Author: Arash Esbati <address@hidden>
Commit: Tassilo Horn <address@hidden>

    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.
---
 lisp/textmodes/reftex-ref.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el
index 3ec96aa..fd47514 100644
--- a/lisp/textmodes/reftex-ref.el
+++ b/lisp/textmodes/reftex-ref.el
@@ -841,7 +841,8 @@ Replace any occurrences of \"\\ref\" with REFSTYLE."
   ;; Replace instances of \ref in `fmt' with the special reference
   ;; style selected by the user.
   (cond
-   ((while (string-match "\\(\\\\ref\\)[ \t]*{" fmt)
+   ((while (let ((case-fold-search nil))
+             (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))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]