[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

last-input-event and last-input-char




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@cs.vassar.edu" with a
subject of "unsubscribe" or "help"


Emacspeak Files | Subscribe | Unsubscribe | Search