From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24706: 26.0.50; Minor mode functions should do strict argument type checking Date: Sun, 02 Aug 2020 19:13:19 +0300 Message-ID: <83tuxlauw0.fsf@gnu.org> References: <83mvi4yvoj.fsf@gnu.org> <83tw5bo1em.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23398"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 24706@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 02 18:14:21 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k2Gcu-0005zN-BN for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Aug 2020 18:14:20 +0200 Original-Received: from localhost ([::1]:57026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2Gct-0001Ra-7L for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Aug 2020 12:14:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2Gcc-0001RP-NZ for bug-gnu-emacs@gnu.org; Sun, 02 Aug 2020 12:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2Gcc-0003fA-EG for bug-gnu-emacs@gnu.org; Sun, 02 Aug 2020 12:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k2Gcc-00040k-3b for bug-gnu-emacs@gnu.org; Sun, 02 Aug 2020 12:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Aug 2020 16:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24706 X-GNU-PR-Package: emacs Original-Received: via spool by 24706-submit@debbugs.gnu.org id=B24706.159638482415384 (code B ref 24706); Sun, 02 Aug 2020 16:14:02 +0000 Original-Received: (at 24706) by debbugs.gnu.org; 2 Aug 2020 16:13:44 +0000 Original-Received: from localhost ([127.0.0.1]:43234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k2GcK-000403-0Z for submit@debbugs.gnu.org; Sun, 02 Aug 2020 12:13:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k2GcH-0003zq-1D for 24706@debbugs.gnu.org; Sun, 02 Aug 2020 12:13:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52487) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2GcB-0003e1-8B; Sun, 02 Aug 2020 12:13:35 -0400 Original-Received: from [176.228.60.248] (port=4309 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k2GcA-0006fs-Cn; Sun, 02 Aug 2020 12:13:34 -0400 In-Reply-To: (message from Philipp Stephani on Sat, 1 Aug 2020 22:47:03 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:183861 Archived-At: > From: Philipp Stephani > Date: Sat, 1 Aug 2020 22:47:03 +0200 > Cc: Drew Adams , 24706@debbugs.gnu.org > > Am Mi., 26. Apr. 2017 um 13:27 Uhr schrieb Eli Zaretskii : > > > > > From: Philipp Stephani > > > Date: Sun, 23 Apr 2017 17:51:32 +0000 > > > Cc: drew.adams@oracle.com, 24706@debbugs.gnu.org > > > > > > Eli Zaretskii schrieb am So., 16. Okt. 2016 um 20:51 Uhr: > > > > > > > From: Philipp Stephani > > > > Date: Sun, 16 Oct 2016 18:25:08 +0000 It's hard to have a useful discussion when messages are several months apart. > > > The patch for the ELisp manual simply rearranges the same words, so > > > it's not clear to me why we would prefer it to what's already there. > > > > > > I don't think there's any repetition or rearranging here. > > > > Here's the ELisp manual part of your proposed change: > > > > If the mode command is called from Lisp (i.e., non-interactively), it > > -should enable the mode if the argument is omitted or @code{nil}; it > > -should toggle the mode if the argument is the symbol @code{toggle}; > > -otherwise it should treat the argument in the same way as for an > > -interactive call with a numeric prefix argument, as described above. > > +should toggle the mode if the argument is the symbol @code{toggle}; it > > +should disable the mode if the argument is a non-positive integer; > > +otherwise, e.g., if the argument is omitted or nil or a positive > > +integer, it should enable the mode. > > > > Don't you agree that it does little apart of re-shuffling the same > > words? > > It also describes what happens when the argument is neither nil nor > `toggle' nor an integer. That is currently unspecified, or rather > implicitly specified by the observable (but unspecified) behavior of > `prefix-numeric-value'. I think the "otherwise" part describes that. > > > The key difference is that when called from Lisp with an > > > argument that is neither nil nor an integer, the mode is also enabled. > > > > Why would we want to require that? This subsection describes the > > conventions, it doesn't describe the effect of certain popular > > implementation of those conventions, because we don't really want to > > _require_ modes to behave in any way beyond the described behavior. > > This isn't about the implementation but the interface, i.e. the > observable behavior of minor mode functions. I don't see how making this the matter of interface changes anything. We still don't want to require modes to interpret the interface the way you'd like to see. Bottom line: I think there's nothing important left to discuss here.