unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 2a4b0da: Make minor mode ARG work as documented
       [not found] ` <20201101140050.9F050209B1@vcs0.savannah.gnu.org>
@ 2020-11-01 15:33   ` Stefan Monnier
  2020-11-02 14:48     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2020-11-01 15:33 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> +If called from Lisp, toggle the mode if if ARG is `toggle'.
> +Enable the mode if ARG is nil, omitted, or is a positive number.
> +All other values will disable the mode.

No: only non-positive numbers should be documented to disable the mode.
Other values should not be kept free for future use.

> +    (test-mode "what")
> +    (should (eq test-mode nil))))

This test is wrong, IMO.


        Stefan




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: master 2a4b0da: Make minor mode ARG work as documented
  2020-11-01 15:33   ` master 2a4b0da: Make minor mode ARG work as documented Stefan Monnier
@ 2020-11-02 14:48     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-02 14:48 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> +If called from Lisp, toggle the mode if if ARG is `toggle'.
>> +Enable the mode if ARG is nil, omitted, or is a positive number.
>> +All other values will disable the mode.
>
> No: only non-positive numbers should be documented to disable the mode.
> Other values should not be kept free for future use.

I altered the code to do what the documentation said it should do, but
that's not really tenable, because people use these other values.  So
I've partially reverted the code changes and adjusted the doc string
instead.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-02 14:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20201101140048.24374.21430@vcs0.savannah.gnu.org>
     [not found] ` <20201101140050.9F050209B1@vcs0.savannah.gnu.org>
2020-11-01 15:33   ` master 2a4b0da: Make minor mode ARG work as documented Stefan Monnier
2020-11-02 14:48     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).