[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105380: Fix non-prefix key error mes
From: |
Lars Magne Ingebrigtsen |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105380: Fix non-prefix key error message when last character M-[char] is translated to ESC [char] |
Date: |
Tue, 02 Aug 2011 17:27:38 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105380
author: Don March <address@hidden>
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Tue 2011-08-02 17:27:38 +0200
message:
Fix non-prefix key error message when last character M-[char] is translated
to ESC [char]
modified:
src/ChangeLog
src/keymap.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-08-02 03:50:38 +0000
+++ b/src/ChangeLog 2011-08-02 15:27:38 +0000
@@ -1,3 +1,8 @@
+2010-12-03 Don March <address@hidden>
+
+ * keymap.c (Fdefine_key): Fix non-prefix key error message when
+ last character M-[char] is translated to ESC [char] (bug#7541).
+
2011-08-02 Kenichi Handa <address@hidden>
* lisp.h (uniprop_table): Extern it.
=== modified file 'src/keymap.c'
--- a/src/keymap.c 2011-07-12 21:12:36 +0000
+++ b/src/keymap.c 2011-08-02 15:27:38 +0000
@@ -1216,13 +1216,27 @@
keymap = get_keymap (cmd, 0, 1);
if (!CONSP (keymap))
- /* We must use Fkey_description rather than just passing key to
- error; key might be a vector, not a string. */
- error ("Key sequence %s starts with non-prefix key %s",
- SDATA (Fkey_description (key, Qnil)),
- SDATA (Fkey_description (Fsubstring (key, make_number (0),
- make_number (idx)),
- Qnil)));
+ {
+ char trailing_esc[5];
+ if (c == meta_prefix_char && metized)
+ {
+ if (idx == 0)
+ strcpy(trailing_esc, "ESC");
+ else
+ strcpy(trailing_esc, " ESC");
+ }
+ else
+ strcpy(trailing_esc, "");
+
+ /* We must use Fkey_description rather than just passing key to
+ error; key might be a vector, not a string. */
+ error ("Key sequence %s starts with non-prefix key %s%s",
+ SDATA (Fkey_description (key, Qnil)),
+ SDATA (Fkey_description (Fsubstring (key, make_number (0),
+ make_number (idx)),
+ Qnil)),
+ trailing_esc);
+ }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105380: Fix non-prefix key error message when last character M-[char] is translated to ESC [char],
Lars Magne Ingebrigtsen <=