]> git.cworth.org Git - notmuch/blobdiff - emacs/notmuch-lib.el
emacs: factor out calculation of mm-inline-override-types
[notmuch] / emacs / notmuch-lib.el
index 6fc71cc737995a5f4a66d205a0be58e458281ab3..1cc7e9c48e578a4f4f065cf1f5dfdb285601d210 100644 (file)
@@ -1037,6 +1037,14 @@ region if the region is active, or both `point' otherwise."
   'notmuch-interactive-region
   "notmuch 0.29")
 
+(defun notmuch--inline-override-types ()
+  "Override mm-inline-override-types to stop application/*
+parts from being displayed unless the user has customized
+it themselves."
+  (if (equal mm-inline-override-types
+            (eval (car (get 'mm-inline-override-types 'standard-value))))
+      (cons "application/.*" mm-inline-override-types)
+    mm-inline-override-types))
 ;;; _
 
 (provide 'notmuch-lib)