[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Format-alist vs. minor mode
From: |
tomas |
Subject: |
Re: Format-alist vs. minor mode |
Date: |
Sun, 3 Aug 2008 20:01:21 +0200 |
User-agent: |
Mutt/1.5.15+20070412 (2007-04-11) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun, Aug 03, 2008 at 01:47:16PM -0400, Stefan Monnier wrote:
> > I'm trying to switch on a minor mode via the format-alist feature, like
> > It works at first, when the regexp is recognized the mode function is
> > called... but then "fundamental-mode" sets in, kills all local variables
[...]
> If the minor mode depends on the file/buffer's contents, then it should
> survive a change in major-mode, right? So you might want to make your
> minor mode permanent-local.
Thanks, Stefan. I figured that out thanks to the pointers provided by
Martin Rudalics. It was very surprising at the beginning :-)
I guess one wants to do that almost always when doing format
transformations à la format-alist, although those things are not very
related. This explains the misleading subject line.
Do you think a pointer in the doc is appropriate?
Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIlfJxBcgs9XrR2kYRAi34AJ9KqWJ09gXFN8x4um3K/MFnMfmTsgCfYcvj
kiTyi4a0tw+pkI4ywJTTkfg=
=UX68
-----END PGP SIGNATURE-----