summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-04-13 19:20:00 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-04-13 19:20:00 -0700
commit13a55a78d4564f84510ae160f9d19efb40236220 (patch)
tree04fee136434b82cc1571ab09cd1e684f69264752
parentde68a1fc344a72af93c8fca8592e9cefa0de59c7 (diff)
downloademacs-13a55a78d4564f84510ae160f9d19efb40236220.tar.gz
emacs-13a55a78d4564f84510ae160f9d19efb40236220.tar.bz2
emacs-13a55a78d4564f84510ae160f9d19efb40236220.zip
* scroll.c (scroll_cost): Remove; unused.
* dispextern.h (scroll_cost): Remove decl.
-rw-r--r--src/ChangeLog3
-rw-r--r--src/dispextern.h1
-rw-r--r--src/scroll.c38
3 files changed, 3 insertions, 39 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 404b00afc23..0c811188e07 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
+ * scroll.c (scroll_cost): Remove; unused.
+ * dispextern.h (scroll_cost): Remove decl.
+
* region-cache.h (pp_cache): Mark as externally visible.
* process.c: Make symbols static if they're not exported.
diff --git a/src/dispextern.h b/src/dispextern.h
index 438db97c6a5..a94e0620eae 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3303,7 +3303,6 @@ extern struct terminal *init_tty (const char *, const char *, int);
/* Defined in scroll.c */
extern int scrolling_max_lines_saved (int, int, int *, int *, int *);
-extern int scroll_cost (struct frame *, int, int, int);
extern void do_line_insertion_deletion_costs (struct frame *, const char *,
const char *, const char *,
const char *, const char *,
diff --git a/src/scroll.c b/src/scroll.c
index fcec596daa3..ba012874460 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -882,44 +882,6 @@ scrolling_max_lines_saved (int start, int end,
return matchcount;
}
-/* Return a measure of the cost of moving the lines starting with vpos
- FROM, up to but not including vpos TO, down by AMOUNT lines (AMOUNT
- may be negative). */
-
-int
-scroll_cost (FRAME_PTR frame, int from, int to, int amount)
-{
- /* Compute how many lines, at bottom of frame,
- will not be involved in actual motion. */
- EMACS_INT limit = to;
- EMACS_INT offset;
- EMACS_INT height = FRAME_LINES (frame);
-
- if (amount == 0)
- return 0;
-
- if (! FRAME_SCROLL_REGION_OK (frame))
- limit = height;
- else if (amount > 0)
- limit += amount;
-
- if (amount < 0)
- {
- int temp = to;
- to = from + amount;
- from = temp + amount;
- amount = - amount;
- }
-
- offset = height - limit;
-
- return
- (FRAME_INSERT_COST (frame)[offset + from]
- + (amount - 1) * FRAME_INSERTN_COST (frame)[offset + from]
- + FRAME_DELETE_COST (frame)[offset + to]
- + (amount - 1) * FRAME_DELETEN_COST (frame)[offset + to]);
-}
-
/* Calculate the line insertion/deletion
overhead and multiply factor values */