help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pilot error [was: How to set up a minor mode depending on a major mode?]


From: tomas
Subject: Pilot error [was: How to set up a minor mode depending on a major mode?]
Date: Tue, 12 May 2009 11:11:04 +0200
User-agent: Mutt/1.5.15+20070412 (2007-04-11)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks, Peter, Lennart for your answers annd sorry for my chaos.

On digging deeper, it was actually a *minor* mode trying to set up the
visual-lines mode (I wrote that code. Should have known. Onset of
senility? Sorry for that).

I'll try to debug things a bit further and come back.

[Peter:]
> You must be missing something - but I cannot tell what from this
> information.
> The major mode is supposed to run am-mode-hook as the FINAL act as it is
> starting up [...]

Yes, I gather this from the doc. That's why I was surprised. What brogut
me to the conclusion that someone was wiping away the mode (local)
variables was that declaring visual-line-mode 'permanent-local shows up
the mode lighter in the mode line (of course the visual-lines mode
doesn't work properly, since it probably has lost some vital parts on
the way).

[Lennart:]
> Running the major mode hook should be the very last thing a major mode
> does. From your description it sounds like am-mode runs the hook
> earlier. That would be a bug.

Might still hold for a minor mode. As far as it concerns major modes,
I'll take it back. Shame on me and sorry for the noise.

I'll report on my findings.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFKCT0oBcgs9XrR2kYRAmJZAJ9EEX0LyabPqK54ynvlgtws+nClRwCcDfjr
RMyt2zhqwFWrHIHZTaTEehM=
=oNtx
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]