From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: org-mode and mode hooks. Date: Fri, 27 May 2005 14:13:23 -0500 (CDT) Message-ID: <200505271913.j4RJDNE07279@raven.dms.auburn.edu> References: <87y8a3mnz8.fsf@xs4all.nl> <87ll63weye.fsf-monnier+emacs@gnu.org> <200505252135.j4PLZvt26969@raven.dms.auburn.edu> <87hdgrufcl.fsf-monnier+emacs@gnu.org> <200505260359.j4Q3xbj28809@raven.dms.auburn.edu> <87is16rsid.fsf-monnier+emacs@gnu.org> <200505261501.j4QF17h00246@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1117222865 7145 80.91.229.2 (27 May 2005 19:41:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 27 May 2005 19:41:05 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 27 21:40:56 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dbkfm-00063u-EA for ged-emacs-devel@m.gmane.org; Fri, 27 May 2005 21:39:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dbkk6-0007nS-Mk for ged-emacs-devel@m.gmane.org; Fri, 27 May 2005 15:43:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DbkiM-0005xC-V3 for emacs-devel@gnu.org; Fri, 27 May 2005 15:41:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DbkiL-0005we-Rf for emacs-devel@gnu.org; Fri, 27 May 2005 15:41:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DbkhN-0005DQ-99 for emacs-devel@gnu.org; Fri, 27 May 2005 15:40:49 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DbkIA-00051u-32 for emacs-devel@gnu.org; Fri, 27 May 2005 15:14:46 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j4RJDmCK015025; Fri, 27 May 2005 14:13:49 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j4RJDNE07279; Fri, 27 May 2005 14:13:23 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: mmaug@yahoo.com In-reply-to: (message from Michael Mauger on Fri, 27 May 2005 14:49:37 +0000 (UTC)) 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:37799 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37799 Both Stefan and me might have partially misunderstood your problem. `sql-interactive-mode' calls comint-mode without enclosing it in a delay-mode-hooks form, as it should. To standardize your mode, you should either define it using `define-derived-mode' (see `(elisp)Derived Modes') or read `(elisp)Mode Hooks'. The reason why you need `font-lock-defontify' is because I believe (I did not check this in detail) that all comint uses font-lock for is font-lock-face, which is exactly what `font-lock-defontify' undoes. My patches do not try to mend this because most comint derived modes probably _want_ to keep comint's font-lock-face defaults. After standardizing your mode, you _maybe_ might still have to run font-lock-defontify to remove comint's font-lock-face properties. (I did not study your code in detail, nor am I completely sure about what your exact problem is.) Sincerely, Luc.