emacs-diffs
[Top][All Lists]
Advanced

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

master 7497aeff64: CC Mode: Allow the insertion of long strings of lette


From: Alan Mackenzie
Subject: master 7497aeff64: CC Mode: Allow the insertion of long strings of letters in reasonable time
Date: Tue, 9 Aug 2022 06:48:13 -0400 (EDT)

branch: master
commit 7497aeff644f9d1ce542de12d8301fd13a85e90a
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>

    CC Mode: Allow the insertion of long strings of letters in reasonable time
    
    This fix allows M-: (insert (make-string 1000000 ?y)) to work fast when
    inserted between C++ raw string delimiters after (setq long-line-threshold
    nil).
    
    * lisp/progmodes/cc-langs.el (c-symbol-key): Replace a "*" by "\\{,1000\\}" 
in
    a regexp.
---
 lisp/progmodes/cc-langs.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index c5964165c8..75f1660f22 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -850,7 +850,7 @@ This is of the form that fits inside [ ] in a regexp."
   "Regexp matching identifiers and keywords (with submatch 0).  Assumed
 to match if `c-symbol-start' matches on the same position."
   t    (concat (c-lang-const c-symbol-start)
-              "[" (c-lang-const c-symbol-chars) "]*")
+              "[" (c-lang-const c-symbol-chars) "]\\{,1000\\}")
   pike (concat
        ;; Use the value from C here since the operator backquote is
        ;; covered by the other alternative.



reply via email to

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