summaryrefslogtreecommitdiff
path: root/src/insdel.c
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2011-03-26 02:23:15 +0100
committerJuanma Barranquero <lekktu@gmail.com>2011-03-26 02:23:15 +0100
commitf868cd8a7186e86e4c9bbd52de2aca99fa94648f (patch)
treec861c3ee7b8fe1c1f12729faac4a8e08c0b5862c /src/insdel.c
parentdc8026879ec33cfdcb47973ab7a3c14789c62aa6 (diff)
downloademacs-f868cd8a7186e86e4c9bbd52de2aca99fa94648f.tar.gz
src/*.h: Remove unused parameters and functions.
* 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.
Diffstat (limited to 'src/insdel.c')
-rw-r--r--src/insdel.c72
1 files changed, 3 insertions, 69 deletions
diff --git a/src/insdel.c b/src/insdel.c
index 1cbe3de20d2..4bdcb4bc0b7 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -41,8 +41,6 @@ static void insert_from_buffer_1 (struct buffer *buf,
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);
@@ -162,10 +160,9 @@ gap_left (EMACS_INT charpos, EMACS_INT bytepos, int newgap)
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)
@@ -217,8 +214,6 @@ gap_right (EMACS_INT charpos, EMACS_INT bytepos)
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)
@@ -227,67 +222,6 @@ gap_right (EMACS_INT charpos, EMACS_INT bytepos)
QUIT;
}
-/* 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
-}
-
/* Adjust all markers for a deletion
whose range in bytes is FROM_BYTE to TO_BYTE.
The range in charpos is FROM to TO.