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 diff
     1.1 --- a/yatexadd.el	Tue Feb 21 15:46:12 2017 +0859
     1.2 +++ b/yatexadd.el	Tue Feb 21 15:56:22 2017 +0859
     1.3 @@ -25,7 +25,7 @@
     1.4      (if (string= YaTeX-env-name "tabular*")
     1.5  	(setq width (concat "{" (YaTeX:read-length "Width: ") "}")))
     1.6      (setq loc (YaTeX:read-position "tb")
     1.7 -	  bars (string-to-int
     1.8 +	  bars (YaTeX-str2int
     1.9  		(YaTeX-read-string-or-skip
    1.10  		 "Number of columns(0 for default format): " "3")))
    1.11      (if (<= bars 0)
    1.12 @@ -1511,7 +1511,7 @@
    1.13        command))
    1.14     ((= argp 2)
    1.15      (let ((argc
    1.16 -	   (string-to-int
    1.17 +	   (YaTeX-str2int
    1.18  	    (read-string-with-history "Number of arguments(Default 0): ")))
    1.19  	  (def (YaTeX-read-string-or-skip "Definition: "))
    1.20  	  (command (get 'YaTeX::newcommand 'command)))
     2.1 --- a/yatexenv.el	Tue Feb 21 15:46:12 2017 +0859
     2.2 +++ b/yatexenv.el	Tue Feb 21 15:56:22 2017 +0859
     2.3 @@ -43,7 +43,7 @@
     2.4         ((> n 1)
     2.5  	(re-search-backward andptn)	;Sure to find!
     2.6  	(while (re-search-backward "\\\\multicolumn{\\([0-9]+\\)}" bor t)
     2.7 -	  (setq n (+ n (string-to-int
     2.8 +	  (setq n (+ n (YaTeX-str2int
     2.9  			(buffer-substring (match-beginning 1)
    2.10  					  (match-end 1)))
    2.11  		     -1)))))
    2.12 @@ -101,7 +101,7 @@
    2.13  	  (forward-list 1))
    2.14  	 ((equal elt ?*)		;*{N}{EXP} -> Repeat EXP N times
    2.15  	  (skip-chars-forward "^{" end)
    2.16 -	  (setq cols (* (string-to-int
    2.17 +	  (setq cols (* (YaTeX-str2int
    2.18  			 (buffer-substring
    2.19  			  (1+ (point))
    2.20  			  (progn (forward-list 1) (1- (point)))))
    2.21 @@ -136,7 +136,7 @@
    2.22  	     ((eq type 'alignat)
    2.23  	      (max
    2.24  	       1
    2.25 -	       (* 2 (string-to-int
    2.26 +	       (* 2 (YaTeX-str2int
    2.27  		     (buffer-substring
    2.28  		      (point)
    2.29  		      (progn (up-list -1) (forward-list 1) (1- (point))))))))
     3.1 --- a/yatexprc.el	Tue Feb 21 15:46:12 2017 +0859
     3.2 +++ b/yatexprc.el	Tue Feb 21 15:56:22 2017 +0859
     3.3 @@ -1149,7 +1149,7 @@
     3.4      (goto-char (setq b0 (match-beginning 0)))
     3.5      (skip-chars-forward "^0-9" (match-end 0))
     3.6      (setq error-line
     3.7 -	  (string-to-int
     3.8 +	  (YaTeX-str2int
     3.9  	   (buffer-substring
    3.10  	    (point)
    3.11  	    (progn (skip-chars-forward "0-9" (match-end 0)) (point))))
    3.12 @@ -1189,7 +1189,7 @@
    3.13  	(if (eobp) (insert (this-command-keys))
    3.14  	  (error "No line number expression."))
    3.15        (goto-char (match-beginning 0))
    3.16 -      (setq error-line (string-to-int
    3.17 +      (setq error-line (YaTeX-str2int
    3.18  			(buffer-substring (match-beginning 1) (match-end 1)))
    3.19  	    error-file (expand-file-name
    3.20  			(YaTeX-get-error-file YaTeX-current-TeX-buffer)))