[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37137: Setting font-lock-case-fold-search to t causes hangs on certa
bug#37137: Setting font-lock-case-fold-search to t causes hangs on certain types in c-mode
Wed, 21 Aug 2019 15:20:20 -0700
I have in my .emacs file only these two lines:
Then if I visit an empty or nonexistent C file and just type "LONG"
(in all caps or with at least one letter being capital), Emacs will
hang after typing the final G but before the G appears on
screen. Typing C-g a couple of times gets Emacs unstuck until I
continue to type. The same behavior also happens if I type "SHORT".
This happens in both Emacs 26.1 in text mode on a Linux machine and in
Emacs 25.3 in GUI mode on Windows.
After messing with GDB a bit, I am pretty sure the hang is at the
while loop in c-forward-type at cc-engine.el:7657 and its getting
stuck because looking-at matches LONG because its case insensitive,
but the c-forward-keyword-clause doesn't move forward because the
first thing it does is try to find "LONG" in c-keywords-obarray via
`intern-soft` and immediately returns because it doesn't find it
there. Here is the while loop:
(setq safe-pos (point))
(when (and c-record-type-identifiers
(c-record-type-id (cons (match-beginning 1)