From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jo=E3o_T=E1vora?= Newsgroups: gmane.emacs.devel Subject: Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch] Date: Thu, 17 Jan 2013 13:17:03 +0000 Message-ID: References: <20130113192854.GA4853@acm.acm> <20130114163003.GC3274@acm.acm> <20130115140855.GA3430@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1358428658 23911 80.91.229.3 (17 Jan 2013 13:17:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jan 2013 13:17:38 +0000 (UTC) Cc: Chong Yidong , Stefan Monnier , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 17 14:17:55 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 1TvpLv-000168-3f for ged-emacs-devel@m.gmane.org; Thu, 17 Jan 2013 14:17:55 +0100 Original-Received: from localhost ([::1]:46024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvpLe-0008EL-HN for ged-emacs-devel@m.gmane.org; Thu, 17 Jan 2013 08:17:38 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvpLb-0008E6-U9 for emacs-devel@gnu.org; Thu, 17 Jan 2013 08:17:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvpLW-0006fB-6m for emacs-devel@gnu.org; Thu, 17 Jan 2013 08:17:35 -0500 Original-Received: from mail-qa0-f54.google.com ([209.85.216.54]:59073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvpLQ-0006dz-RQ; Thu, 17 Jan 2013 08:17:24 -0500 Original-Received: by mail-qa0-f54.google.com with SMTP id p6so381862qad.13 for ; Thu, 17 Jan 2013 05:17:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=cKg1KP97aGx5JD2ugQ2yGe9TY3d/RCc6oEFsJoeJtS0=; b=ZY1h+q5RkqjnB3tckp7kai4yUyA/y++6otdQZvg8cRCwxW/P83JJqcizbwowUTx7Sw 1sh1RT+q8dY4i2T3cRdSVQYwrManpD17ZPThZoj/IHT9QUyl8VxvEwJOwRMrJjtXOtAz DD3k3pR0HXRtZ+PratOJA3K50KDgyliEEX/PWWK58Tt4mb2OKtn+4K5AW02+l9p8QtrZ L7C/bsZtRMfHG0I52Ok187Fct5wmeRrj9aVqOBD6AZBIH6nKB+0ZO5lzMWvOI212/ZQg YJy4r93Zw3BHuHnaw1StuFwGJEtfO3V6FPHj/PtVnQlskP5acqs7jLWv4rw2XhVltkWh H9dQ== X-Received: by 10.224.72.197 with SMTP id n5mr5686915qaj.38.1358428643824; Thu, 17 Jan 2013 05:17:23 -0800 (PST) Original-Received: by 10.229.137.82 with HTTP; Thu, 17 Jan 2013 05:17:03 -0800 (PST) In-Reply-To: <20130115140855.GA3430@acm.acm> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.216.54 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:156444 Archived-At: On Tue, Jan 15, 2013 at 2:08 PM, Alan Mackenzie wrote: > I think that's true. My problem is that font-lock-mode is being called > too soon, before the mode has been fully set up by the major mode hook. Sorry to hijack, but I have a similiar problem in autopair and yasnippet. M= y problem is that I sometimes want the minor modes never to be called at all depending on the major-mode setup. While the major-mode hook has a chance to disable them with (xxx-mode -1), there's no way to use the major-mode's hook to prevent a globalized minor m= ode from ever being activated in the buffer. This is a inneficient and cumbersome for these cases: * autopair-minor-mode crashes the system when activated with sldb-minor-mod= e, I use autopair-mode-on for this and hardcode the sldb reference there. It a= lso does a lot of useless setup of keybindings etc... * yas-minor-mode jit-loads snippets for the major mode when invoked. If its turned off immediately after, it loaded them too soon. before emacs 24, I used to use xxx-dont-turn-on variables set in major mode= hook and read in the xxx-mode-on function, but I agree that isn't particularly p= retty too. Thanks, -- Jo=E3o T=E1vora