From 9cd77daade4e206037b9aee8e4a035e1d70b1f10 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 10 Aug 1993 04:14:17 +0000 Subject: [PATCH] (abs, ceiling, floor): Remove, since they now redefine builtin functions. All `ceiling' callers rewritten to invoke `floor'. --- lisp/array.el | 30 +++++------------------------- 1 file 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." (1- (% buffer-line lines-per-row)) (% buffer-line lines-per-row))) ;; Array columns on the current line. - (ceiling (1+ buffer-column) field-width)))) + (1+ (floor buffer-column field-width))))) (defun array-update-array-position (&optional a-row a-column) "Set `array-row' and `array-column' to their current values or @@ -706,8 +706,8 @@ of rows-numbered." (setq rows-numbered new-rows-numbered) (setq line-length (* old-field-width new-columns-per-line)) (setq lines-per-row - (+ (ceiling temp-max-column new-columns-per-line) - (if new-rows-numbered 1 0))) + (+ (floor (1- temp-max-column) new-columns-per-line) + (if new-rows-numbered 2 1))) (array-goto-cell (or array-row 1) (or array-column 1))) (kill-buffer temp-buffer)) (message "Working...done")) @@ -726,26 +726,6 @@ of rows-numbered." ((> index limit) limit) (t index))) -(defun abs (int) - "Return the absolute value of INT." - (if (< int 0) (- int) int)) - - -(defun floor (int1 int2) - "Returns the floor of INT1 divided by INT2. -INT1 may be negative. INT2 must be positive." - (if (< int1 0) - (- (ceiling (- int1) int2)) - (/ int1 int2))) - -(defun ceiling (int1 int2) - "Returns the ceiling of INT1 divided by INT2. -Assumes that both arguments are nonnegative." - (+ (/ int1 int2) - (if (zerop (mod int1 int2)) - 0 - 1))) - (defun xor (pred1 pred2) "Returns the logical exclusive or of predicates PRED1 and PRED2." (and (or pred1 pred2) @@ -965,7 +945,7 @@ array in this buffer." "Initialize the value of lines-per-row." (setq lines-per-row (or arg - (+ (ceiling max-column columns-per-line) - (if rows-numbered 1 0))))) + (+ (floor (1- max-column) columns-per-line) + (if rows-numbered 2 1))))) ;;; array.el ends here