Re: [Mac-emacs-users] new to mac os x
Brought to you by:
akochoi
|
From: Andrew C. <ak...@sh...> - 2002-05-03 23:44:22
|
> [...] I noticed the same thing but have another question regarding
> the GUI mode: whenever I run it, it starts consuming a lot of CPU
> time (> 80% on a powerbook). Only happens in GUI mode, it works
> fine in a terminal window. Well actually, it works fine in the GUI
> mode too, it is just that anything else is slow while it is running.
The patch below fixes the problem. I'll check in into the CVS when I
can.
Index: macterm.c
===================================================================
RCS file: /cvsroot/emacs//emacs/src/macterm.c,v
retrieving revision 1.1
diff -u -r1.1 macterm.c
--- macterm.c 26 Apr 2002 23:39:05 -0000 1.1
+++ macterm.c 3 May 2002 23:32:14 -0000
@@ -12301,7 +12301,7 @@
if (NILP (Fboundp (Qmac_ready_for_drag_n_drop)))
event_mask -= highLevelEventMask;
- while (WaitNextEvent (event_mask, &er, 0L, NULL) && numchars > 0)
+ if (WaitNextEvent (event_mask, &er, (expected ? app_sleep_time : 0L), NULL))
switch (er.what)
{
case mouseDown:
@@ -12339,8 +12339,6 @@
mouse_tracking_in_progress = mouse_tracking_none;
tracked_scroll_bar = NULL;
count++;
- bufp++;
- numchars--;
break;
}
@@ -12356,8 +12354,6 @@
bufp->kind = menu_bar_activate_event;
XSETFRAME (bufp->frame_or_window, f);
count++;
- bufp++;
- numchars--;
}
break;
@@ -12437,8 +12433,6 @@
}
count++;
- bufp++;
- numchars--;
}
break;
@@ -12462,8 +12456,6 @@
XSETFRAME (bufp->frame_or_window,
((mac_output *) GetWRefCon (window_ptr))->mFP);
count++;
- bufp++;
- numchars--;
}
break;
@@ -12603,8 +12595,6 @@
bufp->timestamp = er.when * (1000 / 60); /* ticks to milliseconds */
count++;
- bufp++;
- numchars--;
break;
case kHighLevelEvent:
@@ -12655,8 +12645,6 @@
#endif /* not TARGET_API_MAC_CARBON */
count++;
- bufp++;
- numchars--;
}
default:
|