Re: Implementing a custom :set function for an alist of key-directory pairs
Heime <[email protected]>
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <dKsrj_QIjipOQRm_YZLfmEm0exQAIzbgV_ggfV9tgEiNxxnkmDhytZBs2J_Fd8KlTSdcQkLTZQPhDQv8YLH5S84xs70c-FqGaPiAt4naDxs=@protonmail.com> |
On Thursday, August 27th, 2026 at 12:00 PM, [email protected] <[email protected]> wrote: > 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. Have already experimented with changing, adding, and deleting values using the customistion buffer. But I want to see how I can set up the :initialize and :set functions se they work properly and see them influencing the process.