Commit 485763c0 authored by Eli Zaretskii's avatar Eli Zaretskii

MS-Windows followup for change in semantics of XIL and XLI. (Bug#15880)

 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.
parent c2208b3d
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
......
......@@ -4025,11 +4025,7 @@ kbd_buffer_get_event (KBOARD **kbp,
{
#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
......
......@@ -7235,7 +7235,7 @@ The return value is the hotkey-id if registered, otherwise nil. */)
/* 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;
......
......@@ -657,11 +657,12 @@ handle_file_notifications (struct input_event *hold_quit)
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)
......
......@@ -580,7 +580,7 @@ generate notifications correctly, though. */)
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);
......@@ -605,7 +605,7 @@ WATCH-DESCRIPTOR should be an object returned by `w32notify-add-watch'. */)
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);
}
......@@ -620,7 +620,7 @@ WATCH-DESCRIPTOR should be an object returned by `w32notify-add-watch'. */)
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
......
......@@ -3247,12 +3247,11 @@ queue_notifications (struct input_event *event, W32Msg *msg, struct frame *f,
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)++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment