[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]
last-input-event and last-input-char
- To: emacspeak@xxxxxxxxxxx
- Subject: last-input-event and last-input-char
- From: Tim Cross <tcross@xxxxxxxxxxx>
- Date: Sat, 26 Aug 2006 18:14:17 +1000
- Delivered-To: priestdo@xxxxxxxxxxx
- Delivered-To: emacspeak@xxxxxxxxxxx
- List-Help: <mailto:emacspeak-request@xxxxxxxxxxx?subject=help>
- List-Post: <mailto:emacspeak@xxxxxxxxxxx>
- List-Subscribe: <mailto:emacspeak-request@xxxxxxxxxxx?subject=subscribe>
- List-Unsubscribe: <mailto:emacspeak-request@xxxxxxxxxxx?subject=unsubscribe>
- Old-Return-Path: <tcross@xxxxxxxxxxx>
- Resent-Date: Sat, 26 Aug 2006 04:14:25 -0400 (EDT)
- Resent-From: emacspeak@xxxxxxxxxxx
- Resent-Message-ID: <casSOB.A.p3D.hLA8EB@xxxxxxxxxxx>
- Resent-Sender: emacspeak-request@xxxxxxxxxxx
It looks like the errors in emacspeak-self-insert-command are the same
problem as those in the defadvice for term-emulate-terminal i.e.
applying = when last-input-event is a symbol, such as 'return, rather
than a number, such as 13.
Also note that last-input-char is an alias for last-input-event, which
has been included for backwards compatibility with emacs 18.
Therefore, we are likely to get issues where this variable is used as
well. I guess this should probably be added to the list of cleanup
work needing to be done at some point?
One very simple solution would be to use eq rather than = when making
a comparison in situations where we only care if it is a printing
character and using an "or" clause when we need to check if the value
is the symbol or integer, such as
(or (eq last-input-event 'backspace)
(eq last-input-event 127))
however, I personally find this a bit ugly. Maybe abstract it in a
function that will map symbolic names for 'return, 'backspace, 'up,
'down, 'tab etc to corresponding integer values (or go the other way)
and use this function instead of last-input-event and last-input-char?
Tim
-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help"
Emacspeak Files |
Subscribe |
Unsubscribe | Search