1 Feb 2004 18:59
customize-save-variable-save not present in emacs 21.3 -- what is it?
Johann "Myrkraverk" Oskarsson <myrkraverk <at> users.sourceforge.net>
2004-02-01 17:59:48 GMT
2004-02-01 17:59:48 GMT
Hi, Just for the heck of it I wanted to lisp some ecb options, even though they're not (the ones I was mostly interested in) on the list of don't-use-setq, I wanted to use the customize-save-variable-save feature, mentioned in the docs. But it isn't part of emacs 21.2 or 21.3 so I'm wondering where it comes from (I'm guessing xemacs) and if I use the defun in the docs, whether it'll be compatible with both of 'em? In hope it isn't of of them faqs, Johann -- -- Microsoft? Never heard of 'em. ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn
Here is the code:
(defun customize-option-get-value (option type)
"Return the value of a customizable option OPTION with TYPE, where TYPE
can either be 'standard-value \(the default-value of the defcustom) or
'saved-value \(the value stored durable by the user via customize)."
(let ((val (car (get option type))))
(cond ((not (listp val)) val)
((equal 'quote (car val)) (car (cdr val)))
(t (car val)))))
(defun customize-save-variable-save (option value &optional override)
"Calls `customize-save-variable' with OPTION and VALUE if OPTION is a
custom-type and if OPTION has no saved-value until now.
RSS Feed