Re: Implementing a custom :set function for an alist of key-directory pairs

[email protected]
Newsgroups gmane.emacs.help
Message-ID <[email protected]>
Heime <[email protected]> writes:

> I made the following customisable variable consisting of an alist 
> of key-directory pairs.
>
> The user can change the directory for each key at will. How does 
> one construct the :set function exactly for this case?
>

Something for you to try is to delete your ‘initialize:’ and
‘set:’ options and use the defaults in your ‘defcustom’.
Then:
    M-x customize-option <your-option-name> RET

Try changing the values, adding new values (using the ‘Ins’
button), and deleting values (using the ‘Del’ button).  Use
the ‘Apply’ button to apply your changes to the user option.
Confirm your changes by typing C-h v <your-option-name>.

If that all works as expected, then you might not need to
write customized ‘initialize:’ or ‘set:’ functions.  If it
does not work, then you can identify cases that need
additional code.

-- 
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.
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.