yatex

diff yatexadd.el @ 451:2011de73a671

Who owes the incompatibility of string-to-int?
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 21 Feb 2017 15:46:12 +0859
parents 9a91ec831762
children 2d9589a786d1
line diff
     1.1 --- a/yatexadd.el	Thu Jan 05 23:15:34 2017 +0900
     1.2 +++ b/yatexadd.el	Tue Feb 21 15:46:12 2017 +0859
     1.3 @@ -571,19 +571,19 @@
     1.4  	(Y (substring ts -4))
     1.5  	(y (substring ts -2))
     1.6  	(b (substring ts 0 3))
     1.7 -	(d (format "%d" (string-to-int (substring ts 4 6))))
     1.8 +	(d (format "%d" (YaTeX-str2int (substring ts 4 6))))
     1.9  	(H (substring ts 7 9))
    1.10  	(M (substring ts 10 12))
    1.11  	(S (substring ts 13 15))
    1.12 -	(HMS (+ (* 10000 (string-to-int H))
    1.13 -		(* 100 (string-to-int M))
    1.14 -		(string-to-int S)))
    1.15 +	(HMS (+ (* 10000 (YaTeX-str2int H))
    1.16 +		(* 100 (YaTeX-str2int M))
    1.17 +		(YaTeX-str2int S)))
    1.18  	(talphabex (YaTeX::ref-alphabex HMS))
    1.19  	(mnames "JanFebMarAprMayJunJulAugSepOctNovDec")
    1.20  	(m (format "%02d" (/ (string-match b mnames) 3)))
    1.21 -	(ymd (+ (* 10000 (string-to-int y))
    1.22 -		(* 100 (string-to-int m))
    1.23 -		(string-to-int d)))
    1.24 +	(ymd (+ (* 10000 (YaTeX-str2int y))
    1.25 +		(* 100 (YaTeX-str2int m))
    1.26 +		(YaTeX-str2int d)))
    1.27  	(dalphabex (YaTeX::ref-alphabex ymd)))
    1.28      (YaTeX-replace-formats
    1.29       (or format YaTeX-ref-default-label-string)