From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#24706: 26.0.50; Minor mode functions should do strict argument type checking Date: Sun, 23 Apr 2017 17:51:32 +0000 Message-ID: References: <83mvi4yvoj.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c1cd99ec308f5054dd92404 X-Trace: blaine.gmane.org 1492969933 15948 195.159.176.226 (23 Apr 2017 17:52:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 23 Apr 2017 17:52:13 +0000 (UTC) Cc: 24706@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 23 19:52:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1d2Lg7-0003zS-1j for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Apr 2017 19:52:07 +0200 Original-Received: from localhost ([::1]:40096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2LgC-0000YQ-Uw for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Apr 2017 13:52:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2Lg7-0000Xt-AQ for bug-gnu-emacs@gnu.org; Sun, 23 Apr 2017 13:52:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2Lg2-0005ao-KJ for bug-gnu-emacs@gnu.org; Sun, 23 Apr 2017 13:52:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38526) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d2Lg2-0005ak-Gq for bug-gnu-emacs@gnu.org; Sun, 23 Apr 2017 13:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d2Lg2-0007kp-8F for bug-gnu-emacs@gnu.org; Sun, 23 Apr 2017 13:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Apr 2017 17:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24706 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24706-submit@debbugs.gnu.org id=B24706.149296991129791 (code B ref 24706); Sun, 23 Apr 2017 17:52:02 +0000 Original-Received: (at 24706) by debbugs.gnu.org; 23 Apr 2017 17:51:51 +0000 Original-Received: from localhost ([127.0.0.1]:36725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2Lfr-0007kQ-9s for submit@debbugs.gnu.org; Sun, 23 Apr 2017 13:51:51 -0400 Original-Received: from mail-wr0-f173.google.com ([209.85.128.173]:33816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2Lfp-0007kD-Ct for 24706@debbugs.gnu.org; Sun, 23 Apr 2017 13:51:49 -0400 Original-Received: by mail-wr0-f173.google.com with SMTP id z109so79572680wrb.1 for <24706@debbugs.gnu.org>; Sun, 23 Apr 2017 10:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1I9f91p+b+uWt8hmT/QwAztSjZkDKEA8SAKUhmauEr8=; b=T371Jdza9UVPhUP3sHM5NyqbJcvwCH1zsjQew4zk1ymBNb1B4h+8FL/+5+m+nWd5FD kUaIzbD/iT6lXTFkqyhES1Aav/45B0EexR4UZBrlSHu92J95/58rGHf7nJ9vzqLPmph7 5r6Cqwu5tEyBN1OJj75VvwcWbWUsHX/pAy4M5/Q80jDXN55OM5Qu9URIe+vABoha5Nsr y6zRK5IUbAB76r3mV2AWgRniGIelTTbt6ZvGlUogbEIiT+NylGea7w78A1OGuACILnP0 IepgbXDXzVus13dkRfSsTAbbsD1XRPD3YTWR+xV0I1kSqS6jqjiplDZancU1J4KaVAnF TLeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1I9f91p+b+uWt8hmT/QwAztSjZkDKEA8SAKUhmauEr8=; b=SPtGZFgomkEbRZ97DSwNPwS03Z4ocFA5Cw8P3+lMo6SmJkY2blA3lvA3FER+Zg3sDP WQMU2N4fjIi7VKg75lZ564Ye3T7AxJf33vDo5nqRsaL98IKNAT6NVCn3NiVZIx7Nybh8 4Ye2cM4mgjzyKXuuTFp+nrVjdmx1AF23H45CeddSy1XpN4AEkqPewce2suiW4tjf41Du yeH0w4Pq4XqNUebGYPITtaqLCmT5/froS9Fu+nsSs2bFXlleuigDRwT/gfahR5JdE5sL YKRIhhuE6c9GSwnA+Autw5VO18ZEvhVg7bhL4CG7EVTT4yLwjvpM2NiydNOwpVxcUm1d 37TQ== X-Gm-Message-State: AN3rC/6DPmSQz2AwRzwuB7EEeZbm5gf4QFX4i18lmuK3WnzNraaIp1sG r62wtVp5B+cxauylvdqYZp/+6Is27g== X-Received: by 10.223.165.138 with SMTP id g10mr3006690wrc.19.1492969903553; Sun, 23 Apr 2017 10:51:43 -0700 (PDT) In-Reply-To: <83mvi4yvoj.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131913 Archived-At: --94eb2c1cd99ec308f5054dd92404 Content-Type: text/plain; charset=UTF-8 Eli Zaretskii schrieb am So., 16. Okt. 2016 um 20:51 Uhr: > > From: Philipp Stephani > > Date: Sun, 16 Oct 2016 18:25:08 +0000 > > > > Attached a patch that uses the wording from `define-minor-mode'. > > 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. > > As for the doc string, please avoid repetition, it's confusing. I > suggested to describe the additional features when the mode is called > from Lisp by using the word "also". > > I don't think there's any repetition or rearranging here. The key difference is that when called from Lisp with an argument that is neither nil nor an integer, the mode is also enabled. That isn't possible for interactive calls because the argument is always a number. Maybe something like "With a prefix argument ARG, enable the mode if ARG is positive, and disable it if ARG is negative or zero. Additionally, when called from Lisp, toggle the mode if ARG is the symbol `toggle' and interpret ARG as defined by `prefix-numeric-value' otherwise." (and then document the behavior of prefix-numeric-value) --94eb2c1cd99ec308f5054dd92404 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= So., 16. Okt. 2016 um 20:51=C2=A0Uhr:
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Sun, 16 Oct 2016 18:25:08 +0000
>
> Attached a patch that uses the wording from `define-minor-mode'.
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= .

As for the doc string, please avoid repetition, it's confusing.=C2=A0 I=
suggested to describe the additional features when the mode is called
from Lisp by using the word "also".


I don't think there's any repe= tition or rearranging here. The key difference is that when called from Lis= p with an argument that is neither nil nor an integer, the mode is also ena= bled. That isn't possible for interactive calls because the argument is= always a number.
Maybe something like

&= quot;With a prefix argument ARG, enable the mode if ARG is positive, and di= sable it if ARG is negative or zero. Additionally, when called from Lisp, t= oggle the mode if ARG is the symbol `toggle' and interpret ARG as defin= ed by `prefix-numeric-value' otherwise."

= (and then document the behavior of prefix-numeric-value)
--94eb2c1cd99ec308f5054dd92404--