From e8ecf9408245e02b234d56492cdc76ca4a5cd876 Mon Sep 17 00:00:00 2001 From: keiichi Date: Thu, 15 Jun 2000 07:46:35 +0000 Subject: [PATCH] (nnshimbun-retrieve-url): Do not disable buffer multibyte, when use cached url content. (CAUTION: This is ``ad hok''. Please check ``WHY''.) --- lisp/nnshimbun.el | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lisp/nnshimbun.el b/lisp/nnshimbun.el index 99aaffa..78ffd9b 100644 --- a/lisp/nnshimbun.el +++ b/lisp/nnshimbun.el @@ -226,7 +226,11 @@ "Rertrieve URL contents and insert to current buffer." (let ((coding-system-for-read 'binary) (coding-system-for-write 'binary)) - (set-buffer-multibyte nil) + ;; XXX: Ad hok. + (when (or no-cache + (not (file-exists-p + (url-cache-create-filename url)))) + (set-buffer-multibyte nil)) ;; Following code is imported from `url-insert-file-contents'. (save-excursion (let ((old-asynch (default-value 'url-be-asynchronous)) @@ -547,10 +551,12 @@ (if (fboundp 'eword-encode-string) ;; For Semi-Gnus. (defun nnshimbun-mime-encode-string (string) - (mapconcat - #'identity - (split-string (eword-encode-string (nnweb-decode-entities-string string)) "\n") - "")) + (if (zerop (length string)) + "" + (mapconcat + #'identity + (split-string (eword-encode-string (nnweb-decode-entities-string string)) "\n") + ""))) ;; For pure Gnus. (defun nnshimbun-mime-encode-string (string) (mapconcat -- 1.7.10.4