* scroll.c (scroll_cost): Remove; unused.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Apr 2011 02:20:00 +0000 (19:20 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Apr 2011 02:20:00 +0000 (19:20 -0700)
* dispextern.h (scroll_cost): Remove decl.

src/ChangeLog
src/dispextern.h
src/scroll.c

index 404b00a..0c81118 100644 (file)
@@ -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.
index 438db97..a94e062 100644 (file)
@@ -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 *,
index fcec596..ba01287 100644 (file)
@@ -882,44 +882,6 @@ scrolling_max_lines_saved (int start, int end,
   return matchcount;
 }
 \f
-/* 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]);
-}
-\f
 /* Calculate the line insertion/deletion
    overhead and multiply factor values */