]> code.delx.au - gnu-emacs/commitdiff
fix up more Lisp_Object/int conversion issues
authorKen Raeburn <raeburn@raeburn.org>
Sun, 18 Jun 2000 20:14:37 +0000 (20:14 +0000)
committerKen Raeburn <raeburn@raeburn.org>
Sun, 18 Jun 2000 20:14:37 +0000 (20:14 +0000)
src/ChangeLog
src/charset.c
src/coding.h
src/keyboard.c
src/sound.c
src/xterm.c

index 292eefd05ce06c6fa176aabe2157bb6634e21094..e5a1569f30b9a5c2b671aef50158288a4ae8bd9a 100644 (file)
@@ -1,3 +1,25 @@
+2000-06-18  Ken Raeburn  <raeburn@gnu.org>
+
+       * charset.c (update_charset_table): Use XINT on "iso_final_char"
+       when treating it as an integer.
+
+       * coding.h (encode_coding_string): Declare.
+
+       * keyboard.c (read_key_sequence): Use XINT on "pos" when treating
+       it as an integer.
+
+       * keymap.c (Fwhere_is_internal): Rename argument "keymap" to
+       "xkeymap" to avoid shadowing the "enum map_type" value that needs
+       to be passed to get_local_map.
+
+       * sound.c (Fplay_sound): Don't call make_number on
+       Frun_hook_with_args count argument.
+
+       * xterm.c (x_send_scroll_bar_event): Fudge lisp object/integer
+       for lisp objects in X event structure data field, when lisp
+       objects are represented with unions.
+       (x_scroll_bar_to_input_event): Ditto.
+
 2000-06-16  Ken Raeburn  <raeburn@gnu.org>
 
        * xdisp.c (decode_mode_spec): In "no_value" case, do NUL
index 2c04743dac6d8b729d228abed4b8957a8c2df1b4..2ddb1b407ddb091e4df27725854b3fd8f3f1c5fd 100644 (file)
@@ -562,7 +562,7 @@ update_charset_table (charset_id, dimension, chars, width, direction,
     }
 
   /* Update table iso_charset_table.  */
-  if (iso_final_char >= 0
+  if (XINT (iso_final_char) >= 0
       && ISO_CHARSET_TABLE (dimension, chars, iso_final_char) < 0)
     ISO_CHARSET_TABLE (dimension, chars, iso_final_char) = charset;
 }
index e3643580011bb9c788e76a11b17040ad67de3179..7dd39ee25dd4311361270e54d157549ac52e033f 100644 (file)
@@ -636,6 +636,8 @@ extern Lisp_Object code_convert_string P_ ((Lisp_Object,
 extern Lisp_Object code_convert_string_norecord P_ ((Lisp_Object, Lisp_Object,
                                                     int));
 extern void setup_raw_text_coding_system P_ ((struct coding_system *));
+extern Lisp_Object encode_coding_string P_ ((Lisp_Object,
+                                            struct coding_system *, int));
 extern Lisp_Object Qcoding_system, Qeol_type, Qcoding_category_index;
 extern Lisp_Object Qraw_text, Qemacs_mule;
 extern Lisp_Object Qbuffer_file_coding_system;
index fe3da4be8a8421c2a74ddcb07b025733a14f9b54..9a2f18f043ca29d8269e1f6a173f5a54a0009f86 100644 (file)
@@ -7974,7 +7974,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
                      string = POSN_STRING (EVENT_START (key));
                      pos = XCDR (string);
                      string = XCAR (string);
-                      if (pos >= 0 && pos < XSTRING (string)->size)
+                      if (XINT (pos) >= 0
+                         && XINT (pos) < XSTRING (string)->size)
                         {
                           map = Fget_text_property (pos, Qlocal_map, string);
                           if (!NILP (map))
index 52fe1c18bcd05e17773351a6da6548562abd6852..965285a9c5f2e5263906c83b4cb785f955106fc5 100644 (file)
@@ -435,7 +435,7 @@ a system-dependent default device name is used.")
 
   args[0] = Qplay_sound_functions;
   args[1] = sound;
-  Frun_hook_with_args (make_number (2), args);
+  Frun_hook_with_args (2, args);
 
   /* There is only one type of device we currently support, the VOX
      sound driver.  Set up the device interface functions for that
index ce60fed07ff6925c83d8b06ae2f41be9b3e07da4..ad00a4eccf1c22b4334812f824741337d46aa775 100644 (file)
@@ -7445,7 +7445,7 @@ x_send_scroll_bar_event (window, part, portion, whole)
   ev->display = FRAME_X_DISPLAY (f);
   ev->window = FRAME_X_WINDOW (f);
   ev->format = 32;
-  ev->data.l[0] = (long) window;
+  ev->data.l[0] = (long) XFASTINT (window);
   ev->data.l[1] = (long) part;
   ev->data.l[2] = (long) 0;
   ev->data.l[3] = (long) portion;
@@ -7472,8 +7472,11 @@ x_scroll_bar_to_input_event (event, ievent)
      struct input_event *ievent;
 {
   XClientMessageEvent *ev = (XClientMessageEvent *) event;
-  Lisp_Object window = (Lisp_Object) ev->data.l[0];
-  struct frame *f = XFRAME (XWINDOW (window)->frame);
+  Lisp_Object window;
+  struct frame *f;
+
+  XSETFASTINT (window, ev->data.l[0]);
+  f = XFRAME (XWINDOW (window)->frame);
   
   ievent->kind = scroll_bar_click;
   ievent->frame_or_window = window;