Skip to content

fix: Avoid wrong-type-argument error on read-char.#383

Open
BriansEmacs wants to merge 1 commit into
abo-abo:masterfrom
BriansEmacs:master
Open

fix: Avoid wrong-type-argument error on read-char.#383
BriansEmacs wants to merge 1 commit into
abo-abo:masterfrom
BriansEmacs:master

Conversation

@BriansEmacs

Copy link
Copy Markdown

The read-char used by the avy-goto-* commands can return Emacs events which will not pass characterp (i.e. A-v will generate an event 4194422). As the avy-goto-* commands are generally converting the value returned by (let ((char (read-char ...)))) to a string (via (string char)), this causes a wrong-type-argument error to be thrown from these functions. Wrapping the read-char with event-basic-type avoids this error.

The `read-char` used by the `avy-goto-*` commands can return Emacs
events which will not pass `characterp` (i.e. `A-v` will generate an
event `4194422`).  As the `avy-goto-*` commands are generally
converting the value returned by `(let ((char (read-char ...))))` to a
string (via `(string char)`), this causes a `wrong-type-argument`
error to be thrown from these functions.  Wrapping the `read-char`
with `event-basic-type` avoids this error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant