diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-08-17 16:38:43 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-08-17 16:38:43 -0700 |
commit | 15dbb4d6ba5dea7d3e0f45ab3fd038c2b305a145 (patch) | |
tree | 2b8f35fcfd05d43551b873d4390264768f099dfb /src/keyboard.h | |
parent | f00af5b1c24515f20f96cfd8d59983ab62fb3f25 (diff) | |
download | emacs-15dbb4d6ba5dea7d3e0f45ab3fd038c2b305a145.tar.gz |
* keyboard.h (KSET): Remove.
Replace all uses with calls to new setter functions.
Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
(KEYBOARD_INLINE): New macro.
(kset_default_minibuffer_frame, kset_defining_kbd_macro)
(kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
(kset_prefix_arg, kset_system_key_alist, kset_window_system):
New setter functions.
* keyboard.c (KEYBOARD_INLINE):
Define to EXTERN_INLINE, so that the corresponding functions
are compiled into code.
(kset_echo_string, kset_kbd_queue)
(kset_keyboard_translate_table, kset_last_prefix_arg)
(kset_last_repeatable_command, kset_local_function_key_map)
(kset_overriding_terminal_local_map, kset_real_last_command)
(kset_system_key_syms): New setter functions.
Fixes: debbugs:12215
Diffstat (limited to 'src/keyboard.h')
-rw-r--r-- | src/keyboard.h | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/src/keyboard.h b/src/keyboard.h index f83643d6f6e..91484b3649b 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -19,10 +19,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "systime.h" /* for EMACS_TIME, Time */ #include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */ +INLINE_HEADER_BEGIN +#ifndef KEYBOARD_INLINE +# define KEYBOARD_INLINE INLINE +#endif + /* Most code should use this macro to access Lisp fields in struct kboard. */ #define KVAR(kboard, field) ((kboard)->INTERNAL_FIELD (field)) -#define KSET(kboard, field, value) ((kboard)->INTERNAL_FIELD (field) = (value)) /* Each KBOARD represents one logical input stream from which Emacs gets input. If we are using ordinary terminals, it has one KBOARD @@ -173,6 +177,47 @@ struct kboard char echo_after_prompt; }; +KEYBOARD_INLINE void +kset_default_minibuffer_frame (struct kboard *kb, Lisp_Object val) +{ + kb->INTERNAL_FIELD (Vdefault_minibuffer_frame) = val; +} +KEYBOARD_INLINE void +kset_defining_kbd_macro (struct kboard *kb, Lisp_Object val) +{ + kb->INTERNAL_FIELD (defining_kbd_macro) = val; +} +KEYBOARD_INLINE void +kset_input_decode_map (struct kboard *kb, Lisp_Object val) +{ + kb->INTERNAL_FIELD (Vinput_decode_map) = val; +} +KEYBOARD_INLINE void +kset_last_command (struct kboard *kb, Lisp_Object val) +{ + kb->INTERNAL_FIELD (Vlast_command) = val; +} +KEYBOARD_INLINE void +kset_last_kbd_macro (struct kboard *kb, Lisp_Object val) +{ + kb->INTERNAL_FIELD (Vlast_kbd_macro) = val; +} +KEYBOARD_INLINE void +kset_prefix_arg (struct kboard *kb, Lisp_Object val) +{ + kb->INTERNAL_FIELD (Vprefix_arg) = val; +} +KEYBOARD_INLINE void +kset_system_key_alist (struct kboard *kb, Lisp_Object val) +{ + kb->INTERNAL_FIELD (Vsystem_key_alist) = val; +} +KEYBOARD_INLINE void +kset_window_system (struct kboard *kb, Lisp_Object val) +{ + kb->INTERNAL_FIELD (Vwindow_system) = val; +} + /* Temporarily used before a frame has been opened. */ extern KBOARD *initial_kboard; @@ -510,3 +555,5 @@ extern void mark_kboards (void); #ifdef WINDOWSNT extern const char *const lispy_function_keys[]; #endif + +INLINE_HEADER_END |