]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/nnrss.el
; Merge from origin/emacs-25
[gnu-emacs] / lisp / gnus / nnrss.el
index bef8203ef27959c897ed50909aa194e5d505c695..6168e5a281b1cf64172ebf791279e60a9e62f5d4 100644 (file)
@@ -111,11 +111,11 @@ 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 " *\n *" " " string))
 
 (defun nnrss-decode-group-name (group)
   (if (and group (mm-coding-system-p 'utf-8))
-      (setq group (mm-decode-coding-string group 'utf-8))
+      (setq group (decode-coding-string group 'utf-8))
     group))
 
 (deffoo nnrss-retrieve-headers (articles &optional group server fetch-old)
@@ -240,7 +240,6 @@ for decoding when the cdr that the data specify is not available.")
                          (max 1 (/ (* (window-width window) 7) 8))))
                  (fill-region (point) (point-max))
                  (goto-char (point-max))
-                 ;; XEmacs version of `fill-region' inserts newline.
                  (unless (bolp)
                    (insert "\n"))))
              (when (or link enclosure)
@@ -292,7 +291,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 "[\t\n ]+" "_" group)))))
        (when nnrss-content-function
          (funcall nnrss-content-function e group article))))
     (cond
@@ -412,7 +411,7 @@ otherwise return nil."
       ;; Decode text according to the encoding attribute.
       (when (setq cs (nnrss-get-encoding))
        (insert (prog1
-                   (mm-decode-coding-string (buffer-string) cs)
+                   (decode-coding-string (buffer-string) cs)
                  (erase-buffer)
                  (mm-enable-multibyte))))
       (goto-char (point-min))
@@ -583,12 +582,11 @@ which RSS 2.0 allows."
   "")
 
 (defun nnrss-insert (url)
-  (mm-with-unibyte-current-buffer
-    (condition-case err
-       (mm-url-insert url)
-      (error (if (or debug-on-quit debug-on-error)
-                (signal (car err) (cdr err))
-              (message "nnrss: Failed to fetch %s" url))))))
+  (condition-case err
+      (mm-url-insert url)
+    (error (if (or debug-on-quit debug-on-error)
+              (signal (car err) (cdr err))
+            (message "nnrss: Failed to fetch %s" url)))))
 
 (defun nnrss-decode-entities-string (string)
   (if string
@@ -758,7 +756,7 @@ Read the file and attempt to subscribe to each Feed in the file."
 Export subscriptions to a buffer in OPML Format."
   (interactive)
   (with-current-buffer (get-buffer-create "*OPML Export*")
-    (mm-set-buffer-file-coding-system 'utf-8)
+    (set-buffer-file-coding-system 'utf-8)
     (insert "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
            "<!-- OPML generated by Emacs Gnus' nnrss.el -->\n"
            "<opml version=\"1.1\">\n"
@@ -805,10 +803,11 @@ 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
-                            text "^[\000-\037\177]+\\|^ +\\| +$" "")
-                           "\r\n" "\n"))))
+                          (replace-regexp-in-string
+                           "\r\n" "\n"
+                           (replace-regexp-in-string
+                            "^[\000-\037\177]+\\|^ +\\| +$" ""
+                            text)))))
     (if (string-equal "" cleaned-text)
        nil
       cleaned-text)))