# HG changeset patch # User HIROSE Yuuji # Date 1487660209 -32373 # Node ID 2d9589a786d1105dade3e93835df85a9d83d9e58 # Parent 2011de73a671f7c8e37bbc036aa0a93ad8bed0d6 string-to-int fix up diff -r 2011de73a671 -r 2d9589a786d1 yatexadd.el --- 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))) diff -r 2011de73a671 -r 2d9589a786d1 yatexenv.el --- 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)))))))) diff -r 2011de73a671 -r 2d9589a786d1 yatexprc.el --- 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)))