+2009-09-13 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * mail/sendmail.el (send-mail-function):
+ * tooltip.el (tooltip-mode):
+ * simple.el (transient-mark-mode):
+ * rfn-eshadow.el (file-name-shadow-mode):
+ * frame.el (blink-cursor-mode):
+ * font-core.el (global-font-lock-mode):
+ * files.el (temporary-file-directory)
+ (small-temporary-file-directory, auto-save-file-name-transforms):
+ * epa-hook.el (auto-encryption-mode):
+ * composite.el (global-auto-composition-mode):
+ Use custom-initialize-delay.
+ * startup.el (command-line): Don't explicitly call
+ custom-reevaluate-setting for all the above vars.
+ * custom.el (custom-initialize-safe-set)
+ (custom-initialize-safe-default): Delete.
+
2009-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
* term/x-win.el (x-initialize-window-system):
;;;###autoload
(define-global-minor-mode global-auto-composition-mode
auto-composition-mode turn-on-auto-composition-if-enabled
- :extra-args (dummy)
- :initialize 'custom-initialize-safe-default
+ ;; This :extra-args' appears to be the result of a naive copy&paste
+ ;; from global-font-lock-mode.
+ ;; :extra-args (dummy)
+ :initialize 'custom-initialize-delay
:init-value (not noninteractive)
:group 'auto-composition
:version "23.1")
(eval (car (get symbol 'saved-value)))
(eval value)))))
-(defun custom-initialize-safe-set (symbol value)
- "Like `custom-initialize-set', but catches errors.
-If an error occurs during initialization, SYMBOL is set to nil
-and no error is thrown. This is meant for use in pre-loaded files
-where some variables or functions used to compute VALUE may not yet
-be defined. You can then re-evaluate VALUE in startup.el, for instance
-using `custom-reevaluate-setting'."
- (condition-case nil
- (custom-initialize-set symbol value)
- (error (set-default symbol nil))))
-
-(defun custom-initialize-safe-default (symbol value)
- "Like `custom-initialize-default', but catches errors.
-If an error occurs during initialization, SYMBOL is set to nil
-and no error is thrown. This is meant for use in pre-loaded files
-where some variables or functions used to compute VALUE may not yet
-be defined. You can then re-evaluate VALUE in startup.el, for instance
-using `custom-reevaluate-setting'."
- (condition-case nil
- (custom-initialize-default symbol value)
- (error (set-default symbol nil))))
-
(defun custom-initialize-reset (symbol value)
"Initialize SYMBOL based on VALUE.
Set the symbol, using its `:set' function (or `set-default' if it has none).
done in the run-time context rather than the build-time context.
This also has the side-effect that the (delayed) initialization is performed
with the :setter."
+ ;; Until the var is actually initialized, it is kept unbound.
+ ;; This seemed to be at least as good as setting it to an arbitrary
+ ;; value like nil (evaluating `value' is not an option because it
+ ;; may have undesirable side-effects).
(push symbol custom-delayed-init-variables))
(defun custom-declare-variable (symbol default doc &rest args)
With prefix argument ARG, turn auto encryption on if positive, else off.
Return the new status of auto encryption (non-nil means on)."
:global t :init-value t :group 'epa-file :version "23.1"
+ ;; We'd like to use custom-initialize-set here so the setup is done
+ ;; before dumping, but at the point where the defcustom is evaluated,
+ ;; the corresponding function isn't defined yet, so
+ ;; custom-initialize-set signals an error.
+ :initialize 'custom-initialize-delay
(setq file-name-handler-alist
(delq epa-file-handler file-name-handler-alist))
(remove-hook 'find-file-hooks 'epa-file-find-file-hook)
(or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp"))))
"The directory for writing temporary files."
:group 'files
+ :initialize 'custom-initialize-delay
:type 'directory)
(defcustom small-temporary-file-directory
by programs that create small temporary files. This is for systems that
have fast storage with limited space, such as a RAM disk."
:group 'files
+ :initialize 'custom-initialize-delay
:type '(choice (const nil) directory))
;; The system null device. (Should reference NULL_DEVICE from C.)
:group 'auto-save
:type '(repeat (list (string :tag "Regexp") (string :tag "Replacement")
(boolean :tag "Uniquify")))
+ :initialize 'custom-initialize-delay
:version "21.1")
(defcustom save-abbrevs t
(define-globalized-minor-mode global-font-lock-mode
font-lock-mode turn-on-font-lock-if-desired
- :extra-args (dummy)
- :initialize 'custom-initialize-safe-default
+ ;; What was this :extra-args thingy for? --Stef
+ ;; :extra-args (dummy)
+ :initialize 'custom-initialize-delay
:init-value (not (or noninteractive emacs-basic-display))
:group 'font-lock
:version "22.1")
no-blinking-cursor
(eq system-type 'ms-dos)
(not (memq window-system '(x w32)))))
- :initialize 'custom-initialize-safe-default
+ :initialize 'custom-initialize-delay
:group 'cursor
:global t
(if blink-cursor-idle-timer (cancel-timer blink-cursor-idle-timer))
(function-item feedmail-send-it :tag "Use Feedmail package")
(function-item mailclient-send-it :tag "Use Mailclient package")
function)
+ :initialize 'custom-initialize-delay
:group 'sendmail)
;;;###autoload
With prefix argument ARG, turn on if positive, otherwise off.
Returns non-nil if the new state is enabled."
:global t
+ ;; We'd like to use custom-initialize-set here so the setup is done
+ ;; before dumping, but at the point where the defcustom is evaluated,
+ ;; the corresponding function isn't defined yet, so
+ ;; custom-initialize-set signals an error.
+ :initialize 'custom-initialize-delay
:init-value t
:group 'minibuffer
:version "22.1"
commands which are sensitive to the Transient Mark mode."
:global t
:init-value (not noninteractive)
+ :initialize 'custom-initialize-delay
:group 'editing-basics)
;; The variable transient-mark-mode is ugly: it can take on special
after-init-time nil
command-line-default-directory default-directory)
- ;; Choose a reasonable location for temporary files.
- (custom-reevaluate-setting 'temporary-file-directory)
- (custom-reevaluate-setting 'small-temporary-file-directory)
- (custom-reevaluate-setting 'auto-save-file-name-transforms)
;; Force recomputation, in case it was computed during the dump.
(setq abbreviated-home-dir nil)
;; are dependencies between them.
(prog1 (nreverse custom-delayed-init-variables)
(setq custom-delayed-init-variables nil)))
-
- ;; Can't do this init in defcustom because the relevant variables
- ;; are not set.
- (custom-reevaluate-setting 'blink-cursor-mode)
- (custom-reevaluate-setting 'tooltip-mode)
- (custom-reevaluate-setting 'global-font-lock-mode)
- (custom-reevaluate-setting 'file-name-shadow-mode)
- (custom-reevaluate-setting 'send-mail-function)
- (custom-reevaluate-setting 'focus-follows-mouse)
- (custom-reevaluate-setting 'global-auto-composition-mode)
- (custom-reevaluate-setting 'transient-mark-mode)
- (custom-reevaluate-setting 'auto-encryption-mode)
(normal-erase-is-backspace-setup-frame)
;; Even if we start on a text-only terminal, make this non-nil by
;; default because we can open a graphical frame later (multi-tty).
:init-value t
- :initialize 'custom-initialize-safe-default
+ :initialize 'custom-initialize-delay
:group 'tooltip
(unless (or (null tooltip-mode) (fboundp 'x-show-tip))
(error "Sorry, tooltips are not yet available on this system"))