aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2013-02-11 11:42:04 -0800
committerPaul Eggert2013-02-11 11:42:04 -0800
commitb09a48104f3459c0a849cf29716fce3493b26462 (patch)
treefb601b770c623747638d62c6b972c3629052c7a0 /src
parent4fa60c545d251de8a3ad73afbed78ffc7a2f3489 (diff)
downloademacs-b09a48104f3459c0a849cf29716fce3493b26462.tar.gz
emacs-b09a48104f3459c0a849cf29716fce3493b26462.zip
Clean up read_key_sequence a tiny bit more.
* keyboard.c (read_char_x_menu_prompt) [HAVE_MENUS]: (read_key_sequence): Remove unused locals.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/keyboard.c22
2 files changed, 11 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3e8f30049b0..b3d3958853b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12013-02-11 Paul Eggert <eggert@cs.ucla.edu>
2
3 Clean up read_key_sequence a tiny bit more.
4 * keyboard.c (read_char_x_menu_prompt) [HAVE_MENUS]:
5 (read_key_sequence): Remove unused locals.
6
12013-02-11 Stefan Monnier <monnier@iro.umontreal.ca> 72013-02-11 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 Clean up read_key_sequence a bit; reread active keymaps after first event. 9 Clean up read_key_sequence a bit; reread active keymaps after first event.
diff --git a/src/keyboard.c b/src/keyboard.c
index 29f90b2ebbb..94432cb7bf6 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -8355,10 +8355,6 @@ static Lisp_Object
8355read_char_x_menu_prompt (Lisp_Object map, 8355read_char_x_menu_prompt (Lisp_Object map,
8356 Lisp_Object prev_event, bool *used_mouse_menu) 8356 Lisp_Object prev_event, bool *used_mouse_menu)
8357{ 8357{
8358#ifdef HAVE_MENUS
8359 ptrdiff_t mapno;
8360#endif
8361
8362 if (used_mouse_menu) 8358 if (used_mouse_menu)
8363 *used_mouse_menu = 0; 8359 *used_mouse_menu = 0;
8364 8360
@@ -8444,7 +8440,7 @@ read_char_minibuf_menu_prompt (int commandflag,
8444 8440
8445#define PUSH_C_STR(str, listvar) \ 8441#define PUSH_C_STR(str, listvar) \
8446 listvar = Fcons (make_unibyte_string (str, strlen (str)), listvar) 8442 listvar = Fcons (make_unibyte_string (str, strlen (str)), listvar)
8447 8443
8448 /* Prompt string always starts with map's prompt, and a space. */ 8444 /* Prompt string always starts with map's prompt, and a space. */
8449 prompt_strings = Fcons (name, prompt_strings); 8445 prompt_strings = Fcons (name, prompt_strings);
8450 PUSH_C_STR (": ", prompt_strings); 8446 PUSH_C_STR (": ", prompt_strings);
@@ -8829,7 +8825,6 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
8829 bool dont_downcase_last, bool can_return_switch_frame, 8825 bool dont_downcase_last, bool can_return_switch_frame,
8830 bool fix_current_buffer) 8826 bool fix_current_buffer)
8831{ 8827{
8832 Lisp_Object from_string;
8833 ptrdiff_t count = SPECPDL_INDEX (); 8828 ptrdiff_t count = SPECPDL_INDEX ();
8834 8829
8835 /* How many keys there are in the current key sequence. */ 8830 /* How many keys there are in the current key sequence. */
@@ -8931,8 +8926,6 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
8931 keys_start = this_command_key_count; 8926 keys_start = this_command_key_count;
8932 this_single_command_key_start = keys_start; 8927 this_single_command_key_start = keys_start;
8933 8928
8934 from_string = Qnil;
8935
8936 /* We jump here when we need to reinitialize fkey and keytran; this 8929 /* We jump here when we need to reinitialize fkey and keytran; this
8937 happens if we switch keyboards between rescans. */ 8930 happens if we switch keyboards between rescans. */
8938 replay_entire_sequence: 8931 replay_entire_sequence:
@@ -8958,7 +8951,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
8958 click and we need to switch buffers, we jump back here to rebuild 8951 click and we need to switch buffers, we jump back here to rebuild
8959 the initial keymaps from the current buffer. */ 8952 the initial keymaps from the current buffer. */
8960 current_binding = active_maps (first_event); 8953 current_binding = active_maps (first_event);
8961 8954
8962 /* Start from the beginning in keybuf. */ 8955 /* Start from the beginning in keybuf. */
8963 t = 0; 8956 t = 0;
8964 8957
@@ -9240,16 +9233,11 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9240 or when user programs play with this-command-keys. */ 9233 or when user programs play with this-command-keys. */
9241 if (EVENT_HAS_PARAMETERS (key)) 9234 if (EVENT_HAS_PARAMETERS (key))
9242 { 9235 {
9243 Lisp_Object kind; 9236 Lisp_Object kind = EVENT_HEAD_KIND (EVENT_HEAD (key));
9244 Lisp_Object string;
9245
9246 kind = EVENT_HEAD_KIND (EVENT_HEAD (key));
9247 if (EQ (kind, Qmouse_click)) 9237 if (EQ (kind, Qmouse_click))
9248 { 9238 {
9249 Lisp_Object window, posn; 9239 Lisp_Object window = POSN_WINDOW (EVENT_START (key));
9250 9240 Lisp_Object posn = POSN_POSN (EVENT_START (key));
9251 window = POSN_WINDOW (EVENT_START (key));
9252 posn = POSN_POSN (EVENT_START (key));
9253 9241
9254 if (CONSP (posn) 9242 if (CONSP (posn)
9255 || (!NILP (fake_prefixed_keys) 9243 || (!NILP (fake_prefixed_keys)