From: keiichi Date: Thu, 15 Jun 2000 07:46:35 +0000 (+0000) Subject: (nnshimbun-retrieve-url): Do not disable buffer multibyte, when use cached url X-Git-Tag: nana-gnus-7_1_0_22~3 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8ecf9408245e02b234d56492cdc76ca4a5cd876;p=elisp%2Fgnus.git- (nnshimbun-retrieve-url): Do not disable buffer multibyte, when use cached url content. (CAUTION: This is ``ad hok''. Please check ``WHY''.) --- 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