;;; 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)
(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)
(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
;; 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))
"")
(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
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"
(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)))