From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: org-mode and mode hooks. Date: Thu, 26 May 2005 10:53:54 -0400 Message-ID: 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> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1117119387 25877 80.91.229.2 (26 May 2005 14:56:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 May 2005 14:56:27 +0000 (UTC) Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, Lute.Kamstra.lists@xs4all.nl, dominik@science.uva.nl Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 26 16:56:17 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DbJlq-0003Df-QV for ged-emacs-devel@m.gmane.org; Thu, 26 May 2005 16:55:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DbJpw-0003ir-7J for ged-emacs-devel@m.gmane.org; Thu, 26 May 2005 10:59:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DbJoU-00038k-B7 for emacs-devel@gnu.org; Thu, 26 May 2005 10:58:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DbJoS-00037c-4N for emacs-devel@gnu.org; Thu, 26 May 2005 10:58:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DbJoR-00035y-TU for emacs-devel@gnu.org; Thu, 26 May 2005 10:58:19 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DbJl7-0000J6-SD for emacs-devel@gnu.org; Thu, 26 May 2005 10:54:53 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1DbJkA-0008Gs-Tt; Thu, 26 May 2005 10:53:54 -0400 Original-To: Luc Teirlinck In-reply-to: <200505260359.j4Q3xbj28809@raven.dms.auburn.edu> (message from Luc Teirlinck on Wed, 25 May 2005 22:59:37 -0500 (CDT)) 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:37706 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37706 The following changes fix both bugs, by using post-command-hook to check whether font-lock was enabled for the correct mode and adapting the turn-on function to be able to correct it. That is a clever solution. However, I think there may be a bug in the code. The reason is that any number of different minor modes could be defined using define-global-minor-mode. If all of them try to use the buffer-local binding for easy-mmode-stored-mode, the various check-buffers functions will step over each other. Thus, I think each global minor mode needs to have its own variable for this purpose.