* lisp/custom.el (custom-push-theme): Don't record faces in `changed'
theme; this doesn't work correctly for per-frame face settings.
(disable-theme): Use face-set-after-frame-default to reset faces.
(custom--frame-color-default): New function.
* lisp/frame.el (frame-background-mode, frame-set-background-mode):
Moved from faces.el.
(frame-default-terminal-background): New function.
* src/xfaces.c (Finternal_merge_in_global_face): Modify the foreground
and background color parameters if they have been changed.
* lisp/cus-edit.el (customize-push-and-save): New function.
* lisp/files.el (hack-local-variables-confirm): Use it.
* lisp/custom.el (load-theme): New arg NO-CONFIRM. Use
customize-push-and-save (Bug#8720).
(custom-enabled-themes): Doc fix.
* lisp/cus-theme.el (customize-create-theme)
(custom-theme-merge-theme): Callers to load-theme changed.
* lisp/startup.el (command-line): Save the cursor's theme-face
directly, instead of using face-override-spec.
* lisp/custom.el (load-theme): Minor optimization in assigning faces.
* lisp/custom.el (custom--inhibit-theme-enable): Make it affect only
custom-theme-set-variables and custom-theme-set-faces.
(provide-theme): Ignore custom--inhibit-theme-enable.
(load-theme): Enable the theme explicitly if NO-ENABLE is non-nil.
(custom-enabling-themes): Delete variable.
(enable-theme): Accept only loaded themes as arguments. Ignore
the special custom-enabled-themes variable.
(custom-enabled-themes): Forbid themes from setting this.
Eliminate use of custom-enabling-themes.
(custom-push-theme): Quote "changed" custom var entry.
* lisp/custom.el (load-theme): Define return value. Drop use of
unsafep; call custom-theme-load-confirm for non-known-safe themes.
(custom-theme-load-confirm): Scroll in the correct window.
(custom-enabled-themes): Add custom-safe-themes to :set-after.
* lisp/cus-theme.el (custom-theme-checkbox-toggle): Don't activate the
checkbox if load-theme fails.
* lisp/custom.el (custom-safe-themes): Rename from
custom-safe-theme-files. Add :risky tag.
(load-theme, custom-theme-load-confirm): Save sha1 hashes to
custom-safe-themes, not filenames. Suggested by Stefan Monnier.
* custom.el (custom-safe-theme-files): New defcustom.
(custom-theme-load-confirm): New function.
(load-theme): Load theme using `load', confirming with
custom-theme-load-confirm if necessary.
* cus-face.el (custom-theme-set-faces): Revert 2010-10-18 change.
Don't mark as safe.
* custom.el (custom-theme-set-variables): Likewise.
(load-theme): Add custom-theme-set-faces and
custom-theme-set-variables to safe-functions while loading.
(custom-enabled-themes): Mark as risky.
* cus-face.el (custom-theme-set-faces): Mark as a safe function.
* custom.el (custom-theme-set-variables): Mark as a safe function.
(load-theme): Check forms using unsafep.
* cus-theme.el (custom-theme--migrate-settings): New var.
(customize-create-theme): Allow editing the `user' theme.
(custom-theme-add-variable, custom-theme-add-var-1)
(custom-theme-add-face, custom-theme-add-face-1): Add a checkbox
to the front of each variable or face widget.
(custom-theme-write): Save theme settings in the correct order.
Optionally, remove saved settings from user customizations.
(custom-theme-write-variables, custom-theme-write-faces): Saved
only the checked widgets.
(customize-themes): Add a link for migrating custom settings.
* custom.el (custom-declare-theme, provide-theme): Use
custom-theme-name-valid-p.
(custom-theme-name-valid-p): Remove checks that are now
unnecessary since themes no longer obey load-path.
* cus-edit.el (custom-variable-value-create): For the simple
style, hide documentation string when hidden.
* cus-edit.el (custom-variable, custom-face): Combine the
:inhibit-magic and :display-style properties into a single
:custom-style property.
(custom-toggle-hide-variable, custom-toggle-hide-face): New
functions. If hiding an edited value, save it to :shown-value.
(custom-variable-value-create, custom-face-value-create): Use
them.
(custom-magic-reset): Allow magic property to be unset.
* cus-theme.el (custom-theme-add-var-1)
(custom-theme-add-face-1): Use the :custom-style property.
* custom.el: (custom-theme-load-path): Doc fix.
* custom.el: Custom themes no longer use load-path.
(custom-theme-load-path): New option. Change built-in theme
directory to etc/.
(custom-enabled-themes): Add custom-theme-load-path dependency.
(custom-theme--load-path): New function.
(load-theme, custom-available-themes): Use it.
* cus-theme.el (describe-theme-1): Use custom-theme--load-path.
(customize-themes): Link to custom-theme-load-path variable.
* faces.el (face-spec-reset-face): Reset all attributes in one
single call to set-face-attribute.
(face-spec-match-p): Make it a defsubst.
(frame-set-background-mode): New arg KEEP-FACE-SPECS.
(x-create-frame-with-faces, tty-create-frame-with-faces)
(tty-set-up-initial-frame-faces): Don't recompute face specs in
frame-set-background-mode, since they are recomputed immediately
afterwards in face-set-after-frame-default.
(face-set-after-frame-default): Minor optimization.
(cursor): Provide non-trivial defface spec.
* custom.el (custom-theme-recalc-face): Simplify.
* lisp/cus-edit.el (custom--initialize-widget-variables): New function.
(Custom-mode): Use it.
* lisp/cus-face.el (custom-theme-set-faces): Remove dead code. Obey
custom--inhibit-theme-enable.
* lisp/cus-theme.el (describe-theme, customize-themes)
(custom-theme-save): New commands.
(custom-new-theme-mode-map): Bind C-x C-s.
(custom-new-theme-mode): Use custom--initialize-widget-variables.
(customize-create-theme): New optional arg THEME.
(custom-theme-revert): Use it.
(custom-theme-visit-theme): Remove dead code.
(custom-theme-merge-theme): Use custom-available-themes.
(custom-theme-write): Make interactive.
(custom-theme-write): Use custom-theme-name-valid-p.
(describe-theme-1, custom-theme-choose-revert)
(custom-theme-checkbox-toggle, custom-theme-selections-toggle):
New funs.
(custom-theme-allow-multiple-selections): New option.
(custom-theme-choose-mode): New major mode.
* lisp/custom.el (custom-theme-set-variables): Remove dead code. Obey
custom--inhibit-theme-enable.
(custom--inhibit-theme-enable): New var.
(provide-theme): Obey it.
(load-theme): Replace load with manual read/eval, in order to
check for correctness. Use custom-theme-name-valid-p.
(custom-theme-name-valid-p): New function.
(custom-available-themes): Use it.
* lisp/help-mode.el (help-theme-def, help-theme-edit): New buttons.
* cus-edit.el (custom-face-edit-fix-value): Use
custom-fix-face-spec.
* custom.el (custom-push-theme): Cleanup (use cond).
(disable-theme): Recompute the saved-face property.
(custom-theme-recalc-face): Follow face alias before setting prop.
* custom.el (custom-fix-face-spec): New function; code moved from
custom-face-edit-fix-value.
(custom-push-theme): Use it when checking if a face has been
changed outside customize.
(custom-available-themes): New function.
(load-theme): Use it.
* image.el (image-checkbox-checked, image-checkbox-unchecked): New
variables, containing checkbox images.
* startup.el (fancy-startup-tail):
* wid-edit.el (checkbox): Use them.
(custom-initialize-delay): New function.
* startup.el (command-line): "Re"evaluate all vars in
custom-delayed-init-variables. Don't reevaluate abbrev-file-name
explicitly any more.
* abbrev.el (abbrev-file-name): Use custom-initialize-delay
to avoid creating a ~/.emacs.d at build-time (bug#4347).
docstring.
(customize-package-emacs-version): Use cdr instead of cadr now that
alists use dotted pairs.
* custom.el (defcustom): Fix docstring for :package-version.
(defface, defgroup): Replace definitions of a select few keywords with
a reference to the Common Keywords in defcustom.
(defcustom, defface, defgroup): Replace reference to Customization
chapter in manual with hyperlink.
keyword.
(custom-add-package-version): New function. Sets value of new property
'custom-package-version from :package-version keyword.
* cus-edit.el (customize-package-emacs-version-alist): New variable.
(customize-changed-options): Add check for custom-package-version.
(customize-package-emacs-version): New function to look up Emacs
version corresponding to the given package version.
face-spec set so that `changed' theme is correctly saved.
(custom-face-reset-standard): Reset to recalculated face rather
than defface spec.
* custom.el (custom-push-theme): Only save `changed' theme if the
current face does not match the defface specs.
(custom-variable-menu, custom-face-menu, custom-group-menu)
(custom-buffer-create-internal): Change "Reset" to "Show".
Reorder menu items.
(custom-link): New face for Info links.
(custom-buffer-create-internal, custom-manual): Use it.
* wid-edit.el (widget-default-mouse-face-get): New function.
(widget-specify-button): Handle mouse-face like button-face.
* custom.el (load-theme): Clear old theme settings if reloading.
(custom-known-themes): Rename `standard' theme to `changed'.
(custom-push-theme): Caller no longer specifies what theme to use
when doing `reset'---the setting is simply removed from the theme.
Delete MODE from `theme-value' and `theme-settings' properties.
(custom-declare-theme): Ignore &rest args since we don't use them.
(custom-loaded-themes): Delete variable.
(custom-theme-load-themes, custom-theme-loaded-p)
(custom-theme-value): Delete functions.
(custom-declare-theme): Signal error on invalid theme names.
(provide-theme): custom-loaded-themes was deleted.
(load-theme): Load the file unconditionally.
(enable-theme): Call `load-theme' if theme is undefined.
(custom-enabled-themes): Only update value for successful loads.
(disable-theme): Complete from enabled themes when interactive.
(custom-variable-theme-value): Calculate theme value directly.
(custom-theme-reset-variables, custom-reset-variables): Mark as
XEmacs compatibility functions. We don't actually use these.
* cus-edit.el (custom-variable-state-set): Use
custom-variable-theme-value instead of custom-theme-value.
(custom-face-state-set): Rename `standard' theme to `changed'.
(custom-save-variables, custom-save-faces): Delete unneeded
references to custom-reset-variables.
(custom-save-resets): Delete function.
(custom-save-variables, custom-save-faces): MODE argument deleted.
(custom-save-variables, custom-save-faces): Ignore theme values.
* cus-face.el (custom-theme-reset-faces): Mark as XEmacs
compatibility function.
(custom-enabling-themes): New variable.
(enable-theme): Don't enable user if custom-enabling-themes is t.
(custom-enabled-themes): Make it a defcustom.
(custom-theme-recalc-face): No-op if face is undefined.
* custom.el (custom-push-theme): Clarify docstring. VALUE nil for
reset means to remove setting from theme entirely. Don't keep
expanding theme-settings list; delete old entries if necessary.
* cus-edit.el (custom-buffer-create-internal): Move "Erase
customization" button one line up.
(custom-themed): New face.
(custom-magic-alist): New value, THEMED, for theme settings.
(custom-variable-state-set): Check theme-value.
(custom-variable-reset-standard, custom-face-reset-standard):
Remove theme setting entirely.
theme. Don't recalculate a face if it's not loaded yet.
* cus-face.el (custom-theme-set-faces): Don't change saved-face if
the `user' theme is in effect.