diff options
| author | Paul Eggert | 2011-04-13 19:20:00 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-13 19:20:00 -0700 |
| commit | 13a55a78d4564f84510ae160f9d19efb40236220 (patch) | |
| tree | 04fee136434b82cc1571ab09cd1e684f69264752 /src | |
| parent | de68a1fc344a72af93c8fca8592e9cefa0de59c7 (diff) | |
| download | emacs-13a55a78d4564f84510ae160f9d19efb40236220.tar.gz emacs-13a55a78d4564f84510ae160f9d19efb40236220.zip | |
* scroll.c (scroll_cost): Remove; unused.
* dispextern.h (scroll_cost): Remove decl.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/dispextern.h | 1 | ||||
| -rw-r--r-- | src/scroll.c | 38 |
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 @@ | |||
| 1 | 2011-04-14 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-04-14 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * scroll.c (scroll_cost): Remove; unused. | ||
| 4 | * dispextern.h (scroll_cost): Remove decl. | ||
| 5 | |||
| 3 | * region-cache.h (pp_cache): Mark as externally visible. | 6 | * region-cache.h (pp_cache): Mark as externally visible. |
| 4 | 7 | ||
| 5 | * process.c: Make symbols static if they're not exported. | 8 | * 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); | |||
| 3303 | /* Defined in scroll.c */ | 3303 | /* Defined in scroll.c */ |
| 3304 | 3304 | ||
| 3305 | extern int scrolling_max_lines_saved (int, int, int *, int *, int *); | 3305 | extern int scrolling_max_lines_saved (int, int, int *, int *, int *); |
| 3306 | extern int scroll_cost (struct frame *, int, int, int); | ||
| 3307 | extern void do_line_insertion_deletion_costs (struct frame *, const char *, | 3306 | extern void do_line_insertion_deletion_costs (struct frame *, const char *, |
| 3308 | const char *, const char *, | 3307 | const char *, const char *, |
| 3309 | const char *, const char *, | 3308 | 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, | |||
| 882 | return matchcount; | 882 | return matchcount; |
| 883 | } | 883 | } |
| 884 | 884 | ||
| 885 | /* Return a measure of the cost of moving the lines starting with vpos | ||
| 886 | FROM, up to but not including vpos TO, down by AMOUNT lines (AMOUNT | ||
| 887 | may be negative). */ | ||
| 888 | |||
| 889 | int | ||
| 890 | scroll_cost (FRAME_PTR frame, int from, int to, int amount) | ||
| 891 | { | ||
| 892 | /* Compute how many lines, at bottom of frame, | ||
| 893 | will not be involved in actual motion. */ | ||
| 894 | EMACS_INT limit = to; | ||
| 895 | EMACS_INT offset; | ||
| 896 | EMACS_INT height = FRAME_LINES (frame); | ||
| 897 | |||
| 898 | if (amount == 0) | ||
| 899 | return 0; | ||
| 900 | |||
| 901 | if (! FRAME_SCROLL_REGION_OK (frame)) | ||
| 902 | limit = height; | ||
| 903 | else if (amount > 0) | ||
| 904 | limit += amount; | ||
| 905 | |||
| 906 | if (amount < 0) | ||
| 907 | { | ||
| 908 | int temp = to; | ||
| 909 | to = from + amount; | ||
| 910 | from = temp + amount; | ||
| 911 | amount = - amount; | ||
| 912 | } | ||
| 913 | |||
| 914 | offset = height - limit; | ||
| 915 | |||
| 916 | return | ||
| 917 | (FRAME_INSERT_COST (frame)[offset + from] | ||
| 918 | + (amount - 1) * FRAME_INSERTN_COST (frame)[offset + from] | ||
| 919 | + FRAME_DELETE_COST (frame)[offset + to] | ||
| 920 | + (amount - 1) * FRAME_DELETEN_COST (frame)[offset + to]); | ||
| 921 | } | ||
| 922 | |||
| 923 | /* Calculate the line insertion/deletion | 885 | /* Calculate the line insertion/deletion |
| 924 | overhead and multiply factor values */ | 886 | overhead and multiply factor values */ |
| 925 | 887 | ||