[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/keyboard.c [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/keyboard.c [emacs-unicode-2] |
Date: |
Thu, 11 Nov 2004 22:19:00 -0500 |
Index: emacs/src/keyboard.c
diff -c emacs/src/keyboard.c:1.753.2.12 emacs/src/keyboard.c:1.753.2.13
*** emacs/src/keyboard.c:1.753.2.12 Thu Oct 14 08:49:55 2004
--- emacs/src/keyboard.c Fri Nov 12 02:52:57 2004
***************
*** 1840,1845 ****
--- 1840,1853 ----
if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks))
{
+ /* Setting transient-mark-mode to `only' is a way of
+ turning it on for just one command. */
+
+ if (EQ (Vtransient_mark_mode, Qidentity))
+ Vtransient_mark_mode = Qnil;
+ if (EQ (Vtransient_mark_mode, Qonly))
+ Vtransient_mark_mode = Qidentity;
+
if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode))
{
/* We could also call `deactivate'mark'. */
***************
*** 1855,1870 ****
call1 (Vrun_hooks, intern ("activate-mark-hook"));
}
- /* Setting transient-mark-mode to `only' is a way of
- turning it on for just one command. */
- if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks))
- {
- if (EQ (Vtransient_mark_mode, Qidentity))
- Vtransient_mark_mode = Qnil;
- if (EQ (Vtransient_mark_mode, Qonly))
- Vtransient_mark_mode = Qidentity;
- }
-
finalize:
if (current_buffer == prev_buffer
--- 1863,1868 ----
***************
*** 3697,3732 ****
Discard the event if it would fill the last slot. */
if (kbd_fetch_ptr - 1 != kbd_store_ptr)
{
- #if 0 /* The SELECTION_REQUEST_EVENT case looks bogus, and it's error
- prone to assign individual members for other events, in case
- the input_event structure is changed. --2000-07-13, gerd. */
- struct input_event *sp = kbd_store_ptr;
- sp->kind = event->kind;
- if (event->kind == SELECTION_REQUEST_EVENT)
- {
- /* We must not use the ordinary copying code for this case,
- since `part' is an enum and copying it might not copy enough
- in this case. */
- bcopy (event, (char *) sp, sizeof (*event));
- }
- else
! {
! sp->code = event->code;
! sp->part = event->part;
! sp->frame_or_window = event->frame_or_window;
! sp->arg = event->arg;
! sp->modifiers = event->modifiers;
! sp->x = event->x;
! sp->y = event->y;
! sp->timestamp = event->timestamp;
! }
! #else
! *kbd_store_ptr = *event;
! #endif
! ++kbd_store_ptr;
}
}
--- 3695,3720 ----
Discard the event if it would fill the last slot. */
if (kbd_fetch_ptr - 1 != kbd_store_ptr)
{
+ *kbd_store_ptr = *event;
+ ++kbd_store_ptr;
+ }
+ }
! /* Put an input event back in the head of the event queue. */
! void
! kbd_buffer_unget_event (event)
! register struct input_event *event;
! {
! if (kbd_fetch_ptr == kbd_buffer)
! kbd_fetch_ptr = kbd_buffer + KBD_BUFFER_SIZE;
!
! /* Don't let the very last slot in the buffer become full, */
! if (kbd_fetch_ptr - 1 != kbd_store_ptr)
! {
! --kbd_fetch_ptr;
! *kbd_fetch_ptr = *event;
}
}
***************
*** 3941,3947 ****
/* These two kinds of events get special handling
and don't actually appear to the command loop.
We return nil for them. */
! if (event->kind == SELECTION_REQUEST_EVENT)
{
#ifdef HAVE_X11
struct input_event copy;
--- 3929,3936 ----
/* These two kinds of events get special handling
and don't actually appear to the command loop.
We return nil for them. */
! if (event->kind == SELECTION_REQUEST_EVENT
! || event->kind == SELECTION_CLEAR_EVENT)
{
#ifdef HAVE_X11
struct input_event copy;
***************
*** 3952,3958 ****
copy = *event;
kbd_fetch_ptr = event + 1;
input_pending = readable_events (0);
! x_handle_selection_request (©);
#else
/* We're getting selection request events, but we don't have
a window system. */
--- 3941,3947 ----
copy = *event;
kbd_fetch_ptr = event + 1;
input_pending = readable_events (0);
! x_handle_selection_event (©);
#else
/* We're getting selection request events, but we don't have
a window system. */
***************
*** 3960,3981 ****
#endif
}
- else if (event->kind == SELECTION_CLEAR_EVENT)
- {
- #ifdef HAVE_X11
- struct input_event copy;
-
- /* Remove it from the buffer before processing it. */
- copy = *event;
- kbd_fetch_ptr = event + 1;
- input_pending = readable_events (0);
- x_handle_selection_clear (©);
- #else
- /* We're getting selection request events, but we don't have
- a window system. */
- abort ();
- #endif
- }
#if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS)
else if (event->kind == DELETE_WINDOW_EVENT)
{
--- 3949,3954 ----
***************
*** 4200,4206 ****
/* These two kinds of events get special handling
and don't actually appear to the command loop. */
! if (event->kind == SELECTION_REQUEST_EVENT)
{
#ifdef HAVE_X11
struct input_event copy;
--- 4173,4180 ----
/* These two kinds of events get special handling
and don't actually appear to the command loop. */
! if (event->kind == SELECTION_REQUEST_EVENT
! || event->kind == SELECTION_CLEAR_EVENT)
{
#ifdef HAVE_X11
struct input_event copy;
***************
*** 4211,4235 ****
copy = *event;
kbd_fetch_ptr = event + 1;
input_pending = readable_events (0);
! x_handle_selection_request (©);
! #else
! /* We're getting selection request events, but we don't have
! a window system. */
! abort ();
! #endif
! }
!
! else if (event->kind == SELECTION_CLEAR_EVENT)
! {
! #ifdef HAVE_X11
! struct input_event copy;
!
! /* Remove it from the buffer before processing it, */
! copy = *event;
!
! kbd_fetch_ptr = event + 1;
! input_pending = readable_events (0);
! x_handle_selection_clear (©);
#else
/* We're getting selection request events, but we don't have
a window system. */
--- 4185,4191 ----
copy = *event;
kbd_fetch_ptr = event + 1;
input_pending = readable_events (0);
! x_handle_selection_event (©);
#else
/* We're getting selection request events, but we don't have
a window system. */
***************
*** 6670,6676 ****
if (read_socket_hook)
{
- int discard = 0;
int nr;
struct input_event hold_quit;
--- 6626,6631 ----
***************
*** 11454,11460 ****
{
if (event == kbd_buffer + KBD_BUFFER_SIZE)
event = kbd_buffer;
! if (event->kind != SELECTION_REQUEST_EVENT)
{
mark_object (event->x);
mark_object (event->y);
--- 11409,11416 ----
{
if (event == kbd_buffer + KBD_BUFFER_SIZE)
event = kbd_buffer;
! if (event->kind != SELECTION_REQUEST_EVENT
! && event->kind != SELECTION_CLEAR_EVENT)
{
mark_object (event->x);
mark_object (event->y);
- [Emacs-diffs] Changes to emacs/src/keyboard.c [emacs-unicode-2],
Miles Bader <=