* keyboard.h (timer_check, show_help_echo): Remove unused parameters.
* keyboard.c (timer_check): Remove parameter `do_it_now',
unused since 1996-04-12T06:01:29Z!rms@gnu.org.
(show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
* keyboard.c (read_char):
* w32menu.c (w32_menu_display_help):
* xmenu.c (show_help_event, menu_help_callback):
Adjust calls to `show_help_echo'.
* gtkutil.c (xg_maybe_add_timer):
* keyboard.c (readable_events):
* process.c (wait_reading_process_output):
* xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
* insdel.c (adjust_markers_gap_motion):
Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
(gap_left, gap_right): Don't call it.
+2011-03-26 Juanma Barranquero <lekktu@gmail.com>
+
+ * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
+
+ * keyboard.c (timer_check): Remove parameter `do_it_now',
+ unused since 1996-04-12T06:01:29Z!rms@gnu.org.
+ (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
+ unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
+
+ * keyboard.c (read_char):
+ * w32menu.c (w32_menu_display_help):
+ * xmenu.c (show_help_event, menu_help_callback):
+ Adjust calls to `show_help_echo'.
+
+ * gtkutil.c (xg_maybe_add_timer):
+ * keyboard.c (readable_events):
+ * process.c (wait_reading_process_output):
+ * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
+
+ * insdel.c (adjust_markers_gap_motion):
+ Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
+ (gap_left, gap_right): Don't call it.
+
2011-03-25 Chong Yidong <cyd@stupidchicken.com>
* xdisp.c (handle_fontified_prop): Discard changes to clip_changed
xg_maybe_add_timer (gpointer data)
{
struct xg_dialog_data *dd = (struct xg_dialog_data *) data;
- EMACS_TIME next_time = timer_check (1);
+ EMACS_TIME next_time = timer_check ();
long secs = EMACS_SECS (next_time);
long usecs = EMACS_USECS (next_time);
int inherit);
static void gap_left (EMACS_INT charpos, EMACS_INT bytepos, int newgap);
static void gap_right (EMACS_INT charpos, EMACS_INT bytepos);
-static void adjust_markers_gap_motion (EMACS_INT from, EMACS_INT to,
- EMACS_INT amount);
static void adjust_markers_for_insert (EMACS_INT from, EMACS_INT from_byte,
EMACS_INT to, EMACS_INT to_byte,
int before_markers);
memmove (to, from, i);
}
- /* Adjust markers, and buffer data structure, to put the gap at BYTEPOS.
- BYTEPOS is where the loop above stopped, which may be what was specified
- or may be where a quit was detected. */
- adjust_markers_gap_motion (bytepos, GPT_BYTE, GAP_SIZE);
+ /* Adjust buffer data structure, to put the gap at BYTEPOS.
+ BYTEPOS is where the loop above stopped, which may be what
+ was specified or may be where a quit was detected. */
GPT_BYTE = bytepos;
GPT = charpos;
if (bytepos < charpos)
from += i, to += i;
}
- adjust_markers_gap_motion (GPT_BYTE + GAP_SIZE, bytepos + GAP_SIZE,
- - GAP_SIZE);
GPT = charpos;
GPT_BYTE = bytepos;
if (bytepos < charpos)
QUIT;
}
\f
-/* Add AMOUNT to the byte position of every marker in the current buffer
- whose current byte position is between FROM (exclusive) and TO (inclusive).
-
- Also, any markers past the outside of that interval, in the direction
- of adjustment, are first moved back to the near end of the interval
- and then adjusted by AMOUNT.
-
- When the latter adjustment is done, if AMOUNT is negative,
- we record the adjustment for undo. (This case happens only for
- deletion.)
-
- The markers' character positions are not altered,
- because gap motion does not affect character positions. */
-
-int adjust_markers_test;
-
-static void
-adjust_markers_gap_motion (EMACS_INT from, EMACS_INT to, EMACS_INT amount)
-{
- /* Now that a marker has a bytepos, not counting the gap,
- nothing needs to be done here. */
-#if 0
- Lisp_Object marker;
- register struct Lisp_Marker *m;
- register EMACS_INT mpos;
-
- marker = BUF_MARKERS (current_buffer);
-
- while (!NILP (marker))
- {
- m = XMARKER (marker);
- mpos = m->bytepos;
- if (amount > 0)
- {
- if (mpos > to && mpos < to + amount)
- {
- if (adjust_markers_test)
- abort ();
- mpos = to + amount;
- }
- }
- else
- {
- /* Here's the case where a marker is inside text being deleted.
- AMOUNT can be negative for gap motion, too,
- but then this range contains no markers. */
- if (mpos > from + amount && mpos <= from)
- {
- if (adjust_markers_test)
- abort ();
- mpos = from + amount;
- }
- }
- if (mpos > from && mpos <= to)
- mpos += amount;
- m->bufpos = mpos;
- marker = m->chain;
- }
-#endif
-}
-\f
/* Adjust all markers for a deletion
whose range in bytes is FROM_BYTE to TO_BYTE.
The range in charpos is FROM to TO.
Lisp_Object recursive_edit_unwind (Lisp_Object buffer), command_loop (void);
Lisp_Object Fthis_command_keys (void);
Lisp_Object Qextended_command_history;
-EMACS_TIME timer_check (int do_it_now);
+EMACS_TIME timer_check (void);
static void record_menu_key (Lisp_Object c);
static int echo_length (void);
the `display' property). POS is the position in that string under
the mouse.
- OK_TO_OVERWRITE_KEYSTROKE_ECHO non-zero means it's okay if the help
- echo overwrites a keystroke echo currently displayed in the echo
- area.
-
Note: this function may only be called with HELP nil or a string
from X code running asynchronously. */
void
show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object,
- Lisp_Object pos, int ok_to_overwrite_keystroke_echo)
+ Lisp_Object pos)
{
if (!NILP (help) && !STRINGP (help))
{
htem = Fcdr (htem);
position = Fcar (htem);
- show_help_echo (help, window, object, position, 0);
+ show_help_echo (help, window, object, position);
/* We stopped being idle for this event; undo that. */
if (!end_time)
readable_events (int flags)
{
if (flags & READABLE_EVENTS_DO_TIMERS_NOW)
- timer_check (1);
+ timer_check ();
/* If the buffer contains only FOCUS_IN_EVENT events, and
READABLE_EVENTS_FILTER_EVENTS is set, report it as empty. */
Returns the time to wait until the next timer fires.
If no timer is active, return -1.
- As long as any timer is ripe, we run it.
-
- DO_IT_NOW is now ignored. It used to mean that we should
- run the timer directly instead of queueing a timer-event.
- Now we always run timers directly. */
+ As long as any timer is ripe, we run it. */
EMACS_TIME
-timer_check (int do_it_now)
+timer_check (void)
{
EMACS_TIME nexttime;
extern void kbd_buffer_unget_event (struct input_event *);
extern void poll_for_input_1 (void);
extern void show_help_echo (Lisp_Object, Lisp_Object, Lisp_Object,
- Lisp_Object, int);
+ Lisp_Object);
extern void gen_help_event (Lisp_Object, Lisp_Object, Lisp_Object,
Lisp_Object, EMACS_INT);
extern void kbd_buffer_store_help_event (Lisp_Object, Lisp_Object);
extern int tty_read_avail_input (struct terminal *, int,
struct input_event *);
-extern EMACS_TIME timer_check (int);
+extern EMACS_TIME timer_check (void);
extern void mark_kboards (void);
#ifdef WINDOWSNT
struct buffer *old_buffer = current_buffer;
Lisp_Object old_window = selected_window;
- timer_delay = timer_check (1);
+ timer_delay = timer_check ();
/* If a timer has run, this might have changed buffers
an alike. Make read_key_sequence aware of that. */
do
{
int old_timers_run = timers_run;
- timer_delay = timer_check (1);
+ timer_delay = timer_check ();
if (timers_run != old_timers_run && do_display)
/* We must retry, since a timer may have requeued itself
and that could alter the time delay. */
else
/* X version has a loop through frames here, which doesn't
appear to do anything, unless it has some side effect. */
- show_help_echo (help, Qnil, Qnil, Qnil, 1);
+ show_help_echo (help, Qnil, Qnil, Qnil);
}
}
#endif
)
{
- EMACS_TIME next_time = timer_check (1), *ntp;
+ EMACS_TIME next_time = timer_check (), *ntp;
long secs = EMACS_SECS (next_time);
long usecs = EMACS_USECS (next_time);
SELECT_TYPE read_fds;
break;
}
#endif
- show_help_echo (help, Qnil, Qnil, Qnil, 1);
+ show_help_echo (help, Qnil, Qnil, Qnil);
}
}
Fcons (pane_name,
Fcons (make_number (pane), Qnil)));
show_help_echo (help_string ? build_string (help_string) : Qnil,
- Qnil, menu_object, make_number (item), 1);
+ Qnil, menu_object, make_number (item));
}
static Lisp_Object