1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
Description: use string-to-number instead of string-to-int deprecated in emacs 26
Author: HIGUCHI Daisuke (VDR dai) <dai@debian.org>
Bug-Debian: https://bugs.debian.org/916869
Last-Update: 2018-12-27
Forwarded: no
@@ -207,7 +207,7 @@
(error "ƥ%sϤޤ" (if num (int-to-string num) "")))
(setq eelll-lesson-string (buffer-substring (match-beginning 1)
(match-end 1))
- eelll-lesson-no (string-to-int eelll-lesson-string))
+ eelll-lesson-no (string-to-number eelll-lesson-string))
(setq eelll-first-hand (looking-at "[Rr]"))
(setq eelll-second-hand (looking-at ".[Rr]"))
(setq eelll-upper-row (looking-at "..!"))
@@ -611,7 +611,7 @@ EmacscompletionμΤ
(if pos (cons 'hist pos) 'hist))))))
(if (string= str "")
nil
- (list (string-to-int str)))))
+ (list (string-to-number str)))))
(fset 'minibuffer-completion-help orig-minibuffer-completion-help))))
(defun eelll-minibuffer-completion-help ()
@@ -630,7 +630,7 @@ EmacscompletionμΤ
`display-completion-list'֤롣"
(princ " ---- ƥȰ ----\n")
(setq x (sort x (lambda (x y)
- (< (string-to-int x) (string-to-int y)))))
+ (< (string-to-number x) (string-to-number y)))))
(while x
(princ (car x))
(princ ":")
@@ -890,11 +890,11 @@ EmacscompletionμΤ
(defun eelll-current-time ()
(let ((str (current-time-string)))
(string-match "\\([0-9][0-9]\\):\\([0-9][0-9]\\):\\([0-9][0-9]\\)" str)
- (+ (* 3600 (string-to-int (substring str
+ (+ (* 3600 (string-to-number (substring str
(match-beginning 1)
(match-end 1))))
- (* 60 (string-to-int (substring str (match-beginning 2) (match-end 2))))
- (string-to-int (substring str (match-beginning 3) (match-end 3))))))
+ (* 60 (string-to-number (substring str (match-beginning 2) (match-end 2))))
+ (string-to-number (substring str (match-beginning 3) (match-end 3))))))
(defun eelll-percentage (num den)
(let ((res% (min 9999 (/ num (max 1 den)))))
@@ -47,7 +47,7 @@
;;; Code:
-(if (<= (string-to-int emacs-version) 18)
+(if (<= (string-to-number emacs-version) 18)
(error "tc-is19 cannot run on Nemacs/mule-1.x. Use Mule-2.0 or later!"))
;;;
@@ -26,7 +26,7 @@
;;; Code:
-(if (< (string-to-int emacs-version) 20)
+(if (< (string-to-number emacs-version) 20)
(error "tc-is20 cannot run on NEmacs/Mule. Use Emacs 20 or later!"))
;;;
@@ -26,10 +26,10 @@
(cond ((string-match "XEmacs" emacs-version)
'xemacs)
((and (boundp 'mule-version)
- (>= (string-to-int mule-version) 4))
+ (>= (string-to-number mule-version) 4))
'mule-4)
((and (boundp 'mule-version)
- (= (string-to-int mule-version) 3))
+ (= (string-to-number mule-version) 3))
'mule-3)
((numberp (string-match "^19" emacs-version))
'mule-2)
@@ -26,10 +26,10 @@
(cond ((string-match "XEmacs" emacs-version)
'xemacs)
((and (boundp 'mule-version)
- (>= (string-to-int mule-version) 4))
+ (>= (string-to-number mule-version) 4))
'mule-4)
((and (boundp 'mule-version)
- (= (string-to-int mule-version) 3))
+ (= (string-to-number mule-version) 3))
'mule-3)
((numberp (string-match "^19" emacs-version))
'mule-2)
@@ -26,10 +26,10 @@
(cond ((string-match "XEmacs" emacs-version)
'xemacs)
((and (boundp 'mule-version)
- (>= (string-to-int mule-version) 4))
+ (>= (string-to-number mule-version) 4))
'mule-4)
((and (boundp 'mule-version)
- (= (string-to-int mule-version) 3))
+ (= (string-to-number mule-version) 3))
'mule-3)
((numberp (string-match "^19" emacs-version))
'mule-2)
|