/[emacs]/emacs/src/keymap.c
ViewVC logotype

Diff of /emacs/src/keymap.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.250 by pj, Thu Dec 20 18:26:10 2001 UTC revision 1.251 by rms, Fri Dec 28 18:39:04 2001 UTC
# Line 48  Lisp_Object meta_map;          /* The keymap use Line 48  Lisp_Object meta_map;          /* The keymap use
48  Lisp_Object control_x_map;      /* The keymap used for globally bound  Lisp_Object control_x_map;      /* The keymap used for globally bound
49                                     C-x-prefixed default commands */                                     C-x-prefixed default commands */
50    
51    /* Alist of elements like (DEL . "\d").  */
52    Lisp_Object exclude_keys;
53    
54  /* was MinibufLocalMap */  /* was MinibufLocalMap */
55  Lisp_Object Vminibuffer_local_map;  Lisp_Object Vminibuffer_local_map;
56                                  /* The keymap used by the minibuf for local                                  /* The keymap used by the minibuf for local
# Line 1008  the front of KEYMAP.  */) Line 1011  the front of KEYMAP.  */)
1011        if (CONSP (c) && lucid_event_type_list_p (c))        if (CONSP (c) && lucid_event_type_list_p (c))
1012          c = Fevent_convert_list (c);          c = Fevent_convert_list (c);
1013    
1014          if (SYMBOLP (c) && ! NILP (Fassoc (Fsymbol_name (c), exclude_keys)))
1015            error ("To bind the key %s, use; use \"%s\", not [%s]",
1016                   XSYMBOL (c)->name->data,
1017                   XSTRING (XCDR (Fassoc (Fsymbol_name (c), exclude_keys)))->data,
1018                   XSYMBOL (c)->name->data);
1019    
1020        if (INTEGERP (c)        if (INTEGERP (c)
1021            && (XINT (c) & meta_bit)            && (XINT (c) & meta_bit)
1022            && !metized)            && !metized)
# Line 1025  the front of KEYMAP.  */) Line 1034  the front of KEYMAP.  */)
1034          }          }
1035    
1036        if (!INTEGERP (c) && !SYMBOLP (c) && !CONSP (c))        if (!INTEGERP (c) && !SYMBOLP (c) && !CONSP (c))
1037          error ("Key sequence contains invalid events");          error ("Key sequence contains invalid event");
1038    
1039        if (idx == length)        if (idx == length)
1040          RETURN_UNGCPRO (store_in_keymap (keymap, c, def));          RETURN_UNGCPRO (store_in_keymap (keymap, c, def));
# Line 1098  recognize the default bindings, just as Line 1107  recognize the default bindings, just as
1107        if (XINT (c) & 0x80 && STRINGP (key))        if (XINT (c) & 0x80 && STRINGP (key))
1108          XSETINT (c, (XINT (c) | meta_modifier) & ~0x80);          XSETINT (c, (XINT (c) | meta_modifier) & ~0x80);
1109    
1110          if (!INTEGERP (c) && !SYMBOLP (c) && !CONSP (c))
1111            error ("Key sequence contains invalid event");
1112    
1113        cmd = access_keymap (keymap, c, t_ok, 0, 1);        cmd = access_keymap (keymap, c, t_ok, 0, 1);
1114        if (idx == length)        if (idx == length)
1115          RETURN_UNGCPRO (cmd);          RETURN_UNGCPRO (cmd);
# Line 3370  syms_of_keymap () Line 3382  syms_of_keymap ()
3382    Fset (intern ("ctl-x-map"), control_x_map);    Fset (intern ("ctl-x-map"), control_x_map);
3383    Ffset (intern ("Control-X-prefix"), control_x_map);    Ffset (intern ("Control-X-prefix"), control_x_map);
3384    
3385      exclude_keys
3386        = Fcons (Fcons (build_string ("DEL"), build_string ("\\d")),
3387                 Fcons (Fcons (build_string ("TAB"), build_string ("\\t")),
3388                        Fcons (Fcons (build_string ("RET"), build_string ("\\r")),
3389                               Fcons (Fcons (build_string ("ESC"), build_string ("\\e")),
3390                                      Fcons (Fcons (build_string ("SPC"), build_string (" ")),
3391                                             Qnil)))));
3392      staticpro (&exclude_keys);
3393    
3394    DEFVAR_LISP ("define-key-rebound-commands", &Vdefine_key_rebound_commands,    DEFVAR_LISP ("define-key-rebound-commands", &Vdefine_key_rebound_commands,
3395                 doc: /* List of commands given new key bindings recently.                 doc: /* List of commands given new key bindings recently.
3396  This is used for internal purposes during Emacs startup;  This is used for internal purposes during Emacs startup;

Legend:
Removed from v.1.250  
changed lines
  Added in v.1.251

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26