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: Fri, 18 Jan 2013 12:07:09 +0000 Message-ID: References: <20130113192854.GA4853@acm.acm> <20130114163003.GC3274@acm.acm> <20130115140855.GA3430@acm.acm> <20130117175159.GA3114@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf3074b45ca04def04d38ef43d X-Trace: ger.gmane.org 1358510857 10487 80.91.229.3 (18 Jan 2013 12:07:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Jan 2013 12:07:37 +0000 (UTC) Cc: Alan Mackenzie , Chong Yidong , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 18 13:07:54 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 1TwAji-0003Qj-2K for ged-emacs-devel@m.gmane.org; Fri, 18 Jan 2013 13:07:54 +0100 Original-Received: from localhost ([::1]:57746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwAjR-0004Ym-5Z for ged-emacs-devel@m.gmane.org; Fri, 18 Jan 2013 07:07:37 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwAjN-0004YK-6D for emacs-devel@gnu.org; Fri, 18 Jan 2013 07:07:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwAjM-0006kr-4s for emacs-devel@gnu.org; Fri, 18 Jan 2013 07:07:33 -0500 Original-Received: from mail-qa0-f43.google.com ([209.85.216.43]:44200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwAjK-0006kb-8Q; Fri, 18 Jan 2013 07:07:30 -0500 Original-Received: by mail-qa0-f43.google.com with SMTP id cr7so5109542qab.2 for ; Fri, 18 Jan 2013 04:07:29 -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; bh=lcsUHusTRzII/nzZQA0S9tR/RILDp24ZToKRJ6LWP2Y=; b=w9gMCpKgo+b/PTkYL3ZpHBpNlgAmOlmxyd8cBDYM2ECeL4UcF2OEa7BhzB/bDhbAtQ bnXCUfxFFufins2TcyTCAbM67EdVaTTg6hxJDx7i7Nv5s7KfUbRjAITLXkP+Mrf7754c uRAfPuYTsSOhj7AzZLUKSD1ctvOU21uQ5/+kvyIS7R27gxy+AZxpLJ+gtBt7cuG2/wwq sfPvC7lRRdK6z4P0WXgmmVKPx41uz75Mhpt07XPOZr+W3mEJQzyY0S8pQUDtI9+bf0QQ qeb4fLDWLWVgEuZ2vP71FAecYHfjiezvgLdF2/LunDs3Z7UBcEhRFicyQnCWvg0CtF5+ mK8Q== X-Received: by 10.224.222.14 with SMTP id ie14mr9009432qab.61.1358510849805; Fri, 18 Jan 2013 04:07:29 -0800 (PST) Original-Received: by 10.229.137.82 with HTTP; Fri, 18 Jan 2013 04:07:09 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.216.43 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:156460 Archived-At: --20cf3074b45ca04def04d38ef43d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Jan 17, 2013 at 6:31 PM, Stefan Monnier wrote: > It's also kind of ugly because of all the magic, but it's the best I can > come up with so far. I think the approach is quite good (was actually thinking along those lines on my way to work this morning). It's not uglier than the existing (defvar ,MODE-major-mode nil) (make-variable-buffer-local ',MODE-major-mode) I wonder if the existing MODE-major-mode and the disable-MODE you proposed could somehow take advantage of lexical binding so they wouldn't be visible to the user, but maybe this makes no sense... reading that section of easy-mmode.el always makes me delirious :-) Also couldn't ,MODE-major-mode contain both semantics and be renamed or something? -- Jo=E3o T=E1vora --20cf3074b45ca04def04d38ef43d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Thu, Jan 17, 2013 at 6:31 PM, Stefan Mon= nier <monnier@iro.umontreal.= ca> wrote:
> It's also kind of ugly because of all = the magic, but it's the best I can
> come up with so far.

I think the approac= h is quite good (was actually thinking along those
lines on my wa= y to work this morning). It's not uglier than the existing

(defvar ,MODE-major-mode nil)
(make-variable-buffe= r-local ',MODE-major-mode)

I wonder if the exi= sting MODE-major-mode and the disable-MODE you
proposed could som= ehow take advantage of lexical binding so they
wouldn't be visible to the user, but maybe this makes no sense...<= /div>
reading that section of easy-mmode.el always makes me delirious := -)

Also couldn't ,MODE-major-mode contain both= semantics and be renamed or
something?

--
Jo=E3o T=E1vora
=

--20cf3074b45ca04def04d38ef43d--