From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: chem Newsgroups: gmane.emacs.help Subject: Re: Differencing a major mode from its derived modes Date: Fri, 11 Jun 2004 19:34:55 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <86lliu577k.fsf@ifrance.com> References: <86y8mzc7fg.fsf@ifrance.com> <8665a2blop.fsf@rumba.de.uu.net> <86vfhy5xg4.fsf@ifrance.com> <86y8mui705.fsf@rumba.de.uu.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1086975336 18053 80.91.224.253 (11 Jun 2004 17:35:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Jun 2004 17:35:36 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 11 19:35:29 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BYpw8-0008FO-00 for ; Fri, 11 Jun 2004 19:35:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BYpwt-0000UK-Av for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Jun 2004 13:36:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BYpwk-0000Sv-OC for help-gnu-emacs@gnu.org; Fri, 11 Jun 2004 13:36:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BYpwi-0000SI-9l for help-gnu-emacs@gnu.org; Fri, 11 Jun 2004 13:36:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BYpwi-0000Rt-5e for help-gnu-emacs@gnu.org; Fri, 11 Jun 2004 13:36:04 -0400 Original-Received: from [195.46.220.211] (helo=mx.noos.fr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BYpve-0003Bv-E5 for help-gnu-emacs@gnu.org; Fri, 11 Jun 2004 13:34:58 -0400 Original-Received: from noos.fr (pm-mnet2.mgn.net [195.46.220.219]) by mx.noos.fr (Postfix) with SMTP id 84FE826A2E; Fri, 11 Jun 2004 19:34:56 +0200 (MEST) X-Mailbox-Line: From chemtov@ifrance.com Fri Jun 11 19:34:56 2004 Original-Received: from linux.localdomain (linux.localdomain [81.66.230.85]) by pm-mnet2.mgn.net with ESMTP; Fri, 11 Jun 2004 19:34:56 (MEST) Original-Received: by linux.localdomain (Postfix, from userid 35) id A800FBA6EB; Fri, 11 Jun 2004 19:34:55 +0200 (CEST) Original-To: Kai Grossjohann Mail-Followup-To: Kai Grossjohann , help-gnu-emacs@gnu.org In-Reply-To: <86y8mui705.fsf@rumba.de.uu.net> (Kai Grossjohann's message of "Fri, 11 Jun 2004 15:00:58 +0200") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:18946 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:18946 > I forget whether testing the variable major-mode was already > mentioned. You could write a function that checks (eq major-mode > 'text-mode), and only if this is true, then activate allout mode. yes, i tried that, but it only work if the mode is not derived from text-mode (eg. LaTeX - from aucTeX), but not if it is (eg. message). In the latter, code like this one : (add-hook 'text-mode-hook '(lambda () (if (eq major-mode 'text-mode) (flyspell-mode 1) (turn-on-auto-fill)))) will run the THEN _and_ the ELSE part of the IF expression, while in the former, only then ELSE part is evaluated. Furthermore, something like : (derived-mode-p 'text-mode) will return true even in text-mode (while it's hardly derived from text-mode, isn't it?). So, I found no easy way to discriminate between parent from derived children mode. Thanks again for the support. PS: Could you tell me if receive my reply twice : on the mailing list (or the newsgroup) and in your mailbox. I'm curious to know if all (of my gnus and message configurations) is working as intended. -- Chemtov