diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-08-04 19:19:34 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-08-04 19:19:34 -0700 |
commit | 0e51f7172bd1ab8b9c1bb52598afb5017e19b9c3 (patch) | |
tree | 5f09676e1b87f3f274a60fe79728f84a3d0c9a9b /src/keymap.c | |
parent | 0065d05491ce5981ea20896bb26d21dcd31e6769 (diff) | |
parent | e504613cc63d2a3925c546177a04637e25a1a4ae (diff) | |
download | emacs-0e51f7172bd1ab8b9c1bb52598afb5017e19b9c3.tar.gz emacs-0e51f7172bd1ab8b9c1bb52598afb5017e19b9c3.tar.bz2 emacs-0e51f7172bd1ab8b9c1bb52598afb5017e19b9c3.zip |
Merge from trunk.
Diffstat (limited to 'src/keymap.c')
-rw-r--r-- | src/keymap.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/src/keymap.c b/src/keymap.c index c968b14d903..32b531daac4 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -150,17 +150,6 @@ in case you use it as a menu with `x-popup-menu'. */) return Fcons (Qkeymap, Qnil); } -DEFUN ("make-composed-keymap", Fmake_composed_keymap, Smake_composed_keymap, - 0, MANY, 0, - doc: /* Construct and return a new keymap composed of KEYMAPS. -When looking up a key in the returned map, the key is looked in each -keymap in turn until a binding is found. -usage: (make-composed-keymap &rest KEYMAPS) */) - (ptrdiff_t nargs, Lisp_Object *args) -{ - return Fcons (Qkeymap, Flist (nargs, args)); -} - /* This function is used for installing the standard key bindings at initialization time. @@ -1216,13 +1205,20 @@ binding KEY to DEF is added at the front of KEYMAP. */) 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))); + { + const char *trailing_esc = ((EQ (c, meta_prefix_char) && metized) + ? (idx == 0 ? "ESC" : " 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); + } } } @@ -3761,7 +3757,6 @@ be preferred. */); defsubr (&Sset_keymap_parent); defsubr (&Smake_keymap); defsubr (&Smake_sparse_keymap); - defsubr (&Smake_composed_keymap); defsubr (&Smap_keymap_internal); defsubr (&Smap_keymap); defsubr (&Scopy_keymap); |