GNU bug report logs -
#31551
27.0.50; emacs hangs in hexl-mode on modula2 files
Previous Next
Full log
Message #14 received at 31551 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
> Cc: Alexandre Adolphe <alexandre.adolphe <at> gmail.com>, 31551 <at> debbugs.gnu.org
> Date: Wed, 06 Jun 2018 10:00:04 -0400
>
> > On top of that, show-paren-mode will happily turn itself on in a
> > buffer under Hexl mode, although it makes no sense to me: the Hexl
> > display shows no parens to work with.
>
> At the same time, it's only enabled if the user explicitly requests it
> (as is the case in the OP's recipe), so I think we can consider this
> a pilot error.
I thought so too, until I turned on show-paren-mode _before_ switching
to Hexl, and saw it still turned on when in Hexl.
> > The fact that syntactical customizations of a mode stay in effect when
> > the display changes so radically sounds like a potential cause of many
> > trouble. So perhaps the right solution would be to temporarily
> > disable mode syntax while in Hexl mode.
>
> Agreed. Hexl-mode should use a "normal" major mode (e.g. calling
> kill-all-local-variables). In order to properly reset the previous
> major mode, it could either save&restore all previous local-vars, or
> just save the previous major-mode and call that major-mode
> function to restore the state.
Well, this is a much larger job than I hoped will be necessary. The
problem with "switching off SMIE" is that there doesn't seem to be a
way of doing that: I see no function to "undo" smie-setup, at least
not a documented way (maybe some clever call to smie-setup will undo
the previous one, but I couldn't see how).
> BTW, this "save previous major mode and then restore it" is something
> done in other places (at least doc-view-mode comes to mind, but
> I believe there are others as well) and we should try and avoid
> duplicating that code (i.e. develop a "standard" way to do it).
In the long run, certainly.
This bug report was last modified 7 years and 30 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.