From 3b69efefa61b0498c0c4ab8ffee85139f3251858 Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 24 Sep 2001 07:16:23 +0000 Subject: [PATCH] * mime-view.el (mime-display-inline-fontify): Reset the visited filename. --- mime-view.el | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/mime-view.el b/mime-view.el index 0f56b4f..978166d 100644 --- a/mime-view.el +++ b/mime-view.el @@ -917,24 +917,28 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (save-current-buffer (set-buffer buffer) (buffer-disable-undo) + (kill-all-local-variables) (erase-buffer) (mime-insert-entity-content entity) - (if mode - (funcall mode) - (if (setq filename (mime-entity-filename entity)) - (set-visited-file-name filename)) - (set-auto-mode)) - (let ((font-lock-verbose nil)) - ;; I find font-lock a bit too verbose. - (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. - (static-when (fboundp 'extent-list) - (map-extents (lambda (ext ignored) - (set-extent-property ext 'duplicable t) - nil) - nil nil nil nil nil 'text-prop))) + (unwind-protect + (progn + (if mode + (funcall mode) + (if (setq filename (mime-entity-filename entity)) + (set-visited-file-name filename)) + (set-auto-mode)) + (let ((font-lock-verbose nil)) + ;; I find font-lock a bit too verbose. + (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. + (static-when (fboundp 'extent-list) + (map-extents (lambda (ext ignored) + (set-extent-property ext 'duplicable t) + nil) + nil nil nil nil nil 'text-prop))) + (set-visited-file-name nil))) (insert-buffer-substring buffer))) (defun mime-display-application/emacs-lisp (entity situation) -- 1.7.10.4