From 7497aeff644f9d1ce542de12d8301fd13a85e90a Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 9 Aug 2022 10:46:21 +0000 Subject: [PATCH] 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 c5964165c8d..75f1660f221 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. -- 2.39.5