Subject: bug#51118: 28.0.50; arrow keys break agda-input quail package since bd5c7404

From: Eli Zaretskii <[email-masked]>
Date: Sun, 10 Oct 2021 20:55:26 +0300

> From: Mauricio Collares <[email-masked]>
> Date: Sun, 10 Oct 2021 19:25:48 +0200
> Cc: [email-masked]
> 
> Steps to reproduce:
> 
> 1) Load the agda-input package (available at [1]) and do M-x
> set-input-method Agda. This step is not minimized, sorry about that.
> 
> 2) Type \< (that is, a backslash and a less-than sign) and then press
> the right arrow.
> 
> Instead of just exiting the special "Quail translation state" (I don't
> know the correct term for that; I mean the thing indicated by
> underlining), I get the following error.
> 
> Lisp error: (wrong-type-argument sequencep right)
>   append(right nil)
>   quail-add-unread-command-events(right)
>   quail-next-translation()
>   funcall-interactively(quail-next-translation)
>   call-interactively(quail-next-translation)
>   quail-start-translation(92)
>   quail-input-method(92)
> 
> After that, the backslash no longer does anything special, and several
> emacs interactions fail in strange ways. I've verified that this does
> affect bd5c7404195e45f11946b4e0933a1f8b697d8b87 but not its parent
> commit (7bbd6b720e60cb5e726214268c5b80a3e23f799e).
> 
> Best regards,
> Mauricio
> 
> [1] https://github.com/agda/agda/blob/731f300deac14e10792a0bbf22c86cbe0c9c7e4b/src/data/emacs-mode/agda-input.el

Thanks.

Gregory, could you please look into this?  It needs to be fixed for
Emacs 28.

TIA