X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fmm-decode.el;h=49fc7e1f3d063980bcec1bbc10d455a491403fe3;hb=66c26c155163db358a8641e5165b0439f95e7133;hp=cade210759a775d228e422229ae7c7599d986813;hpb=b13f85408a6fec2f21e834c5a40b87b655ab116e;p=elisp%2Fgnus.git- diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index cade210..49fc7e1 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -114,6 +114,7 @@ The defined renderer types are: `lynx' : use lynx; `html2text' : use html2text; nil : use external viewer." + :version "21.4" :type '(choice (const w3) (const w3m) (const w3m-standalone) @@ -122,7 +123,6 @@ nil : use external viewer." (const html2text) (const nil) (function)) - :version "21.3" :group 'mime-display) (defvar mm-inline-text-html-renderer nil @@ -133,6 +133,7 @@ It is suggested to customize `mm-text-html-renderer' instead.") "If non-nil, Gnus will allow retrieving images in HTML contents with the tags. It has no effect on Emacs/w3. See also the documentation for the `mm-w3m-safe-url-regexp' variable." + :version "21.4" :type 'boolean :group 'mime-display) @@ -280,6 +281,7 @@ type inline." "application/pdf" "application/x-dvi") "List of media types for which the external viewer will not be killed when selecting a different article." + :version "21.4" :type '(repeat string) :group 'mime-display) @@ -381,6 +383,7 @@ If not set, `default-directory' will be used." (defcustom mm-external-terminal-program "xterm" "The program to start an external terminal." + :version "21.4" :type 'string :group 'mime-display) @@ -413,6 +416,7 @@ If not set, `default-directory' will be used." "Option of verifying signed parts. `never', not verify; `always', always verify; `known', only verify known protocols. Otherwise, ask user." + :version "21.4" :type '(choice (item always) (item never) (item :tag "only known protocols" known) @@ -575,11 +579,7 @@ Postpone undisplaying of viewers for types in (defun mm-dissect-singlepart (ctl cte &optional force cdl description id) (when (or force (if (equal "text/plain" (car ctl)) - ;; FIXME: This is a kludge. Proper fix is to make - ;; gnus-display-mime invoke mm-uu-dissect on all - ;; textual MIME parts, and stop using mm-fill-flowed - ;; here. - (and mm-fill-flowed (assoc 'format ctl)) + (assoc 'format ctl) t)) (mm-make-handle (mm-copy-to-buffer) ctl cte nil cdl description nil id))) @@ -616,18 +616,17 @@ Postpone undisplaying of viewers for types in (defun mm-copy-to-buffer () "Copy the contents of the current buffer to a fresh buffer." (save-excursion - (let ((flag enable-multibyte-characters) - (new-buffer (generate-new-buffer " *mm*"))) + (let ((obuf (current-buffer)) + beg) (goto-char (point-min)) (search-forward-regexp "^\n" nil t) - (save-restriction - (narrow-to-region (point) (point-max)) - (when flag - (set-buffer-multibyte nil)) - (copy-to-buffer new-buffer (point-min) (point-max)) - (when flag - (set-buffer-multibyte t))) - new-buffer))) + (setq beg (point)) + (set-buffer + ;; Preserve the data's unibyteness (for url-insert-file-contents). + (let ((default-enable-multibyte-characters (mm-multibyte-p))) + (generate-new-buffer " *mm*"))) + (insert-buffer-substring obuf beg) + (current-buffer)))) (defun mm-display-parts (handle &optional no-default) (if (stringp (car handle))