Mercurial > hgrepos > hgweb.cgi > yatex
changeset 452:2d9589a786d1 dev
string-to-int fix up
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 21 Feb 2017 15:56:22 +0859 |
parents | 2011de73a671 |
children | f38293cfe508 |
files | yatexadd.el yatexenv.el yatexprc.el |
diffstat | 3 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/yatexadd.el Tue Feb 21 15:46:12 2017 +0859 +++ b/yatexadd.el Tue Feb 21 15:56:22 2017 +0859 @@ -25,7 +25,7 @@ (if (string= YaTeX-env-name "tabular*") (setq width (concat "{" (YaTeX:read-length "Width: ") "}"))) (setq loc (YaTeX:read-position "tb") - bars (string-to-int + bars (YaTeX-str2int (YaTeX-read-string-or-skip "Number of columns(0 for default format): " "3"))) (if (<= bars 0) @@ -1511,7 +1511,7 @@ command)) ((= argp 2) (let ((argc - (string-to-int + (YaTeX-str2int (read-string-with-history "Number of arguments(Default 0): "))) (def (YaTeX-read-string-or-skip "Definition: ")) (command (get 'YaTeX::newcommand 'command)))
--- a/yatexenv.el Tue Feb 21 15:46:12 2017 +0859 +++ b/yatexenv.el Tue Feb 21 15:56:22 2017 +0859 @@ -43,7 +43,7 @@ ((> n 1) (re-search-backward andptn) ;Sure to find! (while (re-search-backward "\\\\multicolumn{\\([0-9]+\\)}" bor t) - (setq n (+ n (string-to-int + (setq n (+ n (YaTeX-str2int (buffer-substring (match-beginning 1) (match-end 1))) -1))))) @@ -101,7 +101,7 @@ (forward-list 1)) ((equal elt ?*) ;*{N}{EXP} -> Repeat EXP N times (skip-chars-forward "^{" end) - (setq cols (* (string-to-int + (setq cols (* (YaTeX-str2int (buffer-substring (1+ (point)) (progn (forward-list 1) (1- (point))))) @@ -136,7 +136,7 @@ ((eq type 'alignat) (max 1 - (* 2 (string-to-int + (* 2 (YaTeX-str2int (buffer-substring (point) (progn (up-list -1) (forward-list 1) (1- (point))))))))
--- a/yatexprc.el Tue Feb 21 15:46:12 2017 +0859 +++ b/yatexprc.el Tue Feb 21 15:56:22 2017 +0859 @@ -1149,7 +1149,7 @@ (goto-char (setq b0 (match-beginning 0))) (skip-chars-forward "^0-9" (match-end 0)) (setq error-line - (string-to-int + (YaTeX-str2int (buffer-substring (point) (progn (skip-chars-forward "0-9" (match-end 0)) (point)))) @@ -1189,7 +1189,7 @@ (if (eobp) (insert (this-command-keys)) (error "No line number expression.")) (goto-char (match-beginning 0)) - (setq error-line (string-to-int + (setq error-line (YaTeX-str2int (buffer-substring (match-beginning 1) (match-end 1))) error-file (expand-file-name (YaTeX-get-error-file YaTeX-current-TeX-buffer)))