Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
XEmacs freezes for 11 seconds when pressing carriage return #1076
Author Name: Dan Hopper
I'm not an emacs programming expert but I have been using verilog-mode for a very long time with success. I've used it before with very long (10000-20000 line) Verilog source files without too much issue. But I recently inherited a 17,000 line source file that is giving Verilog-mode a hiccup while pressing carriage return, and I wonder if it might be possible to figure out why. The issue is that XEmacs goes out to lunch for awhile with 100% CPU when I press carriage return at the end of various lines throughout the file. The file contains Verilog-2001 and SystemVerilog features.
For example, I'm about 5000 lines into the file pressing carriage return at the end of a multi-line C++ style comment, and XEmacs locks up for ~ 12 seconds with 100% CPU. When it returns, it works normally. But this happens over and over so it's rather an impediment. As Wilson suggested in an email, I set M-x toggle-debug-on-quit, then hit ctrl-g a few seconds into the slowness, and have attached the backtrace to this issue. Maybe it's helpful to those with more expertise?
I'd appreciate any suggestions on features to disable, etc.
I've already updated to verilog-mode-2016-04-23-5f6855e-vpo.el.gz, which was the latest a few weeks ago.
Here's what I'm over-riding in ~/.emacs. (Some of the values I set 15-20 years ago so if they're not ideal then I can easily change them.) As you can see, when I first encountered this slow carriage return problem, setting "verilog-auto-indent-on-newline nil" seemed to solve it, but now I'm finding it didn't completely eliminate the behavior.
(add-hook 'verilog-mode-hook '(lambda () (font-lock-mode 1)))
Original Redmine Comment
Sorry, didn't notice that the pre wrapper was needed for the ~/.emacs file excerpt: