In Emacs, some variables have special behaviors when set via M-x customize that do not get triggered when you set the same variable via setq
. Is there a programmatic way to set such variables such that the special behavior will be triggered as if the user had set the variable through customize?
Also, is there a function to programmatically save the value to the user's custom file? I'm trying to implement a functionality to re-add the default elements to a list, without also removing the user's added elements.