aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorGerd Moellmann1999-09-20 00:34:37 +0000
committerGerd Moellmann1999-09-20 00:34:37 +0000
commit03cee6ae654cbf2cb588b07e1a7e5d4d501e602f (patch)
tree01c7a43b22a53ce2d8995278098c6f478a651518 /src/keyboard.c
parent3cbd6585e0bf96dffdeb220e3f855076df5312ac (diff)
downloademacs-03cee6ae654cbf2cb588b07e1a7e5d4d501e602f.tar.gz
emacs-03cee6ae654cbf2cb588b07e1a7e5d4d501e602f.zip
(Frecursive_edit): Remove unused variable.
(command_loop_1, safe_run_hooks, kbd_buffer_get_event, timer_check, make_lispy_event, menu_bar_items, menu_bar_one_keymap, menu_bar_item, parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt, read_key_sequence, kbd_buffer_get_event, make_lispy_event, read_char_x_menu_prompt, read_key_sequence): Ditto. Fread_key_sequence, Fread_key_sequence_vector, Fsuspend_emacs): Ditto. (read_key_sequence) [GOBBLE_FIRST_EVENT]: Put local variables only used when GOBBLE_FIRST_EVENT is defined in #ifdef (Fexecute_extended_command): Cast XINT to long for %ld. (toplevel) [HAVE_UNISTD_H]: Include unistd.h. (toplevel): Include sys/types.h.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c50
1 files changed, 21 insertions, 29 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index cadf03ff070..baddff3414a 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -55,6 +55,11 @@ Boston, MA 02111-1307, USA. */
55#include "syssignal.h" 55#include "syssignal.h"
56#include "systty.h" 56#include "systty.h"
57 57
58#include <sys/types.h>
59#ifdef HAVE_UNISTD_H
60#include <unistd.h>
61#endif
62
58/* This is to get the definitions of the XK_ symbols. */ 63/* This is to get the definitions of the XK_ symbols. */
59#ifdef HAVE_X_WINDOWS 64#ifdef HAVE_X_WINDOWS
60#include "xterm.h" 65#include "xterm.h"
@@ -878,7 +883,6 @@ This function is called by the editor initialization to begin editing.")
878 () 883 ()
879{ 884{
880 int count = specpdl_ptr - specpdl; 885 int count = specpdl_ptr - specpdl;
881 Lisp_Object val;
882 886
883 command_loop_level++; 887 command_loop_level++;
884 update_mode_lines = 1; 888 update_mode_lines = 1;
@@ -1183,8 +1187,8 @@ void safe_run_hooks ();
1183Lisp_Object 1187Lisp_Object
1184command_loop_1 () 1188command_loop_1 ()
1185{ 1189{
1186 Lisp_Object cmd, tem; 1190 Lisp_Object cmd;
1187 int lose, lose2; 1191 int lose;
1188 int nonundocount; 1192 int nonundocount;
1189 Lisp_Object keybuf[30]; 1193 Lisp_Object keybuf[30];
1190 int i; 1194 int i;
@@ -1614,7 +1618,6 @@ void
1614safe_run_hooks (hook) 1618safe_run_hooks (hook)
1615 Lisp_Object hook; 1619 Lisp_Object hook;
1616{ 1620{
1617 Lisp_Object value;
1618 int count = specpdl_ptr - specpdl; 1621 int count = specpdl_ptr - specpdl;
1619 specbind (Qinhibit_quit, hook); 1622 specbind (Qinhibit_quit, hook);
1620 1623
@@ -2971,7 +2974,6 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
2971{ 2974{
2972 register int c; 2975 register int c;
2973 Lisp_Object obj; 2976 Lisp_Object obj;
2974 EMACS_TIME next_timer_delay;
2975 2977
2976 if (noninteractive) 2978 if (noninteractive)
2977 { 2979 {
@@ -3418,7 +3420,6 @@ timer_check (do_it_now)
3418 3420
3419 while (CONSP (timers) || CONSP (idle_timers)) 3421 while (CONSP (timers) || CONSP (idle_timers))
3420 { 3422 {
3421 int triggertime = EMACS_SECS (now);
3422 Lisp_Object *vector; 3423 Lisp_Object *vector;
3423 Lisp_Object timer, idle_timer; 3424 Lisp_Object timer, idle_timer;
3424 EMACS_TIME timer_time, idle_timer_time; 3425 EMACS_TIME timer_time, idle_timer_time;
@@ -3530,7 +3531,6 @@ timer_check (do_it_now)
3530 { 3531 {
3531 if (NILP (vector[0])) 3532 if (NILP (vector[0]))
3532 { 3533 {
3533 Lisp_Object tem;
3534 int was_locked = single_kboard; 3534 int was_locked = single_kboard;
3535 int count = specpdl_ptr - specpdl; 3535 int count = specpdl_ptr - specpdl;
3536#ifdef HAVE_WINDOW_SYSTEM 3536#ifdef HAVE_WINDOW_SYSTEM
@@ -4610,7 +4610,6 @@ make_lispy_event (event)
4610 FRAME_PTR f; 4610 FRAME_PTR f;
4611 Lisp_Object window; 4611 Lisp_Object window;
4612 Lisp_Object posn; 4612 Lisp_Object posn;
4613 Lisp_Object head, position;
4614 Lisp_Object files; 4613 Lisp_Object files;
4615 int row, column; 4614 int row, column;
4616 4615
@@ -4754,9 +4753,7 @@ make_lispy_movement (frame, bar_window, part, x, y, time)
4754 if (WINDOWP (window)) 4753 if (WINDOWP (window))
4755 { 4754 {
4756 struct window *w = XWINDOW (window); 4755 struct window *w = XWINDOW (window);
4757 int hpos, vpos;
4758 int wx, wy; 4756 int wx, wy;
4759 int pos;
4760 4757
4761 /* Get window relative coordinates. */ 4758 /* Get window relative coordinates. */
4762 wx = FRAME_TO_WINDOW_PIXEL_X (w, XINT (x)); 4759 wx = FRAME_TO_WINDOW_PIXEL_X (w, XINT (x));
@@ -5868,7 +5865,6 @@ menu_bar_items (old)
5868 if (i + 4 > XVECTOR (menu_bar_items_vector)->size) 5865 if (i + 4 > XVECTOR (menu_bar_items_vector)->size)
5869 { 5866 {
5870 Lisp_Object tem; 5867 Lisp_Object tem;
5871 int newsize = 2 * i;
5872 tem = Fmake_vector (make_number (2 * i), Qnil); 5868 tem = Fmake_vector (make_number (2 * i), Qnil);
5873 bcopy (XVECTOR (menu_bar_items_vector)->contents, 5869 bcopy (XVECTOR (menu_bar_items_vector)->contents,
5874 XVECTOR (tem)->contents, i * sizeof (Lisp_Object)); 5870 XVECTOR (tem)->contents, i * sizeof (Lisp_Object));
@@ -5895,7 +5891,7 @@ static void
5895menu_bar_one_keymap (keymap) 5891menu_bar_one_keymap (keymap)
5896 Lisp_Object keymap; 5892 Lisp_Object keymap;
5897{ 5893{
5898 Lisp_Object tail, item, table; 5894 Lisp_Object tail, item;
5899 5895
5900 menu_bar_one_keymap_changed_items = Qnil; 5896 menu_bar_one_keymap_changed_items = Qnil;
5901 5897
@@ -5983,7 +5979,6 @@ menu_bar_item (key, item)
5983 if (i + 4 > XVECTOR (menu_bar_items_vector)->size) 5979 if (i + 4 > XVECTOR (menu_bar_items_vector)->size)
5984 { 5980 {
5985 Lisp_Object tem; 5981 Lisp_Object tem;
5986 int newsize = 2 * i;
5987 tem = Fmake_vector (make_number (2 * i), Qnil); 5982 tem = Fmake_vector (make_number (2 * i), Qnil);
5988 bcopy (XVECTOR (menu_bar_items_vector)->contents, 5983 bcopy (XVECTOR (menu_bar_items_vector)->contents,
5989 XVECTOR (tem)->contents, i * sizeof (Lisp_Object)); 5984 XVECTOR (tem)->contents, i * sizeof (Lisp_Object));
@@ -6168,7 +6163,7 @@ parse_menu_item (item, notreal, inmenubar)
6168 else if (EQ (tem, QCkeys)) 6163 else if (EQ (tem, QCkeys))
6169 { 6164 {
6170 tem = XCONS (item)->car; 6165 tem = XCONS (item)->car;
6171 if (CONSP (tem) || STRINGP (tem) && NILP (cachelist)) 6166 if (CONSP (tem) || (STRINGP (tem) && NILP (cachelist)))
6172 XVECTOR (item_properties)->contents[ITEM_PROPERTY_KEYEQ] 6167 XVECTOR (item_properties)->contents[ITEM_PROPERTY_KEYEQ]
6173 = tem; 6168 = tem;
6174 } 6169 }
@@ -6303,11 +6298,11 @@ parse_menu_item (item, notreal, inmenubar)
6303 } 6298 }
6304 /* We had a saved key. Is it still bound to the command? */ 6299 /* We had a saved key. Is it still bound to the command? */
6305 else if (NILP (tem) 6300 else if (NILP (tem)
6306 || !EQ (tem, def) 6301 || (!EQ (tem, def)
6307 /* If the command is an alias for another 6302 /* If the command is an alias for another
6308 (such as lmenu.el set it up), check if the 6303 (such as lmenu.el set it up), check if the
6309 original command matches the cached command. */ 6304 original command matches the cached command. */
6310 && !(SYMBOLP (def) && EQ (tem, XSYMBOL (def)->function))) 6305 && !(SYMBOLP (def) && EQ (tem, XSYMBOL (def)->function))))
6311 chkcache = 1; /* Need to recompute key binding. */ 6306 chkcache = 1; /* Need to recompute key binding. */
6312 6307
6313 if (chkcache) 6308 if (chkcache)
@@ -6601,7 +6596,6 @@ parse_tool_bar_item (key, item)
6601 extern Lisp_Object QCenable, QCvisible, QChelp, QCfilter; 6596 extern Lisp_Object QCenable, QCvisible, QChelp, QCfilter;
6602 extern Lisp_Object QCbutton, QCtoggle, QCradio; 6597 extern Lisp_Object QCbutton, QCtoggle, QCradio;
6603 int i; 6598 int i;
6604 struct gcpro gcpro1;
6605 6599
6606 /* Defininition looks like `(tool-bar-item CAPTION BINDING 6600 /* Defininition looks like `(tool-bar-item CAPTION BINDING
6607 PROPS...)'. Rule out items that aren't lists, don't start with 6601 PROPS...)'. Rule out items that aren't lists, don't start with
@@ -6799,7 +6793,6 @@ read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu)
6799{ 6793{
6800 int mapno; 6794 int mapno;
6801 register Lisp_Object name; 6795 register Lisp_Object name;
6802 Lisp_Object rest, vector;
6803 6796
6804 if (used_mouse_menu) 6797 if (used_mouse_menu)
6805 *used_mouse_menu = 0; 6798 *used_mouse_menu = 0;
@@ -7358,7 +7351,9 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
7358 int prev_keytran_start; 7351 int prev_keytran_start;
7359 int prev_keytran_end; 7352 int prev_keytran_end;
7360 7353
7354#if defined (GOBBLE_FIRST_EVENT)
7361 int junk; 7355 int junk;
7356#endif
7362 7357
7363 raw_keybuf_count = 0; 7358 raw_keybuf_count = 0;
7364 7359
@@ -7537,8 +7532,6 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
7537 /* If not, we should actually read a character. */ 7532 /* If not, we should actually read a character. */
7538 else 7533 else
7539 { 7534 {
7540 struct buffer *buf = current_buffer;
7541
7542 { 7535 {
7543#ifdef MULTI_KBOARD 7536#ifdef MULTI_KBOARD
7544 KBOARD *interrupted_kboard = current_kboard; 7537 KBOARD *interrupted_kboard = current_kboard;
@@ -8392,7 +8385,7 @@ DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0,
8392{ 8385{
8393 Lisp_Object keybuf[30]; 8386 Lisp_Object keybuf[30];
8394 register int i; 8387 register int i;
8395 struct gcpro gcpro1, gcpro2; 8388 struct gcpro gcpro1;
8396 int count = specpdl_ptr - specpdl; 8389 int count = specpdl_ptr - specpdl;
8397 8390
8398 if (!NILP (prompt)) 8391 if (!NILP (prompt))
@@ -8437,7 +8430,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
8437{ 8430{
8438 Lisp_Object keybuf[30]; 8431 Lisp_Object keybuf[30];
8439 register int i; 8432 register int i;
8440 struct gcpro gcpro1, gcpro2; 8433 struct gcpro gcpro1;
8441 int count = specpdl_ptr - specpdl; 8434 int count = specpdl_ptr - specpdl;
8442 8435
8443 if (!NILP (prompt)) 8436 if (!NILP (prompt))
@@ -8596,7 +8589,7 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_
8596 if (sizeof (int) == sizeof (EMACS_INT)) 8589 if (sizeof (int) == sizeof (EMACS_INT))
8597 sprintf (buf, "%d ", XINT (XCONS (prefixarg)->car)); 8590 sprintf (buf, "%d ", XINT (XCONS (prefixarg)->car));
8598 else if (sizeof (long) == sizeof (EMACS_INT)) 8591 else if (sizeof (long) == sizeof (EMACS_INT))
8599 sprintf (buf, "%ld ", XINT (XCONS (prefixarg)->car)); 8592 sprintf (buf, "%ld ", (long) XINT (XCONS (prefixarg)->car));
8600 else 8593 else
8601 abort (); 8594 abort ();
8602 } 8595 }
@@ -8605,7 +8598,7 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_
8605 if (sizeof (int) == sizeof (EMACS_INT)) 8598 if (sizeof (int) == sizeof (EMACS_INT))
8606 sprintf (buf, "%d ", XINT (prefixarg)); 8599 sprintf (buf, "%d ", XINT (prefixarg));
8607 else if (sizeof (long) == sizeof (EMACS_INT)) 8600 else if (sizeof (long) == sizeof (EMACS_INT))
8608 sprintf (buf, "%ld ", XINT (prefixarg)); 8601 sprintf (buf, "%ld ", (long) XINT (prefixarg));
8609 else 8602 else
8610 abort (); 8603 abort ();
8611 } 8604 }
@@ -8991,11 +8984,10 @@ On such systems, Emacs starts a subshell instead of suspending.")
8991 (stuffstring) 8984 (stuffstring)
8992 Lisp_Object stuffstring; 8985 Lisp_Object stuffstring;
8993{ 8986{
8994 Lisp_Object tem;
8995 int count = specpdl_ptr - specpdl; 8987 int count = specpdl_ptr - specpdl;
8996 int old_height, old_width; 8988 int old_height, old_width;
8997 int width, height; 8989 int width, height;
8998 struct gcpro gcpro1, gcpro2; 8990 struct gcpro gcpro1;
8999 8991
9000 if (!NILP (stuffstring)) 8992 if (!NILP (stuffstring))
9001 CHECK_STRING (stuffstring, 0); 8993 CHECK_STRING (stuffstring, 0);