diff options
| author | Richard M. Stallman | 2006-04-30 22:15:21 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-04-30 22:15:21 +0000 |
| commit | 9abc5f4519ebcaf74a937581784fe4e73c2e8a06 (patch) | |
| tree | 576ec35551a17334f3580118ffa49d91ceee6c02 /src/keymap.c | |
| parent | cc1eecfd888839f6d75c0c7aa5d1e8e37f31d1c7 (diff) | |
| download | emacs-9abc5f4519ebcaf74a937581784fe4e73c2e8a06.tar.gz emacs-9abc5f4519ebcaf74a937581784fe4e73c2e8a06.zip | |
(Fdefine_key): Improve error message when KEY begins with a non-prefix key.
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/keymap.c b/src/keymap.c index 66f17178d5b..4f8343bf5cf 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1193,8 +1193,11 @@ binding KEY to DEF is added at the front of KEYMAP. */) | |||
| 1193 | if (!CONSP (keymap)) | 1193 | if (!CONSP (keymap)) |
| 1194 | /* We must use Fkey_description rather than just passing key to | 1194 | /* We must use Fkey_description rather than just passing key to |
| 1195 | error; key might be a vector, not a string. */ | 1195 | error; key might be a vector, not a string. */ |
| 1196 | error ("Key sequence %s uses invalid prefix characters", | 1196 | error ("Key sequence %s starts with non-prefix key %s", |
| 1197 | SDATA (Fkey_description (key, Qnil))); | 1197 | SDATA (Fkey_description (key, Qnil)), |
| 1198 | SDATA (Fkey_description (Fsubstring (key, make_number (0), | ||
| 1199 | make_number (idx)), | ||
| 1200 | Qnil))); | ||
| 1198 | } | 1201 | } |
| 1199 | } | 1202 | } |
| 1200 | 1203 | ||