/[emacs]/emacs/lisp/custom.el
ViewVC logotype

Diff of /emacs/lisp/custom.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.87 by teirllm, Thu Jul 7 23:12:43 2005 UTC revision 1.88 by teirllm, Sun Jul 10 16:32:59 2005 UTC
# Line 76  if any, or VALUE." Line 76  if any, or VALUE."
76                   (eval (car (get symbol 'saved-value)))                   (eval (car (get symbol 'saved-value)))
77                 (eval value)))))                 (eval value)))))
78    
79    (defun custom-initialize-safe-set (symbol value)
80      "Like `custom-initialize-set', but catches errors.
81    If an error occurs during initialization, SYMBOL is set to nil
82    and no error is thrown.  This is meant for use in pre-loaded files
83    where some variables used to compute VALUE are not yet defined.
84    You can then re-evaluate VALUE in startup.el, for instance using
85    `custom-reevaluate-setting'."
86      (condition-case nil
87          (custom-initialize-set symbol value)
88        (error (set-default symbol nil))))
89    
90    (defun custom-initialize-safe-default (symbol value)
91      "Like `custom-initialize-default', but catches errors.
92    If an error occurs during initialization, SYMBOL is set to nil
93    and no error is thrown.  This is meant for use in pre-loaded files
94    where some variables used to compute VALUE are not yet defined.
95    You can then re-evaluate VALUE in startup.el, for instance using
96    `custom-reevaluate-setting'."
97      (condition-case nil
98          (custom-initialize-default symbol value)
99        (error (set-default symbol nil))))
100    
101  (defun custom-initialize-reset (symbol value)  (defun custom-initialize-reset (symbol value)
102    "Initialize SYMBOL based on VALUE.    "Initialize SYMBOL based on VALUE.
103  Set the symbol, using its `:set' function (or `set-default' if it has none).  Set the symbol, using its `:set' function (or `set-default' if it has none).

Legend:
Removed from v.1.87  
changed lines
  Added in v.1.88

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26