* Is 't' positive?
@ 2007-04-12 11:28 Leo
0 siblings, 0 replies; 4+ messages in thread
From: Leo @ 2007-04-12 11:28 UTC (permalink / raw)
To: help-gnu-emacs
Quite a few commands require positive arguments such as ido-mode.
,----
| (ido-mode &optional arg)
|
| Toggle ido speed-ups on or off.
| With arg, turn ido speed-up on if arg is positive, off otherwise.
`----
However, it seems legal to use 't' and they will behave like it is
positive. So the question, is 't' positive? Is it safe to use 't' in
this kind of functions?
Thanks,
--
Leo <sdl.web AT gmail.com> (GPG Key: 9283AA3F)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is 't' positive?
[not found] <mailman.1989.1176377828.7795.help-gnu-emacs@gnu.org>
@ 2007-04-12 12:08 ` Johan Bockgård
2007-04-12 12:45 ` Leo
2007-04-12 12:11 ` Pascal Bourguignon
1 sibling, 1 reply; 4+ messages in thread
From: Johan Bockgård @ 2007-04-12 12:08 UTC (permalink / raw)
To: help-gnu-emacs
Leo <sdl.web@gmail.com> writes:
> However, it seems legal to use 't' and they will behave like it is
> positive. So the question, is 't' positive? Is it safe to use 't' in
> this kind of functions?
(info "(elisp)Minor Mode Conventions")
[...]
The command should accept one optional argument. If the argument
is `nil', it should toggle the mode (turn it on if it is off, and
off if it is on). It should turn the mode on if the argument is a
positive integer, the symbol `t', or a list whose CAR is one of
those. It should turn the mode off if the argument is a negative
integer or zero, the symbol `-', or a list whose CAR is a
negative integer or zero. The meaning of other arguments is not
specified.
--
Johan Bockgård
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is 't' positive?
[not found] <mailman.1989.1176377828.7795.help-gnu-emacs@gnu.org>
2007-04-12 12:08 ` Johan Bockgård
@ 2007-04-12 12:11 ` Pascal Bourguignon
1 sibling, 0 replies; 4+ messages in thread
From: Pascal Bourguignon @ 2007-04-12 12:11 UTC (permalink / raw)
To: help-gnu-emacs
Leo <sdl.web@gmail.com> writes:
> Quite a few commands require positive arguments such as ido-mode.
>
> ,----
> | (ido-mode &optional arg)
> |
> | Toggle ido speed-ups on or off.
> | With arg, turn ido speed-up on if arg is positive, off otherwise.
> `----
>
> However, it seems legal to use 't' and they will behave like it is
> positive. So the question, is 't' positive? Is it safe to use 't' in
> this kind of functions?
Depends on the function. t may have a different meaning than 1, and
nil than 0...
--
__Pascal Bourguignon__
http://www.informatimago.com
http://pjb.ogamita.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is 't' positive?
2007-04-12 12:08 ` Johan Bockgård
@ 2007-04-12 12:45 ` Leo
0 siblings, 0 replies; 4+ messages in thread
From: Leo @ 2007-04-12 12:45 UTC (permalink / raw)
To: help-gnu-emacs
----- Johan Bockgård (2007-04-12) wrote:-----
> Leo <sdl.web@gmail.com> writes:
>
>> However, it seems legal to use 't' and they will behave like it is
>> positive. So the question, is 't' positive? Is it safe to use 't' in
>> this kind of functions?
>
> (info "(elisp)Minor Mode Conventions")
>
> [...]
> The command should accept one optional argument. If the argument
> is `nil', it should toggle the mode (turn it on if it is off, and
> off if it is on). It should turn the mode on if the argument is a
> positive integer, the symbol `t', or a list whose CAR is one of
> those. It should turn the mode off if the argument is a negative
> integer or zero, the symbol `-', or a list whose CAR is a
> negative integer or zero. The meaning of other arguments is not
> specified.
Thanks.
--
Leo <sdl.web AT gmail.com> (GPG Key: 9283AA3F)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-12 12:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-12 11:28 Is 't' positive? Leo
[not found] <mailman.1989.1176377828.7795.help-gnu-emacs@gnu.org>
2007-04-12 12:08 ` Johan Bockgård
2007-04-12 12:45 ` Leo
2007-04-12 12:11 ` Pascal Bourguignon
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).