From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.devel Subject: Re: Format-alist vs. minor mode Date: Sun, 3 Aug 2008 20:01:21 +0200 Message-ID: <20080803180121.GA14451@tomas> References: <20080801104547.GA13337@tomas> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1217786127 17671 80.91.229.12 (3 Aug 2008 17:55:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Aug 2008 17:55:27 +0000 (UTC) Cc: tomas@tuxteam.de, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 03 19:56:17 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KPhoV-00064H-1Y for ged-emacs-devel@m.gmane.org; Sun, 03 Aug 2008 19:56:15 +0200 Original-Received: from localhost ([127.0.0.1]:49818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KPhnZ-0002oZ-WD for ged-emacs-devel@m.gmane.org; Sun, 03 Aug 2008 13:55:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KPhnU-0002lA-Kn for emacs-devel@gnu.org; Sun, 03 Aug 2008 13:55:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KPhnS-0002gi-SJ for emacs-devel@gnu.org; Sun, 03 Aug 2008 13:55:11 -0400 Original-Received: from [199.232.76.173] (port=46548 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KPhnS-0002gW-K4 for emacs-devel@gnu.org; Sun, 03 Aug 2008 13:55:10 -0400 Original-Received: from alextrapp1.equinoxe.de ([217.22.192.104]:54265 helo=www.elogos.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KPhnS-00007q-A3 for emacs-devel@gnu.org; Sun, 03 Aug 2008 13:55:10 -0400 Original-Received: by www.elogos.de (Postfix, from userid 1000) id 17E71900D7; Sun, 3 Aug 2008 20:01:21 +0200 (CEST) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15+20070412 (2007-04-11) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:102001 Archived-At: -----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, li= ke > > It works at first, when the regexp is recognized the mode function is > > called... but then "fundamental-mode" sets in, kills all local variab= les [...] > 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 =C3=A0 la format-alist, although those things are not ver= y related. This explains the misleading subject line. Do you think a pointer in the doc is appropriate? Regards - -- tom=C3=A1s -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIlfJxBcgs9XrR2kYRAi34AJ9KqWJ09gXFN8x4um3K/MFnMfmTsgCfYcvj kiTyi4a0tw+pkI4ywJTTkfg=3D =3DUX68 -----END PGP SIGNATURE-----