aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2007-12-10 11:47:45 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2007-12-10 11:47:45 +0000
commit9bc3f266832ec50c30802f60e4af5ef88aeadc69 (patch)
treee66da819d249c050d39ea219e724cd15a11aef52
parent95e2a29f51fb86ee958a261ac195d7e8c96d1741 (diff)
Emacs compatibility/API updates: string-to-int -> string-to-number
-rw-r--r--coq/coq.el2
-rw-r--r--generic/pg-pbrpm.el6
-rw-r--r--generic/pg-pgip-old.el4
-rw-r--r--generic/pg-pgip.el2
-rw-r--r--generic/pg-response.el4
-rw-r--r--generic/pg-user.el4
-rw-r--r--generic/pg-xhtml.el2
-rw-r--r--generic/proof-menu.el2
-rw-r--r--mmm/mmm-utils.el2
-rw-r--r--twelf/twelf-old.el8
-rw-r--r--x-symbol/lisp/x-symbol-emacs.el2
11 files changed, 19 insertions, 19 deletions
diff --git a/coq/coq.el b/coq/coq.el
index 442ce049..68ea9bc1 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -605,7 +605,7 @@ happen since one of them is necessarily set to t in coq-syntax.el."
((looking-at "subgoal \\([0-9]+\\) is:\n")
(goto-char (match-end 0))
(cons 'goal (match-string 1))
- (setq coq-current-goal (string-to-int (match-string 1))))
+ (setq coq-current-goal (string-to-number (match-string 1))))
((looking-at proof-shell-assumption-regexp)
(cons 'hyp (match-string 1)))
(t nil)))
diff --git a/generic/pg-pbrpm.el b/generic/pg-pbrpm.el
index d9f7f5a1..4393a502 100644
--- a/generic/pg-pbrpm.el
+++ b/generic/pg-pbrpm.el
@@ -219,7 +219,7 @@ The prover command is processed via pg-pbrpm-run-command."
(goto-char pos)
(if (search-forward-regexp "\\\\|\\([0-9]\\)" start t)
(progn
- (setq goalnum (string-to-int (match-string 1)))
+ (setq goalnum (string-to-number (match-string 1)))
(let ((len (- (match-end 0) (match-beginning 0))))
(setq end (- end len))
(setq start (- start len)))
@@ -356,7 +356,7 @@ The prover command is processed via pg-pbrpm-run-command."
(buffer (event-buffer event))
(r (pg-pbrpm-get-pos-info (pg-pbrpm-translate-position buffer pos))))
(if r (list
- (string-to-int (car r)) ; should not be an int for other prover
+ (string-to-number (car r)) ; should not be an int for other prover
(if (eq proof-goals-buffer buffer) (cdr r) (auto-select-arround-pos))
(if (and start end (eq proof-goals-buffer buffer)
(<= (marker-position start) pos) (<= pos (marker-position end)))
@@ -457,7 +457,7 @@ The prover command is processed via pg-pbrpm-run-command."
(setq r (pg-pbrpm-get-region-info start end))
(if r
(list
- (string-to-int (car r)) ; should not be an int for other prover
+ (string-to-number (car r)) ; should not be an int for other prover
(cdr r)
(pg-pbrpm-region-expression buffer start end))
(list 0 "none" (pg-pbrpm-region-expression buffer start end))))
diff --git a/generic/pg-pgip-old.el b/generic/pg-pgip-old.el
index b4672ee0..49287b7e 100644
--- a/generic/pg-pgip-old.el
+++ b/generic/pg-pgip-old.el
@@ -64,9 +64,9 @@
nil))))
(defun pg-pgip-old-interpret-int (value)
- ;; FIXME: string-to-int returns zero for non int string,
+ ;; FIXME: string-to-number returns zero for non int string,
;; should have better validation here.
- (string-to-int value))
+ (string-to-number value))
(defun pg-pgip-old-interpret-string (value)
value)
diff --git a/generic/pg-pgip.el b/generic/pg-pgip.el
index 8b12065d..8af6b0dc 100644
--- a/generic/pg-pgip.el
+++ b/generic/pg-pgip.el
@@ -500,7 +500,7 @@ Also sets local proverid and srcid variables for buffer."
(t (progn
(pg-pgip-warning "pg-pgip-interpret-value: received non-bool value %s" value)
nil))))
- ((eq type 'integer) (string-to-int value))
+ ((eq type 'integer) (string-to-number value))
((eq type 'string) value)
((eq (car-safe type) 'const) value)
((eq (car-safe type) 'choice)
diff --git a/generic/pg-response.el b/generic/pg-response.el
index efba8e12..015b111a 100644
--- a/generic/pg-response.el
+++ b/generic/pg-response.el
@@ -380,9 +380,9 @@ and start at the first error."
(beginning-of-line)
(point)))
(setq line (match-string 2)) ; may be unset
- (if line (setq line (string-to-int line)))
+ (if line (setq line (string-to-number line)))
(setq column (match-string 3)) ; may be unset
- (if column (setq column (string-to-int column)))
+ (if column (setq column (string-to-number column)))
(setq pg-response-next-error wanted-error)
(if (and
pg-next-error-filename-regexp
diff --git a/generic/pg-user.el b/generic/pg-user.el
index 0fcf66de..5339f2ed 100644
--- a/generic/pg-user.el
+++ b/generic/pg-user.el
@@ -750,7 +750,7 @@ last use time, to discourage saving these into the users database."
span
(if noerr
nil
- (error "No region to move past" num)))))
+ (error "No region to move past")))))
(defun pg-control-span-of (span)
"Return the controlling span of SPAN, or SPAN itself."
@@ -814,8 +814,8 @@ If NUM is negative, move upwards. Return new span."
(defun pg-fixup-children-span (span)
(if (span-property span 'controlspan)
- ;; WARNING: dynamic binding for new-span
(progn
+ ;; WARNING: dynamic binding for new-span
(set-span-property span 'controlspan new-span)
(list span))))
diff --git a/generic/pg-xhtml.el b/generic/pg-xhtml.el
index cdd84f8f..e7e1e604 100644
--- a/generic/pg-xhtml.el
+++ b/generic/pg-xhtml.el
@@ -59,7 +59,7 @@ BODY should contain a sequence of pg-xml writing commands."
(or (eq (car-safe (file-attributes dir)) 't)
(if (not (file-attributes dir))
(make-directory (pg-xhtml-dir) t)
- (error "pg-xhtml-write-tempfile: cannot open temp dir "
+ (error "Cannot open temp dir %s (in pg-xhtml-write-tempfile)"
(pg-xhtml-dir))))
`(with-temp-file ,file
(pg-xml-begin-write t)
diff --git a/generic/proof-menu.el b/generic/proof-menu.el
index 1ce3c577..2333541f 100644
--- a/generic/proof-menu.el
+++ b/generic/proof-menu.el
@@ -152,7 +152,7 @@ without adjusting window layout."
(easy-menu-define
proof-assistant-menu
proof-mode-map
- (concat "The menu for " proof-assistant)
+ `(concat "The menu for " proof-assistant)
(cons proof-assistant
(append
(proof-ass menu-entries)
diff --git a/mmm/mmm-utils.el b/mmm/mmm-utils.el
index 3d0a3741..bca62ec2 100644
--- a/mmm/mmm-utils.el
+++ b/mmm/mmm-utils.el
@@ -93,7 +93,7 @@ ON-STRING, if supplied, means to use the match data from a
subexp)
(save-match-data
(while (string-match "~\\([0-9]\\)" string)
- (setq subexp (string-to-int (match-string-no-properties 1 string))
+ (setq subexp (string-to-number (match-string-no-properties 1 string))
string (replace-match
(save-match-data
(set-match-data old-data)
diff --git a/twelf/twelf-old.el b/twelf/twelf-old.el
index ac5273ad..42d87d20 100644
--- a/twelf/twelf-old.el
+++ b/twelf/twelf-old.el
@@ -938,7 +938,7 @@ read a file name from the minibuffer."
(defun looked-at-nth-int (n)
(let ((str (looked-at-nth n)))
(if (null str) nil
- (string-to-int str))))
+ (string-to-number str))))
(defun twelf-error-parser (pt)
"Standard parser for Twelf errors.
@@ -1469,9 +1469,9 @@ server buffer."
(setq default-directory expanded-dir)
(pwd)))
((string-match "^set\\s +chatter\\s +\\([0-9]\\)+" input)
- (setq twelf-chatter (string-to-int (looked-at-string input 1))))
+ (setq twelf-chatter (string-to-number (looked-at-string input 1))))
;;((string-match "^set\\s +trace\\s +\\([0-9]\\)+" input)
- ;; (setq twelf-trace (string-to-int (looked-at-string input 1))))
+ ;; (setq twelf-trace (string-to-number (looked-at-string input 1))))
((string-match "^set\\s-+\\(\\S-+\\)\\s-+\\(\\w+\\)" input)
(if (assoc (looked-at-string input 1) *twelf-track-parms*)
(set (cdr (assoc (looked-at-string input 1) *twelf-track-parms*))
@@ -1865,7 +1865,7 @@ Starts a Twelf servers if necessary."
(let ((input (read-string "Limit (* or nat): ")))
(if (equal input "*")
input
- (let ((n (string-to-int input)))
+ (let ((n (string-to-number input)))
(if (and (integerp n) (> n 0))
n
(error "Number must be non-negative integer"))))))
diff --git a/x-symbol/lisp/x-symbol-emacs.el b/x-symbol/lisp/x-symbol-emacs.el
index 06025a48..382fc263 100644
--- a/x-symbol/lisp/x-symbol-emacs.el
+++ b/x-symbol/lisp/x-symbol-emacs.el
@@ -43,7 +43,7 @@ test."
((< emacs-minor-version minor) nil)
((null patch))
((string-match "^[0-9]+\\.[0-9]+\\.\\([0-9]+\\)" emacs-version)
- (>= (string-to-int (match-string 1 emacs-version)) patch)))))
+ (>= (string-to-number (match-string 1 emacs-version)) patch)))))
;;;===========================================================================