unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45375: cc-mode indentation sometimes doesn't work
@ 2020-12-22 23:02 Herman, Géza
  2021-02-12 21:17 ` Basil L. Contovounesios
  0 siblings, 1 reply; 6+ messages in thread
From: Herman, Géza @ 2020-12-22 23:02 UTC (permalink / raw)
  To: 45375

On current master (6af31fd71ff1a403c199c479577bcc145a547db1) indentation 
of C/C++ files sometimes doesn't work. I've bisected it: commit 
"9022df7027 Optimise c-parse-state for large buffers with few (if any) 
braces." introduced this behavior.

This is how to reproduce: check out 
9022df70270243f211c54ccd66800320148b8434, and execute "emacs -Q 
xdisp.c". Jump to line 2989 with M-g M-g 2989, move the cursor to the 
end of line of "Lisp_Object retval;", and press enter. The cursor will 
be moved to the correct place (correctly indented, cursor will be placed 
below the 'L' character of the previous line). Then push enter at end of 
line of "va_list ap;". For me, cursor will jump to the beginning of the 
line, it won't be indented. If I keep pressing enters, the next failure 
will be at "va_end (ap);". I'm not sure whether this exact steps 
reproduces for everyone, but it happened me 5 of 5 trials. If I don't 
press enter at the first line ("Lisp_Object retval;"), the problem 
doesn't happen for any of this function lines. But it will happen for 
somewhere else, if I keep trying (move around the file, press enter at 
random places: if will fail sooner or later).

For my configuration (without -Q), this problem happens quite frequently 
during editing C++ code.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-23 11:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22 23:02 bug#45375: cc-mode indentation sometimes doesn't work Herman, Géza
2021-02-12 21:17 ` Basil L. Contovounesios
2021-02-13 14:39   ` bug#46400: " Alan Mackenzie
2021-02-13 18:43     ` Herman, Géza
2021-02-14 11:11       ` Alan Mackenzie
2021-02-23 11:32         ` bug#46400: " Alan Mackenzie

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).