Subject: bug#74363: [PATCH] Type correction and docstring change in `erc-spelling-dictionaries'

From: Bruno Boal <[email-masked]>
Date: Fri, 15 Nov 2024 01:22:56 +0000

Tags: patch

Salutations,

This patch addresses a minor incorrection in the :type of the variable
`erc-spelling-dictionaries' in the erc-spelling library.
The :group keyword is also dropped, as it inherits from the
defgroup declared earlier in the file.

Additionally, a change to the docstring is proposed to better adhere to
the examples and explanations of the manual.

Note that the initial form of :type was preserved for clarity instead of
the alternative option: (alist :value-type (group string))

Best regards

>From ae9fef20af624c885e3da3583326a2546057e7ce Mon Sep 17 00:00:00 2001
From: Bruno Boal <[email-masked]>
Date: Thu, 14 Nov 2024 23:58:43 +0000
Subject: [PATCH] Type correction and docstring change in
 `erc-spelling-dictionaries'

---
 lisp/erc/erc-spelling.el | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/lisp/erc/erc-spelling.el b/lisp/erc/erc-spelling.el
index b2f565d71bf..558cef2d2b2 100644
--- a/lisp/erc/erc-spelling.el
+++ b/lisp/erc/erc-spelling.el
@@ -52,15 +52,17 @@ (define-erc-module spelling nil
 
 (defcustom erc-spelling-dictionaries nil
   "An alist mapping buffer names to dictionaries.
-The `car' of every cell is a buffer name, the `cadr' is the
-string name of an associated dictionary.
+
+Each element is a list of strings with the form (KEY VALUE) where KEY
+is a buffer name and VALUE, the name of the dictionary to be
+associated.
+
 The dictionary is inherited from server buffers, so if you want a
-default dictionary for some server, you can use a server buffer
-name here."
+default dictionary for some server, you can use a server buffer name
+here."
   :type '(choice (const nil)
-                 (repeat (cons (string :tag "Buffer name")
-                               (string :tag "Dictionary"))))
-  :group 'erc-spelling)
+                 (repeat (list (string :tag "Buffer name")
+                               (string :tag "Dictionary")))))
 
 (defun erc-spelling-init (buffer)
   "Enable flyspell mode in an ERC buffer.
-- 
2.47.0

-- 
Bruno Boal
GPG Key: 7DCD 57C5 CF25 EE42 A561 3382 74AE 782E 08F0 E5A8