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: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch-2] Date: Fri, 01 Feb 2013 18:16:37 -0500 Message-ID: References: <20130114163003.GC3274@acm.acm> <20130115140855.GA3430@acm.acm> <20130117175159.GA3114@acm.acm> <20130131110404.GA3459@acm.acm> <20130201154453.GA23075@acm.acm> <20130201195352.GB23075@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1359761177 32053 80.91.229.3 (1 Feb 2013 23:26:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Feb 2013 23:26:17 +0000 (UTC) Cc: =?iso-8859-1?Q?Jo=E3o_T=E1vora?= , Chong Yidong , Leo Liu , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 02 00:26:36 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 1U1Q04-0004MN-42 for ged-emacs-devel@m.gmane.org; Sat, 02 Feb 2013 00:26:28 +0100 Original-Received: from localhost ([::1]:47828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1Pzl-0004nU-Qn for ged-emacs-devel@m.gmane.org; Fri, 01 Feb 2013 18:26:09 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1Pvr-000875-No for emacs-devel@gnu.org; Fri, 01 Feb 2013 18:26:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1Pun-00081T-ME for emacs-devel@gnu.org; Fri, 01 Feb 2013 18:22:07 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:23070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1PqZ-00062b-8d; Fri, 01 Feb 2013 18:16:39 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpZnt/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGcGYFegxU X-IPAS-Result: Av4EABK/CFFFpZnt/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="244081" Original-Received: from 69-165-153-237.dsl.teksavvy.com (HELO pastel.home) ([69.165.153.237]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 01 Feb 2013 18:16:38 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id D9CE05943E; Fri, 1 Feb 2013 18:16:37 -0500 (EST) In-Reply-To: <20130201195352.GB23075@acm.acm> (Alan Mackenzie's message of "Fri, 1 Feb 2013 19:53:52 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:156779 Archived-At: > Is it OK to commit this change to emacs-24 now, and close bug#11152? No, I think this is good for trunk but not for emacs-24. I think that for emacs-24 we need a less invasive change. For that we should probably go back and try and figure out why the hook is run both times. As mentioned, the code tries to avoid running it twice by checking the value of `major-mode', so it appears that in the problem case, `major-mode' changes between the two hooks. Can you try and figure out if that's indeed the case and why? Stefan