src/w32fns.c (Fw32_register_hot_key): Use XINT instead of XLI.
src/w32notify.c (Fw32notify_add_watch, w32_get_watch_object): Use
make_pointer_integer instead of XIL.
(Fw32notify_rm_watch): Use XINTPTR instead of XLI.
src/w32inevt.c (handle_file_notifications): Use make_pointer_integer
instead of XIL. Put a list of the descriptor, action, and file
name in event->arg, instead of spreading them between event->code
and event->arg.
src/w32term.c (queue_notifications): Use make_pointer_integer
instead of XIL. Put a list of the descriptor, action, and file
name in event->arg, instead of spreading them between event->code
and event->arg.
src/keyboard.c (kbd_buffer_get_event) [HAVE_W32NOTIFY]: Adjust Lisp
event creation to changes in w32term.c and w32inevt.c above.
+2015-01-10 Eli Zaretskii <eliz@gnu.org>
+
+ * w32fns.c (Fw32_register_hot_key): Use XINT instead of XLI.
+
+ * w32notify.c (Fw32notify_add_watch, w32_get_watch_object): Use
+ make_pointer_integer instead of XIL.
+ (Fw32notify_rm_watch): Use XINTPTR instead of XLI.
+
+ * w32inevt.c (handle_file_notifications): Use make_pointer_integer
+ instead of XIL. Put a list of the descriptor, action, and file
+ name in event->arg, instead of spreading them between event->code
+ and event->arg.
+
+ * w32term.c (queue_notifications): Use make_pointer_integer
+ instead of XIL. Put a list of the descriptor, action, and file
+ name in event->arg, instead of spreading them between event->code
+ and event->arg.
+
+ * keyboard.c (kbd_buffer_get_event) [HAVE_W32NOTIFY]: Adjust Lisp
+ event creation to changes in w32term.c and w32inevt.c above.
+
2015-01-09 Paul Eggert <eggert@cs.ucla.edu>
Refactor pointer-to-integer conversion
{
#ifdef HAVE_W32NOTIFY
/* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK). */
- obj = list3 (Qfile_notify,
- list3 (make_number (event->code),
- XCAR (event->arg),
- XCDR (event->arg)),
- event->frame_or_window);
+ obj = list3 (Qfile_notify, event->arg, event->frame_or_window);
#else
obj = make_lispy_event (event);
#endif
/* Notify input thread about new hot-key definition, so that it
takes effect without needing to switch focus. */
PostThreadMessage (dwWindowsThreadId, WM_EMACS_REGISTER_HOT_KEY,
- (WPARAM) XLI (key), 0);
+ (WPARAM) XINT (key), 0);
}
return key;
Lisp_Object action = lispy_file_action (fni->Action);
inev.kind = FILE_NOTIFY_EVENT;
- inev.code = (ptrdiff_t)XINT (XIL ((EMACS_INT)notifications_desc));
inev.timestamp = GetTickCount ();
inev.modifiers = 0;
inev.frame_or_window = callback;
inev.arg = Fcons (action, fname);
+ inev.arg = list3 (make_pointer_integer (notifications_desc),
+ action, fname);
kbd_buffer_store_event_hold (&inev, hold_quit);
if (!fni->NextEntryOffset)
report_file_error ("Cannot watch file", Fcons (file, Qnil));
}
/* Store watch object in watch list. */
- watch_descriptor = XIL ((EMACS_INT)dirwatch);
+ watch_descriptor = make_pointer_integer (dirwatch);
watch_object = Fcons (watch_descriptor, callback);
watch_list = Fcons (watch_object, watch_list);
if (!NILP (watch_object))
{
watch_list = Fdelete (watch_object, watch_list);
- dirwatch = (struct notification *)XLI (watch_descriptor);
+ dirwatch = (struct notification *)XINTPTR (watch_descriptor);
if (w32_valid_pointer_p (dirwatch, sizeof(struct notification)))
status = remove_watch (dirwatch);
}
Lisp_Object
w32_get_watch_object (void *desc)
{
- Lisp_Object descriptor = XIL ((EMACS_INT)desc);
+ Lisp_Object descriptor = make_pointer_integer (desc);
/* This is called from the input queue handling code, inside a
critical section, so we cannot possibly QUIT if watch_list is not
Lisp_Object action = lispy_file_action (fni->Action);
event->kind = FILE_NOTIFY_EVENT;
- event->code
- = (ptrdiff_t)XINT (XIL ((EMACS_INT)notifications_desc));
event->timestamp = msg->msg.time;
event->modifiers = 0;
event->frame_or_window = callback;
- event->arg = Fcons (action, fname);
+ event->arg = list3 (make_pointer_integer (notifications_desc),
+ action, fname);
kbd_buffer_store_event (event);
(*evcount)++;