* bug#6448: `event-apply-modifier' EVENT arg accepts float then bails
@ 2010-06-17 20:25 MON KEY
2010-06-19 17:38 ` Chong Yidong
0 siblings, 1 reply; 5+ messages in thread
From: MON KEY @ 2010-06-17 20:25 UTC (permalink / raw)
To: 6448
Can `read-event' return a float?
If not, why does `event-apply-modifier' invoke the `numberp' predicate instead
of `integerp'?
e.g. these signals an error:
(event-apply-modifier 32.3 'shift 25 "<S-")
(event-apply-modifier (float (string-to-char "\C-s")) 'shift 25 "<S-")
This is kosher:
(event-apply-modifier 19 'shift 25 "<S-")
--
/s_P\
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6448: `event-apply-modifier' EVENT arg accepts float then bails
2010-06-17 20:25 bug#6448: `event-apply-modifier' EVENT arg accepts float then bails MON KEY
@ 2010-06-19 17:38 ` Chong Yidong
2010-06-20 5:20 ` MON KEY
0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2010-06-19 17:38 UTC (permalink / raw)
To: MON KEY; +Cc: 6448
MON KEY <monkey@sandpframing.com> writes:
> Can `read-event' return a float?
>
> If not, why does `event-apply-modifier' invoke the `numberp' predicate instead
> of `integerp'?
>
> e.g. these signals an error:
>
> (event-apply-modifier 32.3 'shift 25 "<S-")
> (event-apply-modifier (float (string-to-char "\C-s")) 'shift 25 "<S-")
>
> This is kosher:
>
> (event-apply-modifier 19 'shift 25 "<S-")
I don't think this is a problem in real life.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6448: `event-apply-modifier' EVENT arg accepts float then bails
2010-06-19 17:38 ` Chong Yidong
@ 2010-06-20 5:20 ` MON KEY
2010-06-20 8:01 ` Andreas Schwab
0 siblings, 1 reply; 5+ messages in thread
From: MON KEY @ 2010-06-20 5:20 UTC (permalink / raw)
To: 6448
On Sat, Jun 19, 2010 at 1:38 PM, Chong Yidong <cyd@stupidchicken.com> wrote:
>
> I don't think this is a problem in real life.
Indeed, but in fantasy-land it might be slightly more correct :)
Is there any good reason not to change numberp -> integerp?
--
/s_P\
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6448: `event-apply-modifier' EVENT arg accepts float then bails
2010-06-20 5:20 ` MON KEY
@ 2010-06-20 8:01 ` Andreas Schwab
2010-06-20 20:08 ` MON KEY
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2010-06-20 8:01 UTC (permalink / raw)
To: MON KEY; +Cc: 6448
MON KEY <monkey@sandpframing.com> writes:
> Indeed, but in fantasy-land it might be slightly more correct :)
> Is there any good reason not to change numberp -> integerp?
Look at (numberp) as a more efficient alternative to (and (not (lisp))
(not (symbolp))). There is no need to be conclusive.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6448: `event-apply-modifier' EVENT arg accepts float then bails
2010-06-20 8:01 ` Andreas Schwab
@ 2010-06-20 20:08 ` MON KEY
0 siblings, 0 replies; 5+ messages in thread
From: MON KEY @ 2010-06-20 20:08 UTC (permalink / raw)
To: Andreas Schwab; +Cc: 6448
On Sun, Jun 20, 2010 at 4:01 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> Is there any good reason not to change numberp -> integerp?
>
> Look at (numberp) as a more efficient alternative to (and (not (lisp))
> (not (symbolp))).
I assume that in the above for `(not (lisp)' you intend `(not (listp)'?
> There is no need to be conclusive.
Thank you for taking the time to answer my query.
This addresses exactly the concern I had in mind but was afraid to ask :).
So, use of `integerp' is neither no more efficient than `numberp' nor any more
useful for debugging/signaling purposes where there is a known constraint on
the arg type? e.g. for example w/ `event-apply-modifier' where it is known that
EVENT can only be an integer?
> Andreas.
--
/s_P\
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-20 20:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-17 20:25 bug#6448: `event-apply-modifier' EVENT arg accepts float then bails MON KEY
2010-06-19 17:38 ` Chong Yidong
2010-06-20 5:20 ` MON KEY
2010-06-20 8:01 ` Andreas Schwab
2010-06-20 20:08 ` MON KEY
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.