;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
(let ((check t)
(len))
(while check
- (setq array-init-field (read-input "Initial field value: "))
+ (setq array-init-field (read-string "Initial field value: "))
(setq len (length array-init-field))
(if (/= len array-field-width)
(if (y-or-n-p (format "Change field width to %d? " len))
(<= new-columns-per-line array-max-column))
(setq check nil)
(setq new-columns-per-line
- (string-to-int
- (read-input
+ (string-to-number
+ (read-string
(format "Columns per line (1 - %d): " array-max-column)))))))
;; Check on new-rows-numbered. It has to be done this way
;; because interactive does not have y-or-n-p.
Entering array mode calls the function `array-mode-hook'."
(interactive)
+ (kill-all-local-variables)
;; Number of rows in the array.
(make-local-variable 'array-max-row)
;; Number of columns in the array.
(setq truncate-lines t)
(setq overwrite-mode 'overwrite-mode-textual)
(use-local-map array-mode-map)
- (run-hooks 'array-mode-hook))
+ (run-mode-hooks 'array-mode-hook))
\f
(defun array-init-max-row (&optional arg)
"Initialize the value of `array-max-row'."
(setq array-max-row
- (or arg (string-to-int (read-input "Number of array rows: ")))))
+ (or arg (string-to-number (read-string "Number of array rows: ")))))
(defun array-init-max-column (&optional arg)
"Initialize the value of `array-max-column'."
(setq array-max-column
- (or arg (string-to-int (read-input "Number of array columns: ")))))
+ (or arg (string-to-number (read-string "Number of array columns: ")))))
(defun array-init-columns-per-line (&optional arg)
"Initialize the value of `array-columns-per-line'."
(setq array-columns-per-line
- (or arg (string-to-int (read-input "Array columns per line: ")))))
+ (or arg (string-to-number (read-string "Array columns per line: ")))))
(defun array-init-field-width (&optional arg)
"Initialize the value of `array-field-width'."
(setq array-field-width
- (or arg (string-to-int (read-input "Field width: ")))))
+ (or arg (string-to-number (read-string "Field width: ")))))
(defun array-init-rows-numbered (&optional arg)
"Initialize the value of `array-rows-numbered'."
(provide 'array)
+;;; arch-tag: 0086605d-79fe-4a1a-992a-456417261f80
;;; array.el ends here