Mercurial > emacs
comparison lisp/array.el @ 90182:f042e7c0fe20
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-53
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 302-319)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 69)
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 20 May 2005 04:22:05 +0000 |
parents | 68c22ea6027c 2c228409c44d |
children | 01137c1fdbe9 |
comparison
equal
deleted
inserted
replaced
90181:0c828e2b0b6f | 90182:f042e7c0fe20 |
---|---|
605 (interactive) | 605 (interactive) |
606 ;; If there is a conflict between array-field-width and init-string, resolve it. | 606 ;; If there is a conflict between array-field-width and init-string, resolve it. |
607 (let ((check t) | 607 (let ((check t) |
608 (len)) | 608 (len)) |
609 (while check | 609 (while check |
610 (setq array-init-field (read-input "Initial field value: ")) | 610 (setq array-init-field (read-string "Initial field value: ")) |
611 (setq len (length array-init-field)) | 611 (setq len (length array-init-field)) |
612 (if (/= len array-field-width) | 612 (if (/= len array-field-width) |
613 (if (y-or-n-p (format "Change field width to %d? " len)) | 613 (if (y-or-n-p (format "Change field width to %d? " len)) |
614 (progn (setq array-field-width len) | 614 (progn (setq array-field-width len) |
615 (setq check nil))) | 615 (setq check nil))) |
645 (while check | 645 (while check |
646 (if (and (>= new-columns-per-line 1) | 646 (if (and (>= new-columns-per-line 1) |
647 (<= new-columns-per-line array-max-column)) | 647 (<= new-columns-per-line array-max-column)) |
648 (setq check nil) | 648 (setq check nil) |
649 (setq new-columns-per-line | 649 (setq new-columns-per-line |
650 (string-to-int | 650 (string-to-number |
651 (read-input | 651 (read-string |
652 (format "Columns per line (1 - %d): " array-max-column))))))) | 652 (format "Columns per line (1 - %d): " array-max-column))))))) |
653 ;; Check on new-rows-numbered. It has to be done this way | 653 ;; Check on new-rows-numbered. It has to be done this way |
654 ;; because interactive does not have y-or-n-p. | 654 ;; because interactive does not have y-or-n-p. |
655 (cond | 655 (cond |
656 ((eq new-rows-numbered ?y) | 656 ((eq new-rows-numbered ?y) |
925 (message "")) | 925 (message "")) |
926 | 926 |
927 (defun array-init-max-row (&optional arg) | 927 (defun array-init-max-row (&optional arg) |
928 "Initialize the value of `array-max-row'." | 928 "Initialize the value of `array-max-row'." |
929 (setq array-max-row | 929 (setq array-max-row |
930 (or arg (string-to-int (read-input "Number of array rows: "))))) | 930 (or arg (string-to-number (read-string "Number of array rows: "))))) |
931 | 931 |
932 (defun array-init-max-column (&optional arg) | 932 (defun array-init-max-column (&optional arg) |
933 "Initialize the value of `array-max-column'." | 933 "Initialize the value of `array-max-column'." |
934 (setq array-max-column | 934 (setq array-max-column |
935 (or arg (string-to-int (read-input "Number of array columns: "))))) | 935 (or arg (string-to-number (read-string "Number of array columns: "))))) |
936 | 936 |
937 (defun array-init-columns-per-line (&optional arg) | 937 (defun array-init-columns-per-line (&optional arg) |
938 "Initialize the value of `array-columns-per-line'." | 938 "Initialize the value of `array-columns-per-line'." |
939 (setq array-columns-per-line | 939 (setq array-columns-per-line |
940 (or arg (string-to-int (read-input "Array columns per line: "))))) | 940 (or arg (string-to-number (read-string "Array columns per line: "))))) |
941 | 941 |
942 (defun array-init-field-width (&optional arg) | 942 (defun array-init-field-width (&optional arg) |
943 "Initialize the value of `array-field-width'." | 943 "Initialize the value of `array-field-width'." |
944 (setq array-field-width | 944 (setq array-field-width |
945 (or arg (string-to-int (read-input "Field width: "))))) | 945 (or arg (string-to-number (read-string "Field width: "))))) |
946 | 946 |
947 (defun array-init-rows-numbered (&optional arg) | 947 (defun array-init-rows-numbered (&optional arg) |
948 "Initialize the value of `array-rows-numbered'." | 948 "Initialize the value of `array-rows-numbered'." |
949 (setq array-rows-numbered | 949 (setq array-rows-numbered |
950 (or arg (y-or-n-p "Rows numbered? ")))) | 950 (or arg (y-or-n-p "Rows numbered? ")))) |