* lisp/faces.el (face-spec-set): Change the third arg to specify
whether this function is being called via defface, customize, or a
third party. Set the appropriate symbol properties. Clear the
override spec if setting via Custom. Initialize face if necessary.
(face-spec-recalc): Allow theme faces to completely replace the
defface spec, in the same way as custom faces (Bug#8454).
* lisp/cus-edit.el (custom-face-set, custom-face-mark-to-save)
(custom-face-reset-saved, custom-face-mark-to-reset-standard):
Simplify by using the new arg to face-spec-set.
* lisp/cus-face.el (custom-declare-face): Move face initialization to
face-spec-set.
(custom-theme-set-faces): Don't initialize the face name here, as
that is now done in face-spec-set.
* lisp/emacs-lisp/lisp-mode.el (eval-defun-1): When evaluating defface,
reset face-override-spec too, and use custom-declare-face.
Fixes: debbugs:4988
* doc/lispref/display.texi: Document new face attribute.
* lisp/cus-face.el (custom-face-attributes): Add wave-style underline
attribute.
* lisp/faces.el (set-face-attribute): Update docstring.
* src/dispextern.h (face_underline_type): New enum.
(face): Add field for underline type.
* src/nsterm.m (ns_draw_underwave): New function.
(ns_draw_text_decoration): Use it.
* src/w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
New functions.
(x_draw_glyph_string): Use them.
* src/xfaces.c (Qline, Qwave): New Lisp objects.
(check_lface_attrs, merge_face_ref)
(Finternal_set_lisp_face_attribute, realize_x_face): Handle
wave-style underline face attributes.
* src/xterm.c (x_draw_underwave): New function.
(x_draw_glyph_string): Use it.
* 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.
* 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.
Patches applied:
* emacs--devo--0 (patch 824-838)
- Update from CVS
- Merge from emacs--rel--22
- Remove lisp/erc/erc-nicklist.el
- Update some .arch-inventory files
- Fix void function definition error in cus-edit.el
- Restore lisp/emacs-lisp/cl-loaddefs.el
* emacs--rel--22 (patch 70-83)
- Update from CVS
- Remove lisp/erc/erc-nicklist.el
- Update some .arch-inventory files
- Indicate that emacs--devo--0--patch-834 does not need to be applied
- Merge from gnus--rel--5.10
- Restore lisp/emacs-lisp/cl-loaddefs.el
* gnus--rel--5.10 (patch 239-241)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-28
(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.
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.