* linum-mode docstring is unclear
@ 2018-02-24 22:31 John Shahid
0 siblings, 0 replies; 4+ messages in thread
From: John Shahid @ 2018-02-24 22:31 UTC (permalink / raw)
To: help-gnu-emacs
Hey all,
I think the linum-mode docstring is unclear about when the mode is
turned on when called from Lisp. According to the docstring:
".... If called from Lisp, enable the mode if ARG is omitted or nil."
This isn't true. In fact, passing any value other than 0 will turn on
the mode. Furthermore, the docstring doesn't mention that passing
'toggle will toggle the state of the mode. WDYT, is that something that
can be/need clarification ?
I was thinking about borrowing the following from define-minor-mode:
"When called from Lisp, the mode command toggles the mode if the
argument is ‘toggle’, disables the mode if the argument is a
non-positive integer, and enables the mode otherwise (including
if the argument is omitted or nil or a positive integer)."
- js
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linum-mode docstring is unclear
[not found] <mailman.9701.1519511942.27995.help-gnu-emacs@gnu.org>
@ 2018-02-24 22:50 ` Emanuel Berg
2018-02-25 20:29 ` John Shahid
[not found] ` <mailman.9721.1519590553.27995.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 4+ messages in thread
From: Emanuel Berg @ 2018-02-24 22:50 UTC (permalink / raw)
To: help-gnu-emacs
John Shahid wrote:
> I think the linum-mode docstring is unclear
> about when the mode is turned on when called
> from Lisp. According to the docstring:
>
> ".... If called from Lisp, enable the mode
> if ARG is omitted or nil."
>
> This isn't true. In fact, passing any value
> other than 0 will turn on the mode.
> Furthermore, the docstring doesn't mention
> that passing 'toggle will toggle the state of
> the mode. WDYT, is that something that can
> be/need clarification ?
Well, obviously :)
I wonder if this is a general problem/phrasing
that appears more than once?
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linum-mode docstring is unclear
2018-02-24 22:50 ` Emanuel Berg
@ 2018-02-25 20:29 ` John Shahid
[not found] ` <mailman.9721.1519590553.27995.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 4+ messages in thread
From: John Shahid @ 2018-02-25 20:29 UTC (permalink / raw)
To: Emanuel Berg; +Cc: help-gnu-emacs
I guess any mode that uses define-minor-mode is susceptible to this kind
of problem. That said, I'm not aware about other modes with similar
phrasing issues. I also sent a patch to fix linum-mode docstring to
bug-gnu-emacs@gnu.org.
cheers,
-js
Emanuel Berg <moasen@zoho.com> writes:
> John Shahid wrote:
>
>> I think the linum-mode docstring is unclear
>> about when the mode is turned on when called
>> from Lisp. According to the docstring:
>>
>> ".... If called from Lisp, enable the mode
>> if ARG is omitted or nil."
>>
>> This isn't true. In fact, passing any value
>> other than 0 will turn on the mode.
>> Furthermore, the docstring doesn't mention
>> that passing 'toggle will toggle the state of
>> the mode. WDYT, is that something that can
>> be/need clarification ?
>
> Well, obviously :)
>
> I wonder if this is a general problem/phrasing
> that appears more than once?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linum-mode docstring is unclear
[not found] ` <mailman.9721.1519590553.27995.help-gnu-emacs@gnu.org>
@ 2018-02-25 20:41 ` Emanuel Berg
0 siblings, 0 replies; 4+ messages in thread
From: Emanuel Berg @ 2018-02-25 20:41 UTC (permalink / raw)
To: help-gnu-emacs
John Shahid wrote:
> I guess any mode that uses define-minor-mode
> is susceptible to this kind of problem.
> That said, I'm not aware about other modes
> with similar phrasing issues. I also sent
> a patch to fix linum-mode docstring to
> bug-gnu-emacs@gnu.org
Good work!
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-02-25 20:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-24 22:31 linum-mode docstring is unclear John Shahid
[not found] <mailman.9701.1519511942.27995.help-gnu-emacs@gnu.org>
2018-02-24 22:50 ` Emanuel Berg
2018-02-25 20:29 ` John Shahid
[not found] ` <mailman.9721.1519590553.27995.help-gnu-emacs@gnu.org>
2018-02-25 20:41 ` Emanuel Berg
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).