X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fmm-view.el;h=ed1ff3c569bce6a458058db06e73985f958417c1;hb=348ca824b5116f395afc7d69321c3cedf60b0d3f;hp=c76789bc226dcfd4fa712ef722d36edc8549383d;hpb=f643a0c9d4f336acfc87a89a18b9897f871f1aaf;p=elisp%2Fgnus.git- diff --git a/lisp/mm-view.el b/lisp/mm-view.el index c76789b..ed1ff3c 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -1,6 +1,7 @@ ;;; mm-view.el --- functions for viewing MIME objects -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -;; Free Software Foundation, Inc. + +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, +;; 2005 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; This file is part of GNU Emacs. @@ -17,8 +18,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -37,6 +38,14 @@ (autoload 'fill-flowed "flow-fill") (autoload 'html2text "html2text")) +(defvar gnus-article-mime-handles) +(defvar gnus-newsgroup-charset) +(defvar smime-keys) +(defvar w3m-cid-retrieve-function-alist) +(defvar w3m-current-buffer) +(defvar w3m-display-inline-images) +(defvar w3m-minor-mode-map) + (defvar mm-text-html-renderer-alist '((w3 . mm-inline-text-html-render-with-w3) (w3m . mm-inline-text-html-render-with-w3m) @@ -362,9 +371,9 @@ (goto-char (point-max)))) (save-restriction (narrow-to-region b (point)) - (set-text-properties (point-min) (point-max) nil) (when (or (equal type "enriched") (equal type "richtext")) + (set-text-properties (point-min) (point-max) nil) (ignore-errors (enriched-decode (point-min) (point-max)))) (mm-handle-set-undisplayer @@ -466,10 +475,10 @@ (unless (eq charset 'gnus-decoded) (mm-with-unibyte-buffer (mm-insert-part handle) - (mm-decompress-buffer (mail-content-type-get - (mm-handle-disposition handle) - 'filename) - t) + (mm-decompress-buffer + (or (mail-content-type-get (mm-handle-disposition handle) 'name) + (mail-content-type-get (mm-handle-disposition handle) 'filename)) + t t) (unless charset (setq coding-system (mm-find-buffer-file-coding-system))) (setq text (buffer-string)))) @@ -489,14 +498,16 @@ (t text))) (require 'font-lock) - ;; Inhibit font-lock this time (*-mode-hook might run - ;; `turn-on-font-lock') so that jit-lock may not turn off - ;; font-lock immediately after this. - (let ((font-lock-mode t)) - (funcall mode)) - (let ((font-lock-verbose nil)) - ;; I find font-lock a bit too verbose. - (font-lock-fontify-buffer)) + (let ((font-lock-maximum-size nil) + ;; Disable support modes, e.g., jit-lock, lazy-lock, etc. + (font-lock-mode-hook nil) + (font-lock-support-mode nil) + ;; I find font-lock a bit too verbose. + (font-lock-verbose nil)) + (funcall mode) + ;; The mode function might have already turned on font-lock. + (unless (symbol-value 'font-lock-mode) + (font-lock-fontify-buffer))) ;; By default, XEmacs font-lock uses non-duplicable text ;; properties. This code forces all the text properties ;; to be copied along with the text. @@ -586,9 +597,9 @@ (cadar smime-keys) (smime-get-key-by-email (completing-read - (concat "Decipher using which key? " - (if smime-keys (concat "(default " (caar smime-keys) ") ") - "")) + (concat "Decipher using key" + (if smime-keys (concat "(default " (caar smime-keys) "): ") + ": ")) smime-keys nil nil nil nil (car-safe (car-safe smime-keys)))))) (goto-char (point-min)) (while (search-forward "\r\n" nil t)