From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.help 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 Message-ID: <20090512091104.GB20600@tomas> References: <20090511114317.GA12496@tomas> <20090511114317.GA12496@tomas> <791153ba0905111408m6d4b36f4hfbf86b6290b9e75c@mail.gmail.com> 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 1242141417 10887 80.91.229.12 (12 May 2009 15:16:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 May 2009 15:16:57 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 12 17:16:48 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M3tip-00010o-H5 for geh-help-gnu-emacs@m.gmane.org; Tue, 12 May 2009 17:16:47 +0200 Original-Received: from localhost ([127.0.0.1]:45174 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3tio-0004ih-Q0 for geh-help-gnu-emacs@m.gmane.org; Tue, 12 May 2009 11:16:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M3ntO-0004zA-BW for help-gnu-emacs@gnu.org; Tue, 12 May 2009 05:03:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M3ntI-0004yY-Rn for help-gnu-emacs@gnu.org; Tue, 12 May 2009 05:03:17 -0400 Original-Received: from [199.232.76.173] (port=56622 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3ntI-0004yV-Ns for help-gnu-emacs@gnu.org; Tue, 12 May 2009 05:03:12 -0400 Original-Received: from alextrapp1.equinoxe.de ([217.22.192.104]:33211 helo=www.elogos.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M3ntH-0004Ou-CT for help-gnu-emacs@gnu.org; Tue, 12 May 2009 05:03:11 -0400 Original-Received: by www.elogos.de (Postfix, from userid 1000) id 799209005C; Tue, 12 May 2009 11:11:04 +0200 (CEST) Content-Disposition: inline In-Reply-To: <791153ba0905111408m6d4b36f4hfbf86b6290b9e75c@mail.gmail.com> User-Agent: Mutt/1.5.15+20070412 (2007-04-11) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Tue, 12 May 2009 11:14:37 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64382 Archived-At: -----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 i= s > 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=C3=A1s -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFKCT0oBcgs9XrR2kYRAmJZAJ9EEX0LyabPqK54ynvlgtws+nClRwCcDfjr RMyt2zhqwFWrHIHZTaTEehM=3D =3DoNtx -----END PGP SIGNATURE-----