]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/mm-view.el
Fix bug #8487 with invisible text at EOB under bidi.
[gnu-emacs] / lisp / gnus / mm-view.el
index 39d49af06004e4e188a85fa869d4ecac0e819604..5a90f015aedcdaf11e917e7abfdc3ffd3f9fb21d 100644 (file)
@@ -603,11 +603,14 @@ If MODE is not set, try to find mode automatically."
            ;; I find font-lock a bit too verbose.
            (font-lock-verbose nil))
         (setq buffer-file-name (mm-handle-filename handle))
+        (set (make-local-variable 'enable-local-variables) nil)
         (if mode
             (funcall mode)
-          (normal-mode))
+          (set-auto-mode))
        ;; The mode function might have already turned on font-lock.
-       (unless (symbol-value 'font-lock-mode)
+        ;; Do not fontify if the guess mode is fundamental.
+       (unless (or (symbol-value 'font-lock-mode)
+                    (eq major-mode 'fundamental-mode))
          (font-lock-fontify-buffer)))
       ;; By default, XEmacs font-lock uses non-duplicable text
       ;; properties.  This code forces all the text properties