Subject: [PATCH] Fix docstring of mailcap-user-mime-data

From: Visuwesh <[email-masked]>
Date: Fri, 15 Jul 2022 09:39:22 +0530

Tags: patch

The docstring describes an alist format but the setter function and
:options keyword for the defcustom expects a nested list.

However, the setter functions turns the nested list into the alist
format described in the docstring.  I.e.,

    (("mpv %s" "audio/.*") ("mpv %s" "video/.*"))

transforms to

    (((view . "mpv %s") (type . "audio/.*")) (view . "mpv %s") (type . "video/.*"))

In GNU Emacs 29.0.50 (build 15, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
 of 2022-07-15 built on astatine
Repository revision: 2e0c76e397811837fd119c1298a5606b4ef65be5
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure --with-sound=alsa --with-x-toolkit=lucid --with-json
 --without-xaw3d --without-gconf --without-libsystemd --without-cairo'

>From 7bd9a5fce3e575ef3027fe7022d6b23e05c9f238 Mon Sep 17 00:00:00 2001
From: Visuwesh <[email-masked]>
Date: Fri, 15 Jul 2022 09:21:30 +0530
Subject: [PATCH] * lisp/net/mailcap.el (mailcap-user-mime-data): Doc fix.

---
 lisp/net/mailcap.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el
index ee72eba35d..469643dbca 100644
--- a/lisp/net/mailcap.el
+++ b/lisp/net/mailcap.el
@@ -87,11 +87,9 @@ mailcap--set-user-mime-data
 
 (defcustom mailcap-user-mime-data nil
   "A list of viewers preferred for different MIME types.
-The elements of the list are alists of the following structure
+The elements of the list are lists of the following structure
 
-  ((viewer . VIEWER)
-   (type   . MIME-TYPE)
-   (test   . TEST))
+  (VIEWER MIME-TYPE TEST)
 
 where VIEWER is either a Lisp command, e.g., a major mode, or a
 string containing a shell command for viewing files of the
-- 
2.35.1