[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: single-key-description no good for Japanese and Chinese chars
From: |
Drew Adams |
Subject: |
RE: single-key-description no good for Japanese and Chinese chars |
Date: |
Sat, 23 Sep 2006 12:14:21 -0700 |
From: Miles Bader
> And I would like to be able to pick up a key from
> `map-keymaps' and execute
> its command (binding). I would expect command `self-command-insert' to
> insert the key, and that doesn't work for the "invalid" keys.
So your expectations were wrong. The generic-charater-in-keymap seems
to be a perfectly reasonable feature.
I don't have a problem with having generic characters in keymaps.
Christ, just change your @#$! program to recognize generic characters
and stop this pointless bloated thread... If you think there's a
documentation string that can be changed (e.g. map-keymap), feel free
to suggest it.
Here, I'll help you: (generic-char-p char)
I explained that I already recognize and weed out such invalid keys
(although I don't use `generic-char-p' - I have keys, not chars, to test).
I would like to be able to map over a keymap and use `self-insert-command'
to insert (the character associated with) any key bound to
`self-insert-command', but if that's not possible, as I said, so be it.
I suggested that `self-insert-command' could perhaps be reserved for the
simple keys that represent chars, and a differently named command could be
used for the non-trivial cases (generic chars, indirection such as remap).
That way, the distinction would be apparent from the key's binding alone,
and there would be no need to test the key itself, to see if it could be
trivially converted to a char and thus inserted with `self-insert-command'.
You would always be safe applying `self-insert-command' to any key bound to
it then (that is, to (aref key 0) as last-command-char).
People didn't care for that suggestion, so I will continue to test the key
itself. Perhaps I could test the key somehow with `generic-char-p' (how?),
but, as Stefan pointed out, there are also other keys that cannot be
trivially converted to chars.
I don't know how to test keys for this - suggestions are welcome. For now, I
weed out only the generic-char keys, and only by checking their
`single-key-description's (workaround). That doesn't help with, say, `remap'
bindings. As I say, suggestions welcome.
- Re: single-key-description no good for Japanese and Chinese chars, (continued)
- Re: single-key-description no good for Japanese and Chinese chars, Eli Zaretskii, 2006/09/23
- Re: single-key-description no good for Japanese and Chinese chars, Richard Stallman, 2006/09/22
- Re: single-key-description no good for Japanese and Chinese chars, Kenichi Handa, 2006/09/23
- Re: single-key-description no good for Japanese and Chinese chars, Eli Zaretskii, 2006/09/23
- Re: single-key-description no good for Japanese and Chinese chars, Richard Stallman, 2006/09/23
- RE: single-key-description no good for Japanese and Chinese chars, Drew Adams, 2006/09/23
- Re: single-key-description no good for Japanese and Chinese chars, Kenichi Handa, 2006/09/24
- RE: single-key-description no good for Japanese and Chinese chars, Drew Adams, 2006/09/24
- Re: single-key-description no good for Japanese and Chinese chars, Kenichi Handa, 2006/09/25
- RE: single-key-description no good for Japanese and Chinese chars, Drew Adams, 2006/09/25
RE: single-key-description no good for Japanese and Chinese chars,
Drew Adams <=