unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Format-alist vs. minor mode
@ 2008-08-01 10:45 tomas
  2008-08-01 12:26 ` martin rudalics
  2008-08-03 17:47 ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: tomas @ 2008-08-01 10:45 UTC (permalink / raw)
  Cc: emacs-devel

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

Hi,

I'm trying to switch on a minor mode via the format-alist feature, like
so:

  (add-to-list 'format-alist
               (list "ZEIT-k4c"
                     "ZEIT k4 cooked XML"
                     "^<\\?xml[^>]*>[^<]*<article>"
                     'am-parse-region
                     'am-unparse-region
                     t
                     'am-mode)
               nil
               (lambda (x y) (equal (car x) (car y))))

It works at first, when the regexp is recognized the mode function is
called... but then "fundamental-mode" sets in, kills all local variables
and reverts the minor mode settings.

What am I doing wrong? Do only major modes work with format-alist?

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

iD8DBQFIkulbBcgs9XrR2kYRAgpvAJ9LsoGl/L1YyyKxrQhkL1HHkEAIlgCfR6tn
ivpezzABebPH9+j4I1+eTsU=
=7Gd0
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-08-04 19:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-01 10:45 Format-alist vs. minor mode tomas
2008-08-01 12:26 ` martin rudalics
2008-08-01 13:17   ` tomas
2008-08-03 17:47 ` Stefan Monnier
2008-08-03 18:01   ` tomas
2008-08-04 19:02     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).