diff options
| author | Paul Eggert | 1993-08-10 04:14:17 +0000 |
|---|---|---|
| committer | Paul Eggert | 1993-08-10 04:14:17 +0000 |
| commit | 9cd77daade4e206037b9aee8e4a035e1d70b1f10 (patch) | |
| tree | 4f1bfd70e68af6d0c05db72b8cb33f83f369b006 /lisp/array.el | |
| parent | 0bf9031ad18eb3c189ac9c2494e92c745ce664e7 (diff) | |
| download | emacs-9cd77daade4e206037b9aee8e4a035e1d70b1f10.tar.gz emacs-9cd77daade4e206037b9aee8e4a035e1d70b1f10.zip | |
(abs, ceiling, floor): Remove, since they now redefine
builtin functions. All `ceiling' callers rewritten to invoke `floor'.
Diffstat (limited to 'lisp/array.el')
| -rw-r--r-- | lisp/array.el | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/lisp/array.el b/lisp/array.el index c17aae26f4a..0730e1e7d0c 100644 --- a/lisp/array.el +++ b/lisp/array.el | |||
| @@ -79,7 +79,7 @@ Its ok to be on a row number line." | |||
| 79 | (1- (% buffer-line lines-per-row)) | 79 | (1- (% buffer-line lines-per-row)) |
| 80 | (% buffer-line lines-per-row))) | 80 | (% buffer-line lines-per-row))) |
| 81 | ;; Array columns on the current line. | 81 | ;; Array columns on the current line. |
| 82 | (ceiling (1+ buffer-column) field-width)))) | 82 | (1+ (floor buffer-column field-width))))) |
| 83 | 83 | ||
| 84 | (defun array-update-array-position (&optional a-row a-column) | 84 | (defun array-update-array-position (&optional a-row a-column) |
| 85 | "Set `array-row' and `array-column' to their current values or | 85 | "Set `array-row' and `array-column' to their current values or |
| @@ -706,8 +706,8 @@ of rows-numbered." | |||
| 706 | (setq rows-numbered new-rows-numbered) | 706 | (setq rows-numbered new-rows-numbered) |
| 707 | (setq line-length (* old-field-width new-columns-per-line)) | 707 | (setq line-length (* old-field-width new-columns-per-line)) |
| 708 | (setq lines-per-row | 708 | (setq lines-per-row |
| 709 | (+ (ceiling temp-max-column new-columns-per-line) | 709 | (+ (floor (1- temp-max-column) new-columns-per-line) |
| 710 | (if new-rows-numbered 1 0))) | 710 | (if new-rows-numbered 2 1))) |
| 711 | (array-goto-cell (or array-row 1) (or array-column 1))) | 711 | (array-goto-cell (or array-row 1) (or array-column 1))) |
| 712 | (kill-buffer temp-buffer)) | 712 | (kill-buffer temp-buffer)) |
| 713 | (message "Working...done")) | 713 | (message "Working...done")) |
| @@ -726,26 +726,6 @@ of rows-numbered." | |||
| 726 | ((> index limit) limit) | 726 | ((> index limit) limit) |
| 727 | (t index))) | 727 | (t index))) |
| 728 | 728 | ||
| 729 | (defun abs (int) | ||
| 730 | "Return the absolute value of INT." | ||
| 731 | (if (< int 0) (- int) int)) | ||
| 732 | |||
| 733 | |||
| 734 | (defun floor (int1 int2) | ||
| 735 | "Returns the floor of INT1 divided by INT2. | ||
| 736 | INT1 may be negative. INT2 must be positive." | ||
| 737 | (if (< int1 0) | ||
| 738 | (- (ceiling (- int1) int2)) | ||
| 739 | (/ int1 int2))) | ||
| 740 | |||
| 741 | (defun ceiling (int1 int2) | ||
| 742 | "Returns the ceiling of INT1 divided by INT2. | ||
| 743 | Assumes that both arguments are nonnegative." | ||
| 744 | (+ (/ int1 int2) | ||
| 745 | (if (zerop (mod int1 int2)) | ||
| 746 | 0 | ||
| 747 | 1))) | ||
| 748 | |||
| 749 | (defun xor (pred1 pred2) | 729 | (defun xor (pred1 pred2) |
| 750 | "Returns the logical exclusive or of predicates PRED1 and PRED2." | 730 | "Returns the logical exclusive or of predicates PRED1 and PRED2." |
| 751 | (and (or pred1 pred2) | 731 | (and (or pred1 pred2) |
| @@ -965,7 +945,7 @@ array in this buffer." | |||
| 965 | "Initialize the value of lines-per-row." | 945 | "Initialize the value of lines-per-row." |
| 966 | (setq lines-per-row | 946 | (setq lines-per-row |
| 967 | (or arg | 947 | (or arg |
| 968 | (+ (ceiling max-column columns-per-line) | 948 | (+ (floor (1- max-column) columns-per-line) |
| 969 | (if rows-numbered 1 0))))) | 949 | (if rows-numbered 2 1))))) |
| 970 | 950 | ||
| 971 | ;;; array.el ends here | 951 | ;;; array.el ends here |