From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode Date: Mon, 14 Jan 2013 00:48:31 +0400 Message-ID: <87vcb0byhs.fsf@yandex.ru> References: <20130113192854.GA4853@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358110137 19210 80.91.229.3 (13 Jan 2013 20:48:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Jan 2013 20:48:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 13 21:49:14 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TuUUS-0002lw-GS for ged-emacs-devel@m.gmane.org; Sun, 13 Jan 2013 21:49:12 +0100 Original-Received: from localhost ([::1]:43341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuUUC-0000eF-4v for ged-emacs-devel@m.gmane.org; Sun, 13 Jan 2013 15:48:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuUU5-0000e7-Ji for emacs-devel@gnu.org; Sun, 13 Jan 2013 15:48:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TuUTw-000120-1c for emacs-devel@gnu.org; Sun, 13 Jan 2013 15:48:49 -0500 Original-Received: from mail-wi0-f171.google.com ([209.85.212.171]:57333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuUTv-00011n-Qk for emacs-devel@gnu.org; Sun, 13 Jan 2013 15:48:39 -0500 Original-Received: by mail-wi0-f171.google.com with SMTP id hn14so865575wib.4 for ; Sun, 13 Jan 2013 12:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=N8n/lDMWXMYQdVbzUo5BvrKaERyjeP7pjBwON0jCrkQ=; b=gI4w+Hh1GCQV+wt7pL/wxZOfCZMY4XEKvKrNwmSSUB8pAwyLMiw/cfKIjuiYo+eb9w daYVrnJkkl1ht11v0+5TFUOKwSyhbtt3GPKxUERDa/33qloWcBQw0Xt/PBznzf4eGNJN ZuryZ9WFVMehh/tAucQ1Mlv3mhlmmn+eGX1bbjD4X0Ovtdu4nys1vMH+y49EHUEgzBEh Kkh7xhor4ZiT7rg6bCAHg5+tcKg8GT/T9c7XorADGmoyMY2eknsmYrjuWh3NaDZaYOub hXTuVTdYNeyk4XVqY3PxPbKfRyOK6LQ0GU/YphGb+nYGrXdxE6+FgjqpAgDabcz9Bn0u yU2w== X-Received: by 10.194.76.165 with SMTP id l5mr131184060wjw.14.1358110118962; Sun, 13 Jan 2013 12:48:38 -0800 (PST) Original-Received: from SOL ([178.252.98.87]) by mx.google.com with ESMTPS id ex6sm10767266wid.3.2013.01.13.12.48.36 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 13 Jan 2013 12:48:37 -0800 (PST) In-Reply-To: <20130113192854.GA4853@acm.acm> (Alan Mackenzie's message of "Sun, 13 Jan 2013 19:28:54 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.212.171 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156326 Archived-At: Alan Mackenzie writes: > The situation here is the direct cause of bug #11152, where in CC Mode, > doc comments whose fontification is specified in a mode hook don't get > fontified properly, or at all. It would be good to fix this bug for > Emacs 24.3. > > In define-globalized-minor-mode L72-75, the newly defined -enable- > function is added to both the following hooks: > change-major-mode-after-body-hook > after-change-major-mode-hook > . (These hooks are run before and after the major mode hook.) > > It seems the hacker who formulated this macro was undecided whether to > run the -enable- function before or after the mode hooks, so decided > upon both as a compromise. This isn't harmless. > > In particular, running `global-font-lock-mode-enable-in-buffers' before > the objc-mode-hook causes a one-time font-lock-keywords initialisation > to happen before a critical initialisation has been performed by that > hook. Sounds similar to http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11929