From: ueno Date: Mon, 24 Sep 2001 07:16:23 +0000 (+0000) Subject: * mime-view.el (mime-display-inline-fontify): Reset the visited filename. X-Git-Tag: emiko-1_14_0~14 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3b69efefa61b0498c0c4ab8ffee85139f3251858;p=elisp%2Fsemi.git * mime-view.el (mime-display-inline-fontify): Reset the visited filename. --- 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)