diff options
| author | Juanma Barranquero | 2005-05-16 11:34:49 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2005-05-16 11:34:49 +0000 |
| commit | 027a4b6b3fd229f8aea323f59cb246d99deb8a75 (patch) | |
| tree | c92da7d3049376d7bd687db6bc5c8dce82ed9335 /lisp/emulation | |
| parent | 216d380630ec8be9569a56687f0e08b89ee97c47 (diff) | |
| download | emacs-027a4b6b3fd229f8aea323f59cb246d99deb8a75.tar.gz emacs-027a4b6b3fd229f8aea323f59cb246d99deb8a75.zip | |
Replace `string-to-int' by `string-to-number'.
Diffstat (limited to 'lisp/emulation')
| -rw-r--r-- | lisp/emulation/edt.el | 8 | ||||
| -rw-r--r-- | lisp/emulation/tpu-extras.el | 8 | ||||
| -rw-r--r-- | lisp/emulation/vip.el | 6 | ||||
| -rw-r--r-- | lisp/emulation/viper-ex.el | 8 |
4 files changed, 15 insertions, 15 deletions
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index ff0298e9a17..01f0af6f307 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el | |||
| @@ -1256,16 +1256,16 @@ Argument BOTTOM is the bottom margin in number of lines or percent of window." | |||
| 1256 | ;; set top scroll margin | 1256 | ;; set top scroll margin |
| 1257 | (or (string= top "") | 1257 | (or (string= top "") |
| 1258 | (if (string= "%" (substring top -1)) | 1258 | (if (string= "%" (substring top -1)) |
| 1259 | (setq edt-top-scroll-margin (string-to-int top)) | 1259 | (setq edt-top-scroll-margin (string-to-number top)) |
| 1260 | (setq edt-top-scroll-margin | 1260 | (setq edt-top-scroll-margin |
| 1261 | (/ (1- (+ (* (string-to-int top) 100) (window-height))) | 1261 | (/ (1- (+ (* (string-to-number top) 100) (window-height))) |
| 1262 | (window-height))))) | 1262 | (window-height))))) |
| 1263 | ;; set bottom scroll margin | 1263 | ;; set bottom scroll margin |
| 1264 | (or (string= bottom "") | 1264 | (or (string= bottom "") |
| 1265 | (if (string= "%" (substring bottom -1)) | 1265 | (if (string= "%" (substring bottom -1)) |
| 1266 | (setq edt-bottom-scroll-margin (string-to-int bottom)) | 1266 | (setq edt-bottom-scroll-margin (string-to-number bottom)) |
| 1267 | (setq edt-bottom-scroll-margin | 1267 | (setq edt-bottom-scroll-margin |
| 1268 | (/ (1- (+ (* (string-to-int bottom) 100) (window-height))) | 1268 | (/ (1- (+ (* (string-to-number bottom) 100) (window-height))) |
| 1269 | (window-height))))) | 1269 | (window-height))))) |
| 1270 | ;; report scroll margin settings if running interactively | 1270 | ;; report scroll margin settings if running interactively |
| 1271 | (and (interactive-p) | 1271 | (and (interactive-p) |
diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el index ced88ff3fdf..9c417dd3a40 100644 --- a/lisp/emulation/tpu-extras.el +++ b/lisp/emulation/tpu-extras.el | |||
| @@ -440,16 +440,16 @@ version that respects the bottom scroll margin." | |||
| 440 | ;; set top scroll margin | 440 | ;; set top scroll margin |
| 441 | (or (string= top "") | 441 | (or (string= top "") |
| 442 | (if (string= "%" (substring top -1)) | 442 | (if (string= "%" (substring top -1)) |
| 443 | (setq tpu-top-scroll-margin (string-to-int top)) | 443 | (setq tpu-top-scroll-margin (string-to-number top)) |
| 444 | (setq tpu-top-scroll-margin | 444 | (setq tpu-top-scroll-margin |
| 445 | (/ (1- (+ (* (string-to-int top) 100) (window-height))) | 445 | (/ (1- (+ (* (string-to-number top) 100) (window-height))) |
| 446 | (window-height))))) | 446 | (window-height))))) |
| 447 | ;; set bottom scroll margin | 447 | ;; set bottom scroll margin |
| 448 | (or (string= bottom "") | 448 | (or (string= bottom "") |
| 449 | (if (string= "%" (substring bottom -1)) | 449 | (if (string= "%" (substring bottom -1)) |
| 450 | (setq tpu-bottom-scroll-margin (string-to-int bottom)) | 450 | (setq tpu-bottom-scroll-margin (string-to-number bottom)) |
| 451 | (setq tpu-bottom-scroll-margin | 451 | (setq tpu-bottom-scroll-margin |
| 452 | (/ (1- (+ (* (string-to-int bottom) 100) (window-height))) | 452 | (/ (1- (+ (* (string-to-number bottom) 100) (window-height))) |
| 453 | (window-height))))) | 453 | (window-height))))) |
| 454 | ;; report scroll margin settings if running interactively | 454 | ;; report scroll margin settings if running interactively |
| 455 | (and (interactive-p) | 455 | (and (interactive-p) |
diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el index af878085ba8..19f08d54989 100644 --- a/lisp/emulation/vip.el +++ b/lisp/emulation/vip.el | |||
| @@ -2177,7 +2177,7 @@ a token has type \(command, address, end-mark\) and value." | |||
| 2177 | (cond ((string= ex-token-type "plus") "add-number") | 2177 | (cond ((string= ex-token-type "plus") "add-number") |
| 2178 | ((string= ex-token-type "minus") "sub-number") | 2178 | ((string= ex-token-type "minus") "sub-number") |
| 2179 | (t "abs-number"))) | 2179 | (t "abs-number"))) |
| 2180 | (setq ex-token (string-to-int (buffer-substring (point) (mark))))) | 2180 | (setq ex-token (string-to-number (buffer-substring (point) (mark))))) |
| 2181 | ((looking-at "\\$") | 2181 | ((looking-at "\\$") |
| 2182 | (forward-char 1) | 2182 | (forward-char 1) |
| 2183 | (setq ex-token-type "end")) | 2183 | (setq ex-token-type "end")) |
| @@ -2471,7 +2471,7 @@ a token has type \(command, address, end-mark\) and value." | |||
| 2471 | (progn | 2471 | (progn |
| 2472 | (set-mark (point)) | 2472 | (set-mark (point)) |
| 2473 | (re-search-forward "[0-9][0-9]*") | 2473 | (re-search-forward "[0-9][0-9]*") |
| 2474 | (setq ex-count (string-to-int (buffer-substring (point) (mark)))) | 2474 | (setq ex-count (string-to-number (buffer-substring (point) (mark)))) |
| 2475 | (skip-chars-forward " \t"))) | 2475 | (skip-chars-forward " \t"))) |
| 2476 | (if (looking-at "[pl#]") | 2476 | (if (looking-at "[pl#]") |
| 2477 | (progn | 2477 | (progn |
| @@ -2496,7 +2496,7 @@ a token has type \(command, address, end-mark\) and value." | |||
| 2496 | (progn | 2496 | (progn |
| 2497 | (set-mark (point)) | 2497 | (set-mark (point)) |
| 2498 | (re-search-forward "[0-9][0-9]*") | 2498 | (re-search-forward "[0-9][0-9]*") |
| 2499 | (setq ex-count (string-to-int (buffer-substring (point) (mark)))) | 2499 | (setq ex-count (string-to-number (buffer-substring (point) (mark)))) |
| 2500 | (skip-chars-forward " \t"))) | 2500 | (skip-chars-forward " \t"))) |
| 2501 | (if (looking-at "[pl#]") | 2501 | (if (looking-at "[pl#]") |
| 2502 | (progn | 2502 | (progn |
diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index 90b006ffb65..9f33bdbad53 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el | |||
| @@ -434,7 +434,7 @@ reversed." | |||
| 434 | ((eq ex-token-type 'minus) 'sub-number) | 434 | ((eq ex-token-type 'minus) 'sub-number) |
| 435 | (t 'abs-number))) | 435 | (t 'abs-number))) |
| 436 | (setq ex-token | 436 | (setq ex-token |
| 437 | (string-to-int (buffer-substring (point) (mark t))))) | 437 | (string-to-number (buffer-substring (point) (mark t))))) |
| 438 | ((looking-at "\\$") | 438 | ((looking-at "\\$") |
| 439 | (forward-char 1) | 439 | (forward-char 1) |
| 440 | (setq ex-token-type 'end)) | 440 | (setq ex-token-type 'end)) |
| @@ -912,7 +912,7 @@ reversed." | |||
| 912 | (progn | 912 | (progn |
| 913 | (set-mark (point)) | 913 | (set-mark (point)) |
| 914 | (re-search-forward "[0-9][0-9]*") | 914 | (re-search-forward "[0-9][0-9]*") |
| 915 | (setq ex-count (string-to-int (buffer-substring (point) (mark t)))) | 915 | (setq ex-count (string-to-number (buffer-substring (point) (mark t)))) |
| 916 | (skip-chars-forward " \t"))) | 916 | (skip-chars-forward " \t"))) |
| 917 | (if (looking-at "[pl#]") | 917 | (if (looking-at "[pl#]") |
| 918 | (progn | 918 | (progn |
| @@ -938,7 +938,7 @@ reversed." | |||
| 938 | (progn | 938 | (progn |
| 939 | (set-mark (point)) | 939 | (set-mark (point)) |
| 940 | (re-search-forward "[0-9][0-9]*") | 940 | (re-search-forward "[0-9][0-9]*") |
| 941 | (setq ex-count (string-to-int (buffer-substring (point) (mark t)))) | 941 | (setq ex-count (string-to-number (buffer-substring (point) (mark t)))) |
| 942 | (skip-chars-forward " \t"))) | 942 | (skip-chars-forward " \t"))) |
| 943 | (if (looking-at "[pl#]") | 943 | (if (looking-at "[pl#]") |
| 944 | (progn | 944 | (progn |
| @@ -1490,7 +1490,7 @@ reversed." | |||
| 1490 | (progn | 1490 | (progn |
| 1491 | (ex-edit t) | 1491 | (ex-edit t) |
| 1492 | (throw 'ex-edit nil)) | 1492 | (throw 'ex-edit nil)) |
| 1493 | (setq count (string-to-int ex-file)) | 1493 | (setq count (string-to-number ex-file)) |
| 1494 | (if (= count 0) (setq count 1)) | 1494 | (if (= count 0) (setq count 1)) |
| 1495 | (if (< count 0) (error "Usage: `next <count>' (count >= 0)")))) | 1495 | (if (< count 0) (error "Usage: `next <count>' (count >= 0)")))) |
| 1496 | (setq count 1)) | 1496 | (setq count 1)) |