diff options
| author | Eli Zaretskii | 2015-01-10 13:27:35 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-01-10 13:27:35 +0200 |
| commit | 485763c0dcdc4f5ab1030f4bae6acbbe0ce9497e (patch) | |
| tree | d5920af2c0ef767a62051a5797ad60ddaca8efdc /src | |
| parent | c2208b3d913c2e53b96d7f11b31422a57366f601 (diff) | |
| download | emacs-485763c0dcdc4f5ab1030f4bae6acbbe0ce9497e.tar.gz emacs-485763c0dcdc4f5ab1030f4bae6acbbe0ce9497e.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 21 | ||||
| -rw-r--r-- | src/keyboard.c | 6 | ||||
| -rw-r--r-- | src/w32fns.c | 2 | ||||
| -rw-r--r-- | src/w32inevt.c | 3 | ||||
| -rw-r--r-- | src/w32notify.c | 6 | ||||
| -rw-r--r-- | src/w32term.c | 5 |
6 files changed, 30 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c11ba11715b..b6358d0e66d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,24 @@ | |||
| 1 | 2015-01-10 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * w32fns.c (Fw32_register_hot_key): Use XINT instead of XLI. | ||
| 4 | |||
| 5 | * w32notify.c (Fw32notify_add_watch, w32_get_watch_object): Use | ||
| 6 | make_pointer_integer instead of XIL. | ||
| 7 | (Fw32notify_rm_watch): Use XINTPTR instead of XLI. | ||
| 8 | |||
| 9 | * w32inevt.c (handle_file_notifications): Use make_pointer_integer | ||
| 10 | instead of XIL. Put a list of the descriptor, action, and file | ||
| 11 | name in event->arg, instead of spreading them between event->code | ||
| 12 | and event->arg. | ||
| 13 | |||
| 14 | * w32term.c (queue_notifications): Use make_pointer_integer | ||
| 15 | instead of XIL. Put a list of the descriptor, action, and file | ||
| 16 | name in event->arg, instead of spreading them between event->code | ||
| 17 | and event->arg. | ||
| 18 | |||
| 19 | * keyboard.c (kbd_buffer_get_event) [HAVE_W32NOTIFY]: Adjust Lisp | ||
| 20 | event creation to changes in w32term.c and w32inevt.c above. | ||
| 21 | |||
| 1 | 2015-01-09 Paul Eggert <eggert@cs.ucla.edu> | 22 | 2015-01-09 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 23 | ||
| 3 | Refactor pointer-to-integer conversion | 24 | Refactor pointer-to-integer conversion |
diff --git a/src/keyboard.c b/src/keyboard.c index c177c804bad..2a50003038d 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -4025,11 +4025,7 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4025 | { | 4025 | { |
| 4026 | #ifdef HAVE_W32NOTIFY | 4026 | #ifdef HAVE_W32NOTIFY |
| 4027 | /* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK). */ | 4027 | /* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK). */ |
| 4028 | obj = list3 (Qfile_notify, | 4028 | obj = list3 (Qfile_notify, event->arg, event->frame_or_window); |
| 4029 | list3 (make_number (event->code), | ||
| 4030 | XCAR (event->arg), | ||
| 4031 | XCDR (event->arg)), | ||
| 4032 | event->frame_or_window); | ||
| 4033 | #else | 4029 | #else |
| 4034 | obj = make_lispy_event (event); | 4030 | obj = make_lispy_event (event); |
| 4035 | #endif | 4031 | #endif |
diff --git a/src/w32fns.c b/src/w32fns.c index ced3d87dd66..789a91a3c96 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -7235,7 +7235,7 @@ The return value is the hotkey-id if registered, otherwise nil. */) | |||
| 7235 | /* Notify input thread about new hot-key definition, so that it | 7235 | /* Notify input thread about new hot-key definition, so that it |
| 7236 | takes effect without needing to switch focus. */ | 7236 | takes effect without needing to switch focus. */ |
| 7237 | PostThreadMessage (dwWindowsThreadId, WM_EMACS_REGISTER_HOT_KEY, | 7237 | PostThreadMessage (dwWindowsThreadId, WM_EMACS_REGISTER_HOT_KEY, |
| 7238 | (WPARAM) XLI (key), 0); | 7238 | (WPARAM) XINT (key), 0); |
| 7239 | } | 7239 | } |
| 7240 | 7240 | ||
| 7241 | return key; | 7241 | return key; |
diff --git a/src/w32inevt.c b/src/w32inevt.c index daf4a5c2375..e09903f99be 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -657,11 +657,12 @@ handle_file_notifications (struct input_event *hold_quit) | |||
| 657 | Lisp_Object action = lispy_file_action (fni->Action); | 657 | Lisp_Object action = lispy_file_action (fni->Action); |
| 658 | 658 | ||
| 659 | inev.kind = FILE_NOTIFY_EVENT; | 659 | inev.kind = FILE_NOTIFY_EVENT; |
| 660 | inev.code = (ptrdiff_t)XINT (XIL ((EMACS_INT)notifications_desc)); | ||
| 661 | inev.timestamp = GetTickCount (); | 660 | inev.timestamp = GetTickCount (); |
| 662 | inev.modifiers = 0; | 661 | inev.modifiers = 0; |
| 663 | inev.frame_or_window = callback; | 662 | inev.frame_or_window = callback; |
| 664 | inev.arg = Fcons (action, fname); | 663 | inev.arg = Fcons (action, fname); |
| 664 | inev.arg = list3 (make_pointer_integer (notifications_desc), | ||
| 665 | action, fname); | ||
| 665 | kbd_buffer_store_event_hold (&inev, hold_quit); | 666 | kbd_buffer_store_event_hold (&inev, hold_quit); |
| 666 | 667 | ||
| 667 | if (!fni->NextEntryOffset) | 668 | if (!fni->NextEntryOffset) |
diff --git a/src/w32notify.c b/src/w32notify.c index a0d555b4786..ab6cd12ab93 100644 --- a/src/w32notify.c +++ b/src/w32notify.c | |||
| @@ -580,7 +580,7 @@ generate notifications correctly, though. */) | |||
| 580 | report_file_error ("Cannot watch file", Fcons (file, Qnil)); | 580 | report_file_error ("Cannot watch file", Fcons (file, Qnil)); |
| 581 | } | 581 | } |
| 582 | /* Store watch object in watch list. */ | 582 | /* Store watch object in watch list. */ |
| 583 | watch_descriptor = XIL ((EMACS_INT)dirwatch); | 583 | watch_descriptor = make_pointer_integer (dirwatch); |
| 584 | watch_object = Fcons (watch_descriptor, callback); | 584 | watch_object = Fcons (watch_descriptor, callback); |
| 585 | watch_list = Fcons (watch_object, watch_list); | 585 | watch_list = Fcons (watch_object, watch_list); |
| 586 | 586 | ||
| @@ -605,7 +605,7 @@ WATCH-DESCRIPTOR should be an object returned by `w32notify-add-watch'. */) | |||
| 605 | if (!NILP (watch_object)) | 605 | if (!NILP (watch_object)) |
| 606 | { | 606 | { |
| 607 | watch_list = Fdelete (watch_object, watch_list); | 607 | watch_list = Fdelete (watch_object, watch_list); |
| 608 | dirwatch = (struct notification *)XLI (watch_descriptor); | 608 | dirwatch = (struct notification *)XINTPTR (watch_descriptor); |
| 609 | if (w32_valid_pointer_p (dirwatch, sizeof(struct notification))) | 609 | if (w32_valid_pointer_p (dirwatch, sizeof(struct notification))) |
| 610 | status = remove_watch (dirwatch); | 610 | status = remove_watch (dirwatch); |
| 611 | } | 611 | } |
| @@ -620,7 +620,7 @@ WATCH-DESCRIPTOR should be an object returned by `w32notify-add-watch'. */) | |||
| 620 | Lisp_Object | 620 | Lisp_Object |
| 621 | w32_get_watch_object (void *desc) | 621 | w32_get_watch_object (void *desc) |
| 622 | { | 622 | { |
| 623 | Lisp_Object descriptor = XIL ((EMACS_INT)desc); | 623 | Lisp_Object descriptor = make_pointer_integer (desc); |
| 624 | 624 | ||
| 625 | /* This is called from the input queue handling code, inside a | 625 | /* This is called from the input queue handling code, inside a |
| 626 | critical section, so we cannot possibly QUIT if watch_list is not | 626 | critical section, so we cannot possibly QUIT if watch_list is not |
diff --git a/src/w32term.c b/src/w32term.c index 8a53a58189a..ce28e05a45b 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -3247,12 +3247,11 @@ queue_notifications (struct input_event *event, W32Msg *msg, struct frame *f, | |||
| 3247 | Lisp_Object action = lispy_file_action (fni->Action); | 3247 | Lisp_Object action = lispy_file_action (fni->Action); |
| 3248 | 3248 | ||
| 3249 | event->kind = FILE_NOTIFY_EVENT; | 3249 | event->kind = FILE_NOTIFY_EVENT; |
| 3250 | event->code | ||
| 3251 | = (ptrdiff_t)XINT (XIL ((EMACS_INT)notifications_desc)); | ||
| 3252 | event->timestamp = msg->msg.time; | 3250 | event->timestamp = msg->msg.time; |
| 3253 | event->modifiers = 0; | 3251 | event->modifiers = 0; |
| 3254 | event->frame_or_window = callback; | 3252 | event->frame_or_window = callback; |
| 3255 | event->arg = Fcons (action, fname); | 3253 | event->arg = list3 (make_pointer_integer (notifications_desc), |
| 3254 | action, fname); | ||
| 3256 | kbd_buffer_store_event (event); | 3255 | kbd_buffer_store_event (event); |
| 3257 | (*evcount)++; | 3256 | (*evcount)++; |
| 3258 | 3257 | ||