From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: Should mode commands be idempotent? Date: Mon, 25 Sep 2017 20:30:17 -0700 Message-ID: References: <9f11a3c6-b113-4bf6-9dab-f894b2ad77b5@default> <55da155a-03b1-d3ed-4036-12e5a60fa26c@gmail.com> <950166e7-2766-8a3e-1bc2-a93a356f652c@gmail.com> <118feee3-5787-43b7-9c9b-06907a16a448@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1506396636 9166 195.159.176.226 (26 Sep 2017 03:30:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 26 Sep 2017 03:30:36 +0000 (UTC) User-Agent: Gnus/5.130016 (Ma Gnus v0.16) Emacs/26.0 (darwin) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 26 05:30:32 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwgZq-0001ur-9G for ged-emacs-devel@m.gmane.org; Tue, 26 Sep 2017 05:30:30 +0200 Original-Received: from localhost ([::1]:45394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwgZx-0003PD-Bd for ged-emacs-devel@m.gmane.org; Mon, 25 Sep 2017 23:30:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwgZl-0003MV-FF for emacs-devel@gnu.org; Mon, 25 Sep 2017 23:30:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwgZh-0004da-3O for emacs-devel@gnu.org; Mon, 25 Sep 2017 23:30:25 -0400 Original-Received: from mail-pg0-x22d.google.com ([2607:f8b0:400e:c05::22d]:49407) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dwgZg-0004cl-UY for emacs-devel@gnu.org; Mon, 25 Sep 2017 23:30:21 -0400 Original-Received: by mail-pg0-x22d.google.com with SMTP id m30so5197926pgn.6 for ; Mon, 25 Sep 2017 20:30:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mail-followup-to:mime-version; bh=7sYacC1AH5mHQIxf15BYJKhM58fVwq3HaJ6iWRR9cpc=; b=jfgHJfAZdpIG0Kvx9PDj8cbIxGT8BBKmvxV+qq891NbEldHkm8JdwdUYJtUawOTgVF bsAXLVLpZma/eDS/OP3vCed6zAHG7e8j8tSrTA6fS2X4oViGr7RoP79hMrHurYETe5iC OGcsiKRZVaXGiKd1mNLg2WhngwJJpfvjXGIpevMjOWd33oHfIiEW+hNn5eTL6Q3wgSs2 1oEKpelQud18oVwfxLclcchj/CzpyTCmPDME6z60dle8c2Ln4v3oeq18ApUyeWhAlG02 ULW0Y8Dbn7Ik3QCUcIxdZV+uirGB0VI54HBPSfQucVEKEXa9s9V93vqWTJgvwXUtJ4cB Tyrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:mail-followup-to:mime-version; bh=7sYacC1AH5mHQIxf15BYJKhM58fVwq3HaJ6iWRR9cpc=; b=jAZE66LSHFtFiJYtjp5la2cv1Nt26uVcl/QbXsMRi57v6MsO3Q5rYlyA2quPm5/MXl jBnXJ5bfVEl/dcOGMXqBktwvCBHY89PuVzquEOWeeYaZOX42mnYOUJGr4pzSK8FsDw/m n6zpogllJPGR+3+XEpdlmb9n8R+b6qsBl3FkFMYwLnLbnlCCfUS65OWTlFSc+eWWFcwJ 514dBX4O/yoN2zB/0ZdT0sFobt7ccQrhngOHSu9te+5ftzmfuWDmC3LkhpOFOVGEW16w UQE90IFRTJhFKM5BLFloT0xk+zNHLLtAXq55bGRZG+gbPhKq+QpdhtZNgggqK9k5VN46 mUSA== X-Gm-Message-State: AHPjjUiCq18JkY2ESeFhFouH/l0BlwRpMyPpvjbfZRy8S7pO+YjU2uan b3oNtdxrhhr5Je4km2AxDl7lCfnx X-Google-Smtp-Source: AOwi7QDutH/GXnSdIVi+Id2G31pz9rb/PeC/PiYLGeG2PkDoJeiC+q9fRjjTlND1jp4P649l5pMANw== X-Received: by 10.98.65.27 with SMTP id o27mr9565736pfa.205.1506396619858; Mon, 25 Sep 2017 20:30:19 -0700 (PDT) Original-Received: from Vulcan.local (76-234-69-149.lightspeed.frokca.sbcglobal.net. [76.234.69.149]) by smtp.gmail.com with ESMTPSA id b65sm13832360pfj.97.2017.09.25.20.30.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Sep 2017 20:30:19 -0700 (PDT) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id 5717591ACB0F; Mon, 25 Sep 2017 20:30:18 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Mon, 25 Sep 2017 20:36:32 -0400") Mail-Followup-To: Stefan Monnier , emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:218798 Archived-At: >>>>> "SM" == Stefan Monnier writes: SM> It seems the general consensus in this discussion is that it might indeed SM> be a good convention. Since you disagree, maybe you could give us some SM> concrete arguments about why it might be desirable for a minor/major mode SM> to be non-idempotent. FWIW, I can't off the top of my head think of a reason why (foo-mode 1) followed by (foo-mode 1) should do something different than just calling it once. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2