]> git.eshelyaron.com Git - emacs.git/commitdiff
gnus-replace-in-string -> replace-regexp-in-string
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 11 Feb 2016 05:13:08 +0000 (16:13 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 11 Feb 2016 05:13:08 +0000 (16:13 +1100)
* lisp/gnus/gnus-util.el (gnus-replace-in-string): Declare
obsolete.  Transform all usages of it into
replace-regexp-in-string.

* lisp/gnus/mailcap.el (mailcap-replace-in-string): Remove.

17 files changed:
lisp/gnus/gnus-art.el
lisp/gnus/gnus-bookmark.el
lisp/gnus/gnus-gravatar.el
lisp/gnus/gnus-group.el
lisp/gnus/gnus-msg.el
lisp/gnus/gnus-sum.el
lisp/gnus/gnus-util.el
lisp/gnus/mail-source.el
lisp/gnus/mailcap.el
lisp/gnus/message.el
lisp/gnus/mm-decode.el
lisp/gnus/nnir.el
lisp/gnus/nnmaildir.el
lisp/gnus/nnml.el
lisp/gnus/nnrss.el
lisp/gnus/spam-report.el
lisp/gnus/spam.el

index 5a27bf8be69452ec2200fb2946e2bd11072daafa..f16a4c66ab63b5216361f234a0c6aa0a73a9bc3a 100644 (file)
@@ -7522,7 +7522,7 @@ address, `ask' if unsure and `invalid' if the string is invalid."
        (list gnus-button-mid-or-mail-heuristic-alist)
        (result 0) rate regexp lpartlen elem)
     (setq lpartlen
-         (length (gnus-replace-in-string mid-or-mail "^\\(.*\\)@.*$" "\\1")))
+         (length (replace-regexp-in-string mid-or-mail "^\\(.*\\)@.*$" "\\1")))
     (gnus-message 8 "`%s', length of local part=`%s'." mid-or-mail lpartlen)
     ;; Certain special cases...
     (when (string-match
@@ -7593,7 +7593,7 @@ address, `ask' if unsure and `invalid' if the string is invalid."
       (setq guessed
            ;; get rid of surrounding angles...
            (funcall pref
-                    (gnus-replace-in-string mid-or-mail "^<\\|>$" "")))
+                    (replace-regexp-in-string mid-or-mail "^<\\|>$" "")))
       (if (or (eq 'mid guessed) (eq 'mail guessed))
          (setq pref guessed)
        (setq pref 'ask)))
@@ -7625,13 +7625,13 @@ as a symbol to FUN."
   "Call `describe-function' when pushing the corresponding URL button."
   (describe-function
    (intern
-    (gnus-replace-in-string url gnus-button-handle-describe-prefix ""))))
+    (replace-regexp-in-string url gnus-button-handle-describe-prefix ""))))
 
 (defun gnus-button-handle-describe-variable (url)
   "Call `describe-variable' when pushing the corresponding URL button."
   (describe-variable
    (intern
-    (gnus-replace-in-string url gnus-button-handle-describe-prefix ""))))
+    (replace-regexp-in-string url gnus-button-handle-describe-prefix ""))))
 
 (defun gnus-button-handle-symbol (url)
 "Display help on variable or function.
@@ -7645,7 +7645,7 @@ Calls `describe-variable' or `describe-function'."
 (defun gnus-button-handle-describe-key (url)
   "Call `describe-key' when pushing the corresponding URL button."
   (let* ((key-string
-         (gnus-replace-in-string url gnus-button-handle-describe-prefix ""))
+         (replace-regexp-in-string url gnus-button-handle-describe-prefix ""))
         (keys (ignore-errors (eval `(kbd ,key-string)))))
     (if keys
        (describe-key keys)
@@ -7653,30 +7653,31 @@ Calls `describe-variable' or `describe-function'."
 
 (defun gnus-button-handle-apropos (url)
   "Call `apropos' when pushing the corresponding URL button."
-  (apropos (gnus-replace-in-string url gnus-button-handle-describe-prefix "")))
+  (apropos (replace-regexp-in-string
+           url gnus-button-handle-describe-prefix "")))
 
 (defun gnus-button-handle-apropos-command (url)
   "Call `apropos' when pushing the corresponding URL button."
   (apropos-command
-   (gnus-replace-in-string url gnus-button-handle-describe-prefix "")))
+   (replace-regexp-in-string url gnus-button-handle-describe-prefix "")))
 
 (defun gnus-button-handle-apropos-variable (url)
   "Call `apropos' when pushing the corresponding URL button."
   (funcall
    (if (fboundp 'apropos-variable) 'apropos-variable 'apropos)
-   (gnus-replace-in-string url gnus-button-handle-describe-prefix "")))
+   (replace-regexp-in-string url gnus-button-handle-describe-prefix "")))
 
 (defun gnus-button-handle-apropos-documentation (url)
   "Call `apropos' when pushing the corresponding URL button."
   (funcall
    (if (fboundp 'apropos-documentation) 'apropos-documentation 'apropos)
-   (gnus-replace-in-string url gnus-button-handle-describe-prefix "")))
+   (replace-regexp-in-string url gnus-button-handle-describe-prefix "")))
 
 (defun gnus-button-handle-library (url)
   "Call `locate-library' when pushing the corresponding URL button."
   (gnus-message 9 "url=`%s'" url)
   (let* ((lib (locate-library url))
-        (file (gnus-replace-in-string (or lib "") "\\.elc" ".el")))
+        (file (replace-regexp-in-string (or lib "") "\\.elc" ".el")))
     (if (not lib)
        (gnus-message 1 "Cannot locale library `%s'." url)
       (find-file-read-only file))))
@@ -8274,7 +8275,7 @@ url is put as the `gnus-button-url' overlay property on the button."
   "Fetch a man page."
   (gnus-message 9 "`%s' `%s'" gnus-button-man-handler url)
   (when (eq gnus-button-man-handler 'woman)
-    (setq url (gnus-replace-in-string url "([1-9][X1a-z]*).*\\'" "")))
+    (setq url (replace-regexp-in-string url "([1-9][X1a-z]*).*\\'" "")))
   (gnus-message 9 "`%s' `%s'" gnus-button-man-handler url)
   (funcall gnus-button-man-handler url))
 
@@ -8289,8 +8290,8 @@ url is put as the `gnus-button-url' overlay property on the button."
             ")" (gnus-url-unhex-string (match-string 2 url)))))
    ((string-match "([^)\"]+)[^\"]+" url)
     (setq url
-         (gnus-replace-in-string
-          (gnus-replace-in-string url "[\n\t ]+" " ") "\"" ""))
+         (replace-regexp-in-string
+          (replace-regexp-in-string url "[\n\t ]+" " ") "\"" ""))
     (gnus-info-find-node url))
    (t (error "Can't parse %s" url))))
 
@@ -8428,7 +8429,7 @@ url is put as the `gnus-button-url' overlay property on the button."
       (if (fboundp func)
          (funcall func)
        (message-position-on-field (caar args)))
-      (insert (gnus-replace-in-string
+      (insert (replace-regexp-in-string
               (mapconcat 'identity (reverse (cdar args)) ", ")
               "\r\n" "\n" t))
       (setq args (cdr args)))
index a16ac531ba038d3b4390e8d25338b4e0220fe003..cb3de92a2aefd553ab9657682dcfa99e5f198906 100644 (file)
@@ -226,7 +226,7 @@ So the cdr of each bookmark is an alist too.")
                   "-" (car subject) "-" (cadr subject)))
         (default-name-1
           ;; Strip "[]" chars from the bookmark name:
-          (gnus-replace-in-string default-name-0 "[]_[]" ""))
+          (replace-regexp-in-string default-name-0 "[]_[]" ""))
         (name (read-from-minibuffer
                (format "Set bookmark (%s): " default-name-1)
                nil nil nil nil
index 77fce259b4b3930397959d17e5abe393ea38f880..28caed2e80d5c45f415b6a254dc438385f4a4709 100644 (file)
@@ -94,7 +94,7 @@ Set image category to CATEGORY."
                  (mail-address (cadr address)))
              (when (if real-name
                        (re-search-forward
-                        (concat (gnus-replace-in-string
+                        (concat (replace-regexp-in-string
                                  (regexp-quote real-name) "[\t ]+" "[\t\n ]+")
                                 "\\|"
                                 (regexp-quote mail-address))
index 838e7470856a2b55b34904c93ac47eb9832ba410..190acf13870a7a542df4cab8b440cd2131e3f8d7 100644 (file)
@@ -2218,7 +2218,7 @@ if it is not a list."
       (setq group
            (mm-encode-coding-string
             group (gnus-group-name-charset nil group))))
-    (gnus-replace-in-string group "\n" "")))
+    (replace-regexp-in-string group "\n" "")))
 
 ;;;###autoload
 (defun gnus-fetch-group (group &optional articles)
@@ -2476,8 +2476,8 @@ the bug number, and browsing the URL must return mbox output."
        (while (re-search-forward "^To: " nil t)
          (end-of-line)
          (insert (format ", %s@%s" (car ids)
-                         (gnus-replace-in-string
-                          (gnus-replace-in-string mbox-url "^http://" "")
+                         (replace-regexp-in-string
+                          (replace-regexp-in-string mbox-url "^http://" "")
                           "/.*$" ""))))))
     (gnus-group-read-ephemeral-group
      (format "nndoc+ephemeral:bug#%s"
index 8f0dbfdc2057de94348f182b02bc2624e322c013..5bf0f7cb0bf2271fda074559c646b8093db63cb1 100644 (file)
@@ -1138,7 +1138,7 @@ See the variable `gnus-user-agent'."
           (gnus-v
            (when (memq 'gnus gnus-user-agent)
              (concat "Gnus/"
-                     (gnus-replace-in-string
+                     (replace-regexp-in-string
                       (format "%1.8f" (gnus-continuum-version gnus-version))
                       "0+\\'" "")
                      " (" gnus-version ")")))
index b85a4034cd1b67705beefd6a619e70dade81f31e..a8a4c3faebcc97414d6c5170b971689484fed47f 100644 (file)
@@ -9086,7 +9086,7 @@ non-numeric or nil fetch the number specified by the
   (gnus-warp-to-article)
   (when (and (stringp message-id)
             (not (zerop (length message-id))))
-    (setq message-id (gnus-replace-in-string message-id " " ""))
+    (setq message-id (replace-regexp-in-string message-id " " ""))
     ;; Construct the correct Message-ID if necessary.
     ;; Suggested by tale@pawl.rpi.edu.
     (unless (string-match "^<" message-id)
@@ -9564,10 +9564,10 @@ article.  If BACKWARD (the prefix) is non-nil, search backward instead."
 
 (defun gnus-summary-print-truncate-and-quote (string &optional len)
   "Truncate to LEN and quote all \"(\"'s in STRING."
-  (gnus-replace-in-string (if (and len (> (length string) len))
-                             (substring string 0 len)
-                           string)
-                         "[()]" "\\\\\\&"))
+  (replace-regexp-in-string (if (and len (> (length string) len))
+                               (substring string 0 len)
+                             string)
+                           "[()]" "\\\\\\&"))
 
 (defun gnus-summary-print-article (&optional filename n)
   "Generate and print a PostScript image of the process-marked (mail) articles.
index a883de9b083c7a9cd19c1b69d645990ac9393aae..950bb7feb95c8dbaa0fbbc270f4e980d66122447 100644 (file)
 (autoload 'nnheader-replace-chars-in-string "nnheader")
 (autoload 'mail-header-remove-comments "mail-parse")
 
-(eval-and-compile
-  (cond
-   ;; Prefer `replace-regexp-in-string' (present in Emacs, XEmacs 21.5,
-   ;; SXEmacs 22.1.4) over `replace-in-string'.  The latter leads to inf-loops
-   ;; on empty matches:
-   ;;   (replace-in-string "foo" "/*$" "/")
-   ;;   (replace-in-string "xe" "\\(x\\)?" "")
-   ((fboundp 'replace-regexp-in-string)
-    (defun gnus-replace-in-string  (string regexp newtext &optional literal)
-      "Replace all matches for REGEXP with NEWTEXT in STRING.
+(defun gnus-replace-in-string  (string regexp newtext &optional literal)
+  "Replace all matches for REGEXP with NEWTEXT in STRING.
 If LITERAL is non-nil, insert NEWTEXT literally.  Return a new
 string containing the replacements.
 
 This is a compatibility function for different Emacsen."
-      (replace-regexp-in-string regexp newtext string nil literal)))
-   ((fboundp 'replace-in-string)
-    (defalias 'gnus-replace-in-string 'replace-in-string))))
+  (declare (obsolete replace-regexp-in-string "25.2"))
+  (replace-regexp-in-string regexp newtext string nil literal))
 
 (defun gnus-boundp (variable)
   "Return non-nil if VARIABLE is bound and non-nil."
@@ -431,7 +422,7 @@ Cache the result as a text property stored in DATE."
 
 (defun gnus-mode-string-quote (string)
   "Quote all \"%\"'s in STRING."
-  (gnus-replace-in-string string "%" "%%"))
+  (replace-regexp-in-string string "%" "%%"))
 
 ;; Make a hash table (default and minimum size is 256).
 ;; Optional argument HASHSIZE specifies the table size.
index f4a9e191010f0264b1135b8351f8539cc2d5b36b..f9c89f52cb74022ac8f02ccf6183d404c4b13006 100644 (file)
@@ -603,7 +603,7 @@ If CONFIRM is non-nil, ask for confirmation before removing a file."
          currday (+ currday (* low2days (nth 1 (current-time)))))
     (while files
       (let* ((ffile (car files))
-            (bfile (gnus-replace-in-string
+            (bfile (replace-regexp-in-string
                     ffile "\\`.*/\\([^/]+\\)\\'" "\\1"))
             (filetime (nth 5 (file-attributes ffile)))
             (fileday (* (car filetime) high2days))
index bf7ba0817ea1fda558d627a4b770e21a22018285..85d0411a1e37ac7dfd4d13f76f8898c2616963a8 100644 (file)
     (autoload 'mm-delete-duplicates "mm-util")
     'mm-delete-duplicates))
 
-;; `mailcap-replace-in-string' is an alias like `gnus-replace-in-string'.
-(eval-and-compile
-  (cond
-   ((fboundp 'replace-regexp-in-string)
-    (defun mailcap-replace-in-string  (string regexp newtext &optional literal)
-      "Replace all matches for REGEXP with NEWTEXT in STRING.
-If LITERAL is non-nil, insert NEWTEXT literally.  Return a new
-string containing the replacements.
-This is a compatibility function for different Emacsen."
-      (replace-regexp-in-string regexp newtext string nil literal)))
-   ((fboundp 'replace-in-string)
-    (defalias 'mailcap-replace-in-string 'replace-in-string))))
-
 (defgroup mailcap nil
   "Definition of viewers for MIME types."
   :version "21.1"
@@ -1047,16 +1034,18 @@ If FORCE, re-parse even if already parsed."
         (commands
          ;; Command strings from `viewer' field of the MIME info
          (mailcap-delete-duplicates
-          (delq nil (mapcar (lambda (mime-info)
-                              (let ((command (cdr (assoc 'viewer mime-info))))
-                                (if (stringp command)
-                                    (mailcap-replace-in-string
-                                     ;; Replace mailcap's `%s' placeholder
-                                     ;; with dired's `?' placeholder
-                                     (mailcap-replace-in-string
-                                      ;; Remove the final filename placeholder
-                                      command "[ \t\n]*\\('\\)?%s\\1?[ \t\n]*\\'" "" t)
-                                     "%s" "?" t))))
+          (delq nil (mapcar
+                     (lambda (mime-info)
+                       (let ((command (cdr (assoc 'viewer mime-info))))
+                         (if (stringp command)
+                             (replace-regexp-in-string
+                              ;; Replace mailcap's `%s' placeholder
+                              ;; with dired's `?' placeholder
+                              (replace-regexp-in-string
+                               ;; Remove the final filename placeholder
+                               command "[ \t\n]*\\('\\)?%s\\1?[ \t\n]*\\'" ""
+                               nil t)
+                              "%s" "?" nil t))))
                             common-mime-info)))))
     commands))
 
index 3c3105649edcddce030d549e8cedfe6048a4d313..11c1012637803714e7f0989094328f3f261a58a4 100644 (file)
@@ -8373,8 +8373,8 @@ From headers in the original article."
     (let ((value (message-field-value header)))
       (dolist (string (mail-header-parse-addresses value 'raw))
        (setq string
-             (gnus-replace-in-string
-              (gnus-replace-in-string string "^ +\\| +$" "") "\n" ""))
+             (replace-regexp-in-string
+              (replace-regexp-in-string string "^ +\\| +$" "") "\n" ""))
        (ecomplete-add-item 'mail (car (mail-header-parse-address string))
                            string))))
   (ecomplete-save))
index 06159bcdd93d2364d0ac73e0961a7f5a49529379..4df653c6009faebc6da8fc75de6ee940ab026dc2 100644 (file)
@@ -28,7 +28,6 @@
 (eval-when-compile (require 'cl))
 
 (autoload 'gnus-map-function "gnus-util")
-(autoload 'gnus-replace-in-string "gnus-util")
 (autoload 'gnus-read-shell-command "gnus-util")
 
 (autoload 'mm-inline-partial "mm-partial")
@@ -1360,12 +1359,12 @@ string if you do not like underscores."
 
 (defun mm-file-name-delete-control (filename)
   "Delete control characters from FILENAME."
-  (gnus-replace-in-string filename "[\x00-\x1f\x7f]" ""))
+  (replace-regexp-in-string filename "[\x00-\x1f\x7f]" ""))
 
 (defun mm-file-name-delete-gotchas (filename)
   "Delete shell gotchas from FILENAME."
-  (setq filename (gnus-replace-in-string filename "[<>|]" ""))
-  (gnus-replace-in-string filename "^[.-]+" ""))
+  (setq filename (replace-regexp-in-string filename "[<>|]" ""))
+  (replace-regexp-in-string filename "^[.-]+" ""))
 
 (defun mm-save-part (handle &optional prompt)
   "Write HANDLE to a file.
index 560ba8ad2e5e9a12fb1d566ee7f795865966340b..eb436f51df5140ef1030cafa61d424313468ebf0 100644 (file)
@@ -928,17 +928,17 @@ ready to be added to the list of search results."
 
     ;; Set group to dirnam without any leading dots or slashes,
     ;; and with all subsequent slashes replaced by dots
-    (let ((group (gnus-replace-in-string
-                 (gnus-replace-in-string dirnam "^[./\\]" "" t)
-                 "[/\\]" "." t)))
-
-    (vector (gnus-group-full-name group server)
-           (if (string-match "\\`nnmaildir:" (gnus-group-server server))
-               (nnmaildir-base-name-to-article-number
-                (substring article 0 (string-match ":" article))
-                group nil)
-             (string-to-number article))
-           (string-to-number score)))))
+    (let ((group (replace-regexp-in-string
+                 (replace-regexp-in-string dirnam "^[./\\]" "" nil t)
+                 "[/\\]" "." nil t)))
+
+      (vector (gnus-group-full-name group server)
+             (if (string-match "\\`nnmaildir:" (gnus-group-server server))
+                 (nnmaildir-base-name-to-article-number
+                  (substring article 0 (string-match ":" article))
+                  group nil)
+               (string-to-number article))
+             (string-to-number score)))))
 
 ;;; Search Engine Interfaces:
 
@@ -1340,9 +1340,10 @@ Tested with swish-e-2.0.1 on Windows NT 4.0."
            ;; eliminate all ".", "/", "\" from beginning. Always matches.
             (string-match "^[./\\]*\\(.*\\)$" dirnam)
             ;; "/" -> "."
-            (setq group (gnus-replace-in-string (match-string 1 dirnam) "/" "."))
+            (setq group (replace-regexp-in-string
+                        (match-string 1 dirnam) "/" "."))
             ;; Windows "\\" -> "."
-            (setq group (gnus-replace-in-string group "\\\\" "."))
+            (setq group (replace-regexp-in-string group "\\\\" "."))
 
             (push (vector (gnus-group-full-name group server)
                           (string-to-number artno)
@@ -1414,7 +1415,7 @@ Tested with swish-e-2.0.1 on Windows NT 4.0."
        (when (string-match prefix dirnam)
          (setq dirnam (replace-match "" t t dirnam)))
        (push (vector (gnus-group-full-name
-                       (gnus-replace-in-string dirnam "/" ".") server)
+                       (replace-regexp-in-string dirnam "/" ".") server)
                      (string-to-number artno)
                      (string-to-number score))
              artlist))
@@ -1612,9 +1613,8 @@ actually)."
                                  group
                                (if (file-directory-p
                                     (setq group
-                                          (gnus-replace-in-string
-                                           group
-                                           "\\." "/" t)))
+                                          (replace-regexp-in-string
+                                           group "\\." "/" nil t)))
                                    group))))))
                     (unless group
                       (error "Cannot locate directory for group"))
index 70a3dd99be7d9490dad20bb3fe298f3974cc80f7..4b154432c7e581212d809f00c2a7f9ec3f534709 100644 (file)
@@ -656,13 +656,13 @@ by nnmaildir-request-article.")
   (if (zerop n) 1 (1- (lsh 1 (1+ (logb n))))))
 
 (defun nnmaildir--system-name ()
-  (gnus-replace-in-string
-   (gnus-replace-in-string
-    (gnus-replace-in-string
+  (replace-regexp-in-string
+   (replace-regexp-in-string
+    (replace-regexp-in-string
      (system-name)
-     "\\\\" "\\134" 'literal)
-    "/" "\\057" 'literal)
-   ":" "\\072" 'literal))
+     "\\\\" "\\134" nil 'literal)
+    "/" "\\057" nil 'literal)
+   ":" "\\072" nil 'literal))
 
 (defun nnmaildir-request-type (_group &optional _article)
   'mail)
@@ -955,8 +955,8 @@ by nnmaildir-request-article.")
                        pgname (nnmaildir--pgname nnmaildir--cur-server pgname)
                        group (symbol-value group)
                        ro (nnmaildir--param pgname 'read-only))
-                 (insert (gnus-replace-in-string
-                          (nnmaildir--grp-name group) " " "\\ " t)
+                 (insert (replace-regexp-in-string
+                          (nnmaildir--grp-name group) " " "\\ " nil t)
                          " ")
                   (princ (nnmaildir--group-maxnum nnmaildir--cur-server group)
                         nntp-server-buffer)
@@ -985,7 +985,7 @@ by nnmaildir-request-article.")
          (princ (nnmaildir--group-maxnum nnmaildir--cur-server group)
                 nntp-server-buffer)
          (insert " "
-                 (gnus-replace-in-string gname " " "\\ " t)
+                 (replace-regexp-in-string gname " " "\\ " nil t)
                  "\n")))))
   'group)
 
@@ -1116,7 +1116,7 @@ by nnmaildir-request-article.")
        (insert " ")
        (princ (nnmaildir--group-maxnum nnmaildir--cur-server group)
               nntp-server-buffer)
-       (insert " " (gnus-replace-in-string gname " " "\\ " t) "\n")
+       (insert " " (replace-regexp-in-string gname " " "\\ " nil t) "\n")
        t))))
 
 (defun nnmaildir-request-create-group (gname &optional server _args)
@@ -1278,7 +1278,7 @@ by nnmaildir-request-article.")
              (insert "\t" (nnmaildir--nov-get-beg nov) "\t"
                      (nnmaildir--art-msgid article) "\t"
                      (nnmaildir--nov-get-mid nov) "\tXref: nnmaildir "
-                     (gnus-replace-in-string gname " " "\\ " t) ":")
+                     (replace-regexp-in-string gname " " "\\ " nil t) ":")
              (princ num nntp-server-buffer)
              (insert "\t" (nnmaildir--nov-get-end nov) "\n"))))
     (catch 'return
index 3350933f9499caaf8d0d5ddaa98e4ee114909b2a..28dcd9aad4aee225585ad6b185fb9068bb060de7 100644 (file)
@@ -1077,7 +1077,7 @@ Use the nov database for the current group if available."
                ;; 1/ Move the article to a new file:
                (let* ((oldfile (nnml-article-to-file old-number))
                       (newfile
-                       (gnus-replace-in-string
+                       (replace-regexp-in-string
                         oldfile
                         ;; nnml-use-compressed-files might be any string, but
                         ;; probably it's sufficient to take into account only
index bef8203ef27959c897ed50909aa194e5d505c695..857c58a478e02e0c3a2a42c21b398ff74f26b825 100644 (file)
@@ -111,7 +111,7 @@ for decoding when the cdr that the data specify is not available.")
 ;;; Interface functions
 
 (defsubst nnrss-format-string (string)
-  (gnus-replace-in-string string " *\n *" " "))
+  (replace-regexp-in-string string " *\n *" " "))
 
 (defun nnrss-decode-group-name (group)
   (if (and group (mm-coding-system-p 'utf-8))
@@ -292,7 +292,7 @@ for decoding when the cdr that the data specify is not available.")
                        (let ((rfc2047-encoding-type 'mime)
                              rfc2047-encode-max-chars)
                          (rfc2047-encode-string
-                          (gnus-replace-in-string group "[\t\n ]+" "_")))))
+                          (replace-regexp-in-string group "[\t\n ]+" "_")))))
        (when nnrss-content-function
          (funcall nnrss-content-function e group article))))
     (cond
@@ -805,8 +805,8 @@ It is useful when `(setq nnrss-use-local t)'."
                   (nnrss-node-just-text node)
                 node))
         (cleaned-text (if text
-                          (gnus-replace-in-string
-                           (gnus-replace-in-string
+                          (replace-regexp-in-string
+                           (replace-regexp-in-string
                             text "^[\000-\037\177]+\\|^ +\\| +$" "")
                            "\r\n" "\n"))))
     (if (string-equal "" cleaned-text)
index 0086dd14792cf4a9eb559060ba9155000581991d..7ebff197b2bd4564e9e33dec82b6ccb03489cb0c 100644 (file)
@@ -162,9 +162,9 @@ submitted at once.  Internal variable.")
         rpt-host
         (concat
          "/"
-         (gnus-replace-in-string
-          (gnus-replace-in-string
-           (gnus-replace-in-string
+         (replace-regexp-in-string
+          (replace-regexp-in-string
+           (replace-regexp-in-string
             (mail-header-xref (gnus-summary-article-header article))
             "/raw" ":silent")
            "^.*article.gmane.org/" "")
@@ -207,7 +207,7 @@ submitted at once.  Internal variable.")
            (when host
              (when (string-equal "permalink.gmane.org" host)
                (setq host rpt-host)
-               (setq report (gnus-replace-in-string
+               (setq report (replace-regexp-in-string
                              report "/\\([0-9]+\\)$" ":\\1")))
              (setq url (format "http://%s%s" host report)))
            (if (not (and host report url))
@@ -227,7 +227,7 @@ the function specified by `spam-report-url-ping-function'."
 
 (defcustom spam-report-user-mail-address
   (and (stringp user-mail-address)
-       (gnus-replace-in-string user-mail-address "@" "<at>"))
+       (replace-regexp-in-string user-mail-address "@" "<at>"))
   "Mail address of this user used for spam reports to Gmane.
 This is initialized based on `user-mail-address'."
   :type '(choice string
index ab0584fdcf6a26940701af8258d851742d093bb0..39181eaa62f61b931fd3c2cb583f14559cea1b8b 100644 (file)
@@ -1199,7 +1199,7 @@ Note this has to be fast."
     (if header-content
         (cond
          ((eq header 'X-Spam-Status)
-          (string-to-number (gnus-replace-in-string
+          (string-to-number (replace-regexp-in-string
                              header-content
                              spam-spamassassin-score-regexp
                              "\\1")))
@@ -1207,8 +1207,8 @@ Note this has to be fast."
          ((string-match "( pR: \\([0-9.-]+\\)" header-content)
           (- (string-to-number (match-string 1 header-content))))
          ((eq header 'X-Bogosity)
-          (string-to-number (gnus-replace-in-string
-                             (gnus-replace-in-string
+          (string-to-number (replace-regexp-in-string
+                             (replace-regexp-in-string
                               header-content
                               ".*spamicity=" "")
                              ",.*" "")))