Re: Customizing an association list with defcustom to allow user modifications

Heime <[email protected]>
Newsgroups gmane.emacs.help
Message-ID <bvCGXvxFKRQz03LccezCP4qBU5HhZwNYaFmYmZRBuwLH9pdvnEIfToacOuFwJRQVa0E-J5nqIsSRhPlsibBhxGeuilXOpIumsnCsghXLBmc=@protonmail.com>
On Friday, August 7th, 2026 at 12:42 AM, Heime <[email protected]> wrote:

> 
> I am comfortable using defcustom to define variables that hold string
> or symbol values. However, I find it challenging to understand how to
> use defcustom for a variable that is an alist (association list), where
> users can modify the entries.
> 
> For example, suppose I define an alist variable like this:
> 
> (setq mylist (list (cons 'name "Pandu") (cons 'activation 'dual)))
> 
> Now, I want to allow users to change the values of each entry in mylist
> through customization. How can I set this up so that users can easily
> modify these entries in the customization interface?  What would users
> have to do?

Have seen customize-dirlocals which uses a widget.  I could take an 
alist whose cdr type of each element can changes according to car.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.