]> git.eshelyaron.com Git - emacs.git/commitdiff
(mm-display-inline-fontify): Set trust after major mode.
authorEshel Yaron <me@eshelyaron.com>
Sun, 27 Apr 2025 19:26:11 +0000 (21:26 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 27 Apr 2025 19:26:11 +0000 (21:26 +0200)
lisp/gnus/mm-view.el

index 35230ec2f84193fa7b135693563cb253f283c968..197b238e321807e181ecde08bc9b7b076e3d2383 100644 (file)
@@ -502,7 +502,6 @@ If MODE is not set, try to find mode automatically."
          (setq coding-system (mm-find-buffer-file-coding-system)))
        (setq text (buffer-string))))
     (with-temp-buffer
-      (trust-set-buffer-trust)
       (insert (cond ((eq charset 'gnus-decoded)
                     (with-current-buffer (mm-handle-buffer handle)
                       (buffer-string)))
@@ -536,6 +535,7 @@ If MODE is not set, try to find mode automatically."
              ;; really associates buffer with a file (bug#39190).
              (delay-mode-hooks (set-auto-mode))
              (setq mode major-mode)))
+          (trust-set-buffer-trust)
          ;; Do not fontify if the guess mode is fundamental.
          (when (and (not (eq major-mode 'fundamental-mode))
                     mm-inline-font-lock)