Glynn Clements <glynn(a)sensei.co.uk> writes in xemacs-beta(a)xemacs.org:
SL Baur wrote:
> What is (event-to-character event) supposed to return when `event' is
> #<keypress-event backspace> or #<keypress-event delete>?
I don't know what it's supposed to return, but
event-to-character
appears to return the symbol's 'ascii-character property. These used
to be set to ?\010 and ?\177 respectively.
O.K. The broken code in question looks like:
(defun canna-functional-insert-command (arg)
"Use input character as a key of complex translation input such as\n\
kana-to-kanji translation."
(interactive "*p")
(let ((ch))
(if (char-or-char-int-p arg)
(setq ch last-command-char)
(setq ch (event-to-character last-command-event)))
(canna:functional-insert-command2 ch arg) ))
The problem appears to be with `last-command-char' being nil.
If at all practical, I would suggest that the code should be using
(event-key event) rather than (event-to-character event).
O.K. but I have no idea where the second code path is being taken.
The way canna.el does input is broken, but it _used_ to work. Sigh.