0

When I have a custom variable and a function that changes it's value:

(defcustom current-fileset nil "Currently selected fileset" :type 'string)

(defun set-val ()
  (setq current-fileset "value")
  )

and call (set-val), the value of current-fileset is change until I restart Emacs. How can I store the value permanently?

1 Answer 1

2

This saves the new value to your init files.

(customize-save-variable
 'current-fileset "newvalue")

Or

You can copy this to your init file directly

(custom-set-variables
 '(current-fileset "newvalue"))

... and restart Emacs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.