aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--generic/pg-user.el6
-rw-r--r--generic/proof-menu.el6
-rw-r--r--generic/proof-shell.el4
-rw-r--r--generic/proof-utils.el5
-rw-r--r--lib/proof-compat.el9
-rw-r--r--plastic/plastic.el4
6 files changed, 14 insertions, 20 deletions
diff --git a/generic/pg-user.el b/generic/pg-user.el
index dac20424..b92280da 100644
--- a/generic/pg-user.el
+++ b/generic/pg-user.el
@@ -301,9 +301,9 @@ is off (nil)."
(interactive
(list (read-string "Command: "
(if (and current-prefix-arg (region-active-p))
- (replace-in-string
- (buffer-substring (region-beginning) (region-end))
- "[ \t\n]+" " "))
+ (replace-regexp-in-string
+ "[ \t\n]+" " "
+ (buffer-substring (region-beginning) (region-end))))
'proof-minibuffer-history)))
(if (and proof-strict-state-preserving
proof-state-preserving-p
diff --git a/generic/proof-menu.el b/generic/proof-menu.el
index a806293f..2f9da74f 100644
--- a/generic/proof-menu.el
+++ b/generic/proof-menu.el
@@ -741,10 +741,10 @@ KEY is the optional key binding."
(let ((grp (get symbol 'pggroup))
(nm (symbol-name symbol)))
(upcase-initials
- (replace-in-string
+ (replace-regexp-in-string "-" " "
;; strip the group name from the menu entry name.
- (if grp (replace-in-string nm (concat (downcase grp) ":") "") nm)
- "-" " "))))
+ (if grp (replace-regexp-in-string (concat (downcase grp) ":") "" nm)
+ nm)))))
(defun proof-menu-entry-for-setting (symbol setting type descr)
(let ((entry-name (proof-menu-entry-name symbol))
diff --git a/generic/proof-shell.el b/generic/proof-shell.el
index e2928866..c967c58c 100644
--- a/generic/proof-shell.el
+++ b/generic/proof-shell.el
@@ -273,8 +273,8 @@ Does nothing if proof assistant is already running."
(cons
(if (getenv "LANG")
(format "LANG=%s"
- (replace-in-string (getenv "LANG")
- "\\.UTF-8" ""))
+ (replace-regexp-in-string "\\.UTF-8" ""
+ (getenv "LANG")))
"LANG=C")
(delete
(concat "LANG=" (getenv "LANG"))
diff --git a/generic/proof-utils.el b/generic/proof-utils.el
index 98fb6e99..41988176 100644
--- a/generic/proof-utils.el
+++ b/generic/proof-utils.el
@@ -707,7 +707,7 @@ The name of the defined function is returned."
(defun proof-escape-keymap-doc (string)
;; avoid work of substitute-command-keys
- (replace-in-string string "\\\\" "\\\\=\\\\"))
+ (replace-regexp-in-string "\\\\" "\\\\=\\\\" string))
(defmacro proof-defshortcut (fn string &optional key)
"Define shortcut function FN to insert STRING, optional keydef KEY.
@@ -736,8 +736,7 @@ KEY is added onto proof-assistant map."
(defun ,fn ()
,(concat "Command to send "
(if (stringp string)
- (replace-in-string
- string "\\\\" "\\\\=") ;; for substitute-command-keys
+ (proof-escape-keymap-doc string)
"an instruction")
" to the proof assistant.")
(interactive)
diff --git a/lib/proof-compat.el b/lib/proof-compat.el
index e06b0297..a37ddab9 100644
--- a/lib/proof-compat.el
+++ b/lib/proof-compat.el
@@ -18,9 +18,10 @@
;;
(eval-when-compile
- (require 'cl)
(require 'easymenu))
+(require 'cl)
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Architecture flags
@@ -89,12 +90,6 @@ The value returned is the value of the last form in BODY."
(progn ,@body)
(select-frame ,old-frame))))))
-
-;; FIXME: rewrite uses of this
-(defun replace-in-string (str regexp newtext &optional literal)
- (replace-regexp-in-string regexp newtext str 'fixedcase literal))
-
-
;; An implemenation of buffer-syntactic-context for GNU Emacs
(defun proof-buffer-syntactic-context-emulate (&optional buffer)
"Return the syntactic context of BUFFER at point.
diff --git a/plastic/plastic.el b/plastic/plastic.el
index b02d2065..8fc134ed 100644
--- a/plastic/plastic.el
+++ b/plastic/plastic.el
@@ -563,8 +563,8 @@ We assume that module identifiers coincide with file names."
))
(t
(incf i)))) ; else include.
- (setq string (replace-in-string string " +" " "))
- (setq string (replace-in-string string "^ +" ""))
+ (setq string (replace-regexp-in-string " +" " " string))
+ (setq string (replace-regexp-in-string "^ +" "" string))
(if (string-match "^\\s-*$" string)
(setq string (concat "ECHO comment line" proof-terminal-string))
string))))