emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Customize Rogue


From: Luc Teirlinck
Subject: Re: Customize Rogue
Date: Sun, 9 Mar 2003 20:51:47 -0600 (CST)

Per Abrahamsen wrote:
   
   customize-set-value only make type-checks when used interactively,
   when used from Lisp is works just like setq.

   customize-set-variable will tell customize the variable has been set
   interactively, and call any speciel ":set" functions.

   The first property means it should never be called from ".emacs", but
   the second could be generally useful.  

   Maybe we should have a function that does the second (obey :set)
   without doing the first.

Would that be a lot more difficult than say:

(defun set-activate (variable value)
  "Sets variable to value.  If there is a set-function, calls it."
  (custom-load-symbol variable)
  (funcall (or (get variable 'custom-set) 'set-default) variable value)) 
 
To be used like:

(set-activate 'tool-bar-mode t)

This was basically just obtained by starting from
customize-set-variable and eliminating interactive assumptions and
comment related stuff, which in non-custom use does not apply.  (After
eliminating all that, there are only two lines left.)  It still relies
on the custom machinery and should be autoloaded from cus-edit.  I
personally do not see how to avoid that without a major rewrite.

Sincerely,

Luc.
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]