From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: org-mode and mode hooks. Date: Wed, 08 Jun 2005 12:15:36 -0400 Message-ID: <87zmu0hlwj.fsf-monnier+emacs@gnu.org> References: <87y8a3mnz8.fsf@xs4all.nl> <200505292354.j4TNsTE13354@raven.dms.auburn.edu> <200505311544.j4VFijq17680@raven.dms.auburn.edu> <200506011911.j51JBR025269@raven.dms.auburn.edu> <87oeap231t.fsf-monnier+emacs@gnu.org> <200506012242.j51MgBj26277@raven.dms.auburn.edu> <87r7flpubg.fsf-monnier+emacs@gnu.org> <200506012349.j51NnUA26352@raven.dms.auburn.edu> <200506031505.j53F5IE04403@raven.dms.auburn.edu> <200506041517.j54FHgg09328@raven.dms.auburn.edu> <200506062328.j56NSnY18148@raven.dms.auburn.edu> <87wtp6jarp.fsf-monnier+emacs@gnu.org> <200506071908.j57J8nk19610@raven.dms.auburn.edu> <874qc9kerl.fsf-monnier+emacs@gnu.org> <200506080136. NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118247537 3249 80.91.229.2 (8 Jun 2005 16:18:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Jun 2005 16:18:57 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 08 18:18:47 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dg3FO-0002Yb-90 for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2005 18:17:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dg3M8-0005IJ-9p for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2005 12:24:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dg3LA-00050Q-EM for emacs-devel@gnu.org; Wed, 08 Jun 2005 12:23:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dg3L4-0004xG-TU for emacs-devel@gnu.org; Wed, 08 Jun 2005 12:23:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dg3L3-0004u1-5m for emacs-devel@gnu.org; Wed, 08 Jun 2005 12:23:33 -0400 Original-Received: from [209.226.175.34] (helo=tomts13-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dg3H1-0002xL-7O; Wed, 08 Jun 2005 12:19:23 -0400 Original-Received: from alfajor ([67.71.116.59]) by tomts13-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050608161539.IMJM25800.tomts13-srv.bellnexxia.net@alfajor>; Wed, 8 Jun 2005 12:15:39 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id 4277CD73A3; Wed, 8 Jun 2005 12:15:36 -0400 (EDT) Original-To: Luc Teirlinck In-Reply-To: <200506080136.j581ajr21542@raven.dms.auburn.edu> (Luc Teirlinck's message of "Tue, 7 Jun 2005 20:36:45 -0500 (CDT)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:38347 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38347 > Could be, but your change does not try to fix it, instead it documents the > part of the misbehavior we happen to know about, thus legitimizing the use, > rather than discouraging it. > But your previous text, even when read as intended: > whereas I meant it to mean: > Use a non-@code{nil} @var{mode} argument only when you use > @code{font-lock-add-keywords} or @code{font-lock-remove-keywords} in your > @file{.emacs} file. > legitimizes the use, since it says that it is OK to use it in your > .emacs, and that is probably the main use. It does not tell what > difference it makes if you use a nil or non-nil argument from your > .emacs. >> The misleading text in question made me lose a lot of time. > In what way, specifically? Which hook did you try? > It was completely impossible to figure out what a nil MODE arg was > _trying_ to do. Don't know about the TeXinfo doc, but the docstring is pretty clear: MODE should be a symbol, the major mode command name, such as `c-mode' or nil. If nil, highlighting keywords are added for the current buffer. > You could not look at the actual behavior, because > before my patches the behavior with a nil MODE argument made no sense. Huh? I've used it for many years with a nil argument and it worked just fine. You know very well that the problem you fixed only occurred in some particular cases. > If Font Lock was for some reason enabled for the wrong mode, it was > impossible to correct reliably. That unrelated to the TeXinfo doc. You're here arguing for your patch, which is a waste of time, since it's installed and nobody objected to it. > The docs clearly seemed to suggest that a nil argument tried to enable the > keywords for MODE only and not for derived modes, Then the docs obviously need to be fixed, since there is no nil MODE. > As mention, I'd like to semi-obsolete it, so I'd rather not document > it further: use at your own risk. > As long as it is mentioned for possible use in .emacs, it is not > semi-obsolete. No: as long as it's mentioned, it's not *obsolete*. That's why I say semi-obsolete. Stefan