;; global-map, esc-map, and ctl-x-map have their values set up in
;; keymap.c; we just give them docstrings here.
-(defvar esc-map nil
+(defvar esc-map
+ (let ((map (make-keymap)))
+ (define-key map "u" #'upcase-word)
+ (define-key map "l" #'downcase-word)
+ (define-key map "c" #'capitalize-word)
+ (define-key map "x" #'execute-extended-command)
+ map)
"Default keymap for ESC (meta) commands.
The normal global definition of the character ESC indirects to this keymap.")
+(fset 'ESC-prefix esc-map)
+(make-obsolete 'ESC-prefix 'esc-map "28.1")
(defvar ctl-x-4-map (make-sparse-keymap)
"Keymap for subcommands of C-x 4.")
"Default keymap for C-x commands.
The normal global definition of the character C-x indirects to this keymap.")
(fset 'Control-X-prefix ctl-x-map)
-(make-obsolete 'Control-X-prefix 'ctl-x-map "28.1")
+(make-obsolete 'Control-X-prefix 'ctl-x-map "28.1")
(defvar global-map
(let ((map (make-keymap)))
(define-key map "\C-b" #'backward-char)
(define-key map "\C-e" #'end-of-line)
(define-key map "\C-f" #'forward-char)
+
(define-key map "\C-z" #'suspend-emacs) ;FIXME: Re-bound later!
(define-key map "\C-x\C-z" #'suspend-emacs) ;FIXME: Re-bound later!
- (define-key map "\C-v" #'scroll-up-command)
- (define-key map "\C-]" #'abort-recursive-edit)
+
+ (define-key map "\C-v" #'scroll-up-command)
+ (define-key map "\M-v" #'scroll-down-command)
+ (define-key map "\M-\C-v" #'scroll-other-window)
+
+ (define-key map "\M-\C-c" #'exit-recursive-edit)
+ (define-key map "\C-]" #'abort-recursive-edit)
map)
"Default global keymap mapping Emacs keyboard input into commands.
The value is a keymap that is usually (but not necessarily) Emacs's
defsubr (&Sdowncase_word);
defsubr (&Scapitalize_word);
}
-
-void
-keys_of_casefiddle (void)
-{
- initial_define_key (meta_map, 'u', "upcase-word");
- initial_define_key (meta_map, 'l', "downcase-word");
- initial_define_key (meta_map, 'c', "capitalize-word");
-}
#define Ctl(c) ((c)&037)
-/* Define the names of keymaps, just so people can refer to them in
- calls to initial_define_key. These should *not* be used after
- initialization; use-global-map doesn't affect these; it sets
- current_global_map instead. */
-extern Lisp_Object meta_map;
-
/* If not Qnil, this is a switch-frame event which we decided to put
off until the end of a key sequence. This should be read as the
next command input, after any Vunread_command_events.
syms_of_json ();
#endif
- keys_of_casefiddle ();
keys_of_keyboard ();
- keys_of_window ();
}
else
{
void
keys_of_keyboard (void)
{
- initial_define_key (meta_map, Ctl ('C'), "exit-recursive-edit");
- initial_define_key (meta_map, 'x', "execute-extended-command");
-
initial_define_lispy_key (Vspecial_event_map, "delete-frame",
"handle-delete-frame");
#ifdef HAVE_NTGUI
Lisp_Object current_global_map; /* Current global keymap. */
-Lisp_Object meta_map; /* The keymap used for globally bound
- ESC-prefixed default commands. */
-
- /* The keymap used by the minibuf for local
- bindings when spaces are allowed in the
- minibuf. */
-
- /* The keymap used by the minibuf for local
- bindings when spaces are not encouraged
- in the minibuf. */
-
/* Alist of elements like (DEL . "\d"). */
static Lisp_Object exclude_keys;
return list1 (Qkeymap);
}
-/* This function is used for installing the standard key bindings
- at initialization time.
-
- For example:
-
- initial_define_key (control_x_map, Ctl('X'), "exchange-point-and-mark"); */
-
-void
-initial_define_key (Lisp_Object keymap, int key, const char *defname)
-{
- store_in_keymap (keymap, make_fixnum (key), intern_c_string (defname));
-}
-
void
initial_define_lispy_key (Lisp_Object keymap, const char *keyname, const char *defname)
{
current_global_map = Qnil;
staticpro (¤t_global_map);
- meta_map = Fmake_keymap (Qnil);
- Fset (intern_c_string ("esc-map"), meta_map);
- Ffset (intern_c_string ("ESC-prefix"), meta_map);
-
exclude_keys = pure_list
(pure_cons (build_pure_c_string ("DEL"), build_pure_c_string ("\\d")),
pure_cons (build_pure_c_string ("TAB"), build_pure_c_string ("\\t")),
extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, bool, bool, bool);
extern Lisp_Object get_keymap (Lisp_Object, bool, bool);
extern ptrdiff_t current_minor_maps (Lisp_Object **, Lisp_Object **);
-extern void initial_define_key (Lisp_Object, int, const char *);
extern void initial_define_lispy_key (Lisp_Object, const char *, const char *);
extern void syms_of_keymap (void);
/* Defined in casefiddle.c. */
extern void syms_of_casefiddle (void);
-extern void keys_of_casefiddle (void);
/* Defined in casetab.c. */
defsubr (&Swindow_parameter);
defsubr (&Sset_window_parameter);
}
-
-void
-keys_of_window (void)
-{
- initial_define_key (meta_map, Ctl ('V'), "scroll-other-window");
- initial_define_key (meta_map, 'v', "scroll-down-command");
-}
extern void init_window_once (void);
extern void init_window (void);
extern void syms_of_window (void);
-extern void keys_of_window (void);
/* Move cursor to row/column position VPOS/HPOS, pixel coordinates
Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y
are window-relative pixel positions. This is always done during