* doc/lispref/display.texi (Face Attributes): Document new
`:position' property of the `:underline' attribute.
* etc/NEWS: Announce new property.
* lisp/cus-face.el (custom-face-attributes): Implement
customization for new face attribute.
* src/dispextern.h (struct face): New fields
`underline_pixels_above_descent_line' and
`underline_at_descent_line_p'.
* src/haikuterm.c (haiku_draw_text_decoration):
* src/nsterm.m (ns_draw_text_decoration):
* src/w32term.c (w32_draw_glyph_string):
* src/xterm.c (x_draw_glyph_string): Respect new face fields.
* src/xfaces.c (realize_gui_face): Handle new `:position'
keyword.
(syms_of_xfaces): New symbol `:position'.
Following the changes to support "medium" weight fonts, the weight for
"normal" fonts is now reported as 'regular', which caused
customize-face to display faces as lisp-expressions, since it didn't
recognize that. This has been corrected.
* lisp/cus-face.el (custom-face-attributes): Recognize 'regular' as a
weight.
Separate values for box line width and height and allow both to be
negative which makes the visual width and height of the boxed string
unchanged (Bug#13011).
* doc/lispref/display.texi (Face Attributes): Modify :box attribute
description to reflect the new possibilities.
* lisp/cus-face.el (custom-face-attributes): Set box attribute to get
two integer to set vertical and horizontal width and modify pre-filter
to accept dotted list of two int as valid box attribute.
* src/dispextern.h (face): Use two int for box horizontal and vertical
line width.
* src/nsfont.m (nsfont_draw): Use new face attributes.
* src/nsterm.m (ns_draw_box, ns_draw_relief): Support separated
horizontal and vertical box line width.
(ns_dumpglyphs_box_or_relief, ns_maybe_dumpglyphs_background)
(ns_dumpglyphs_image, ns_draw_glyph_string_foreground)
(ns_draw_composite_glyph_string_foreground): Use new face attributes.
* src/w32term.c (w32_draw_box_rect, w32_draw_relief_rect): Support
separated horizontal and vertical box line width.
(x_draw_glyph_string_background, x_draw_glyph_string_foreground)
(x_draw_composite_glyph_string_foreground)
(x_draw_glyphless_glyph_string_foreground, x_draw_glyph_string_box)
(x_draw_image_foreground, x_draw_image_relief)
(w32_draw_image_foreground_1, x_draw_image_glyph_string): Use new face
attributes.
* src/xfaces.c (Sinternal_set_lisp_face_attribute, realize_x_face):
Accept box attribute as a list of two ints.
* src/xdisp.c (estimate_mode_line_height, produce_image_glyph)
(produce_xwidget_glyph, x_produce_glyphs): Use new face attributes.
* src/xterm.c (x_draw_box_rect, x_draw_relief_rect): Support separated
horizontal and vertical box line width.
(x_draw_glyph_string_background, x_draw_glyph_string_foreground)
(x_draw_composite_glyph_string_foreground)
(x_draw_glyphless_glyph_string_foreground, x_draw_glyph_string_box)
(x_draw_image_foreground, x_draw_image_relief, x_draw_image_foreground_1)
(x_draw_image_glyph_string): Use new face attributes.
Theme settings now generally aren't actually applied until a call to
`enable-theme-, either one made explicitly or implicitly through
`load-theme' with NO-ENABLE nil. This change has the effect of not
applying theme changes just because we load a lisp file containing a
theme specification. The previous behavior is preserved for the
special case of the `user' theme, which is frequently used for
ad-hoc customization.
* lisp/cus-face.el (custom-theme-set-faces): Call
`custom--should-apply-setting' to decide whether to apply
a setting.
* lisp/custom.el (custom--should-apply-setting): New function.
(custom--inhibit-theme-enable): Add `apply-only-user' option;
default to it.
(custom-push-theme, custom-theme-set-variables): Call
`custom--should-apply-setting' to decide whether to apply
a setting.
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November. Change these FTP URLs to https://ftp.gnu.org
instead. Make similar changes for URLs to other organizations moving
away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
* 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.