Closed michzappa closed 2 years ago
Thanks for digging into this and providing the helpful specific information! Currently I think I'm the only "maintainer" (semi-)actively responding to issues but I am generally quite inactive atm and I will likely struggle to find time to tackle this.
I just played around with a minimal version of my config and quickly found the offending customization: (add-hook 'prog-mode-hook #'(lambda () (modify-syntax-entry ?- "w")))
. It probably breaks the assumptions made by this haskell-mode looking-at
function for the syntax table and causes the looping.
Doesn't look like a problem with haskell-mode, and also doesn't seem to merit any documentation changes since I doubt this is a common configuration. I'll probably just add a workaround in my own config to remove this syntax change in haskell-mode.
Thanks!
Ah cool, thanks for following up with this info. It rings a bell w.r.t. past reported issues, I believe...
Hello @michzappa I'm running into what looks like the same issue, and I'm not sure if you finally found a way to work around it?
Ok, got it I guess you had
(add-hook 'after-change-major-mode-hook (lambda () (modify-syntax-entry ?- "w")))
somewhere in your config (like I have). I confirm removing this line fix the behavior
Adding a language pragma, for example:
to my .hs files results in frequent pausing whenever emacs re-draws the buffer (after using a formatting package, for instance). Without the language pragma there is no delay for this action. I can C-g out of these delays usually, but sometimes it causes Emacs to crash. There are previous issues with the same context but different causes like #820.
This is the profiler report for the problematic action, :
This is happening to me on emacs 27.2 and 28.1 (native-compiled), with haskell-mode pulled with straight.el at commit 4ec2aa3 (current HEAD). On NixOS, if it matters. My haskell-mode config is the following, but the additional options make no difference in this scenario.
I am curious about this since it's such a fundamental feature of Haskell/haskell-mode and I haven't found any other issues.
Thank you!