all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: tomas@tuxteam.de
Cc: help-gnu-emacs@gnu.org
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	[thread overview]
Message-ID: <20090512091104.GB20600@tomas> (raw)
In-Reply-To: <e01d8a50905111513w2949766bod8b63b64fa28ffe1@mail.gmail.com> <791153ba0905111408m6d4b36f4hfbf86b6290b9e75c@mail.gmail.com>

-----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-----




  parent reply	other threads:[~2009-05-12  9:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-11 11:43 How to set up a minor mode depending on a major mode? tomas
2009-05-11 22:13 ` Lennart Borgman
2009-05-12  6:43   ` Tassilo Horn
     [not found]   ` <791153ba0905111408m6d4b36f4hfbf86b6290b9e75c@mail.gmail.com>
2009-05-12  9:11     ` tomas [this message]
2009-05-12 10:45 ` [semi-resolved] " tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090512091104.GB20600@tomas \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.