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: Format-alist vs. minor mode Date: Fri, 1 Aug 2008 12:45:47 +0200 Message-ID: <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 1217587300 10145 80.91.229.12 (1 Aug 2008 10:41:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Aug 2008 10:41:40 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 01 12:42:29 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 1KOs5c-0008MF-LB for ged-emacs-devel@m.gmane.org; Fri, 01 Aug 2008 12:42:28 +0200 Original-Received: from localhost ([127.0.0.1]:46599 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOs4i-0003iY-3A for ged-emacs-devel@m.gmane.org; Fri, 01 Aug 2008 06:41:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KOs37-0001rg-Ub for emacs-devel@gnu.org; Fri, 01 Aug 2008 06:39:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KOs35-0001qO-SQ for emacs-devel@gnu.org; Fri, 01 Aug 2008 06:39:53 -0400 Original-Received: from [199.232.76.173] (port=38169 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOs35-0001q8-Lm for emacs-devel@gnu.org; Fri, 01 Aug 2008 06:39:51 -0400 Original-Received: from alextrapp1.equinoxe.de ([217.22.192.104]:53465 helo=www.elogos.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KOs35-0005H2-9O for emacs-devel@gnu.org; Fri, 01 Aug 2008 06:39:51 -0400 Original-Received: by www.elogos.de (Postfix, from userid 1000) id 9FA8D9006B; Fri, 1 Aug 2008 12:45:47 +0200 (CEST) Content-Disposition: inline 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:101860 Archived-At: -----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[^>]*>[^<]*
" '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=C3=A1s -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIkulbBcgs9XrR2kYRAgpvAJ9LsoGl/L1YyyKxrQhkL1HHkEAIlgCfR6tn ivpezzABebPH9+j4I1+eTsU=3D =3D7Gd0 -----END PGP SIGNATURE-----