diff options
| author | David Bremner <david@tethera.net> | 2022-05-14 08:26:38 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-05-20 22:40:32 -0300 |
| commit | fd46fc1977e3b0712c07cc4610edee2d91ec5ee0 (patch) | |
| tree | 7ed35bc80e973eaade92bbc58d7d359890bef725 /emacs/notmuch-lib.el | |
| parent | 306b7028d2288a3002cdbbcf8fd0973d8d969b84 (diff) | |
emacs: document/defcustom notmuch-multipart/alternative-discouraged
This variable is important for people who want to change the default
behaviour when displaying multipart/alternative messages. Previously
it was undocumented. Add a defcustom to help users and copy some
documentation from the wiki. The usual machinery of re-using
docstrings is a bit tricky to use here because it mangles the example
lisp code, and the link to the info node should not be in e.g. the
html page.
Add a simple test to make sure the switch from defvar to defcustom did
not break something obvious.
Diffstat (limited to 'emacs/notmuch-lib.el')
| -rw-r--r-- | emacs/notmuch-lib.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 1cc7e9c4..1e631d0e 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -567,12 +567,20 @@ Take wildcards into account." (string= (downcase t1) (downcase t2)))))) -(defvar notmuch-multipart/alternative-discouraged +(defcustom notmuch-multipart/alternative-discouraged '(;; Avoid HTML parts. "text/html" ;; multipart/related usually contain a text/html part and some ;; associated graphics. - "multipart/related")) + "multipart/related") + "Which mime types to hide by default for multipart messages. + +Can either be a list of mime types (as strings) or a function +mapping a plist representing the current message to such a list. +See Info node `(notmuch-emacs) notmuch-show' for a sample function." + :group 'notmuch-show + :type '(radio (repeat :tag "MIME Types" string) + (function :tag "Function"))) (defun notmuch-multipart/alternative-determine-discouraged (msg) "Return the discouraged alternatives for the specified message." |
