1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00
Commit Graph

122 Commits

Author SHA1 Message Date
Po Lu
4f50d964e5 Allow controlling the underline position of faces
* 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'.
2022-01-10 19:26:46 +08:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	lib/cdefs.h
#	lisp/erc/erc-dcc.el
#	lisp/erc/erc-imenu.el
#	lisp/erc/erc-replace.el
#	lisp/image-dired.el
#	lisp/progmodes/xref.el
#	m4/alloca.m4
#	m4/byteswap.m4
#	m4/errno_h.m4
#	m4/getopt.m4
#	m4/gnulib-common.m4
#	m4/inttypes.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Robert Pluim
43a595788d Adjust custom-face-attributes for 'regular' weight
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.
2021-11-26 14:29:32 +01:00
Robert Pluim
3e40a56d52 ; * lisp/cus-face.el: Remove duplicated width entry. 2021-11-26 09:35:25 +01:00
Eli Zaretskii
aa3a74d9a1 Update 'custom-face-attributes'
* lisp/cus-face.el (custom-face-attributes): Synchronize with
tables in font.c.
2021-11-25 21:29:21 +02:00
Lars Ingebrigtsen
57d54bb49d Improve defface error message
* lisp/cus-face.el (custom-declare-face): Improve the error
message when there's a missing doc string (bug#51576).
2021-11-04 19:23:07 +01:00
Stefan Kangas
289ec2d911 ; Remove some useless comments 2021-04-16 14:54:02 +02:00
Pedro Andres Aranda Gutierrez
e694f61fc6 Add `flat-button' to custom-face-attributes
* lisp/cus-face.el (custom-face-attributes): Add `flat-button'
(bug#45769).
2021-01-11 15:07:01 +01:00
Stefan Monnier
898a94a9be Use lexical-binding in the remaining preloaded files
* lisp/widget.el:
* lisp/w32-fns.el:
* lisp/textmodes/fill.el:
* lisp/term/common-win.el:
* lisp/scroll-bar.el:
* lisp/rfn-eshadow.el:
* lisp/menu-bar.el:
* lisp/language/tibetan.el:
* lisp/language/thai.el:
* lisp/language/misc-lang.el:
* lisp/language/lao.el:
* lisp/language/korean.el:
* lisp/language/japanese.el:
* lisp/language/indian.el:
* lisp/language/hebrew.el:
* lisp/language/european.el:
* lisp/language/ethiopic.el:
* lisp/language/english.el:
* lisp/language/cyrillic.el:
* lisp/language/chinese.el:
* lisp/jka-cmpr-hook.el:
* lisp/international/ucs-normalize.el:
* lisp/international/mule.el:
* lisp/international/mule-conf.el:
* lisp/international/iso-transl.el:
* lisp/international/fontset.el:
* lisp/international/characters.el:
* lisp/format.el:
* lisp/facemenu.el:
* lisp/electric.el:
* lisp/dos-w32.el:
* lisp/dos-fns.el:
* lisp/disp-table.el:
* lisp/cus-face.el:
* lisp/composite.el:
* lisp/bindings.el:
* admin/unidata/blocks.awk:
* admin/charsets/eucjp-ms.awk:
* admin/charsets/cp51932.awk: Use `lexical-binding`.
2021-01-04 20:57:42 -05:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Stefan Kangas
22d81123f5 Mark compat alias in cus-face.el obsolete
* lisp/cus-face.el (custom-facep): Mark compat alias obsolete.
* lisp/cus-dep.el (custom-make-dependencies):
* lisp/cus-edit.el (customize-changed-options)
(custom-unsaved-options, customize-saved, customize-apropos)
(custom-save-faces): Adjust callers.
2020-11-20 16:11:33 +01:00
Alexandre Adolphe
34ae2d0c22 Allow negative line width for :box face attribute
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.
2020-04-01 18:02:55 -04:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Jimmy Aguilar Mena
bc8db39775 Added face parameter :extend.
This is an initial change to add a parameter :extend that will be used
in the display engine later.
2019-10-14 14:18:39 +02:00
Lars Ingebrigtsen
a5e7c6c617 Arrange custom-face-attributes closer to how heavy they are
* lisp/cus-face.el (custom-face-attributes): Arrange the weights
more in order of how heavy they are (bug#15526).
2019-08-14 20:22:36 -07:00
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Daniel Colascione
a9b720ac50 Fix theme application
Fix an inverted test.  Patch due to Andy Moreton.

* lisp/cus-face.el (custom-theme-set-faces): Correct sense of
`custom--should-apply-setting' test.
2018-06-19 07:38:47 -07:00
Daniel Colascione
aabaa9f8c8 Apply non-user themes only when asked
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.
2018-06-16 15:44:23 -07:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
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.
2017-09-13 15:54:37 -07:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Andreas Schwab
12ddce5508 * cus-face.el (custom-face-attributes): Add :distant-foreground. 2014-05-25 13:47:34 +02:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Chong Yidong
bacb0e7791 Doc fixes for face functions.
* faces.el (face-spec-set):
* cus-face.el (custom-theme-set-faces, custom-set-faces):
* custom.el (defface): Doc fixes.

Fixes: debbugs:16203
2013-12-21 21:44:20 +08:00
Paul Eggert
0877d0dc24 Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca 2013-01-02 08:13:04 -08:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Chong Yidong
1c4f115d4c Revamp face-spec-set to be more analogous to setq for faces.
* 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
2012-11-25 12:50:20 +08:00
Andreas Schwab
c6cc78b86d Fixes: debbugs:11805
* cus-face.el (custom-face-attributes): Fix customize type for the
:underline attribute.
2012-08-21 23:41:35 +02:00
Alp Aker
9b0e3ebaef Implement wave-style variant of underlining.
* 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.
2012-06-16 20:32:36 -04:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Chong Yidong
61dfb316ec Fix for disable-theme/defface interaction (Bug#8889).
* lisp/cus-face.el (custom-declare-face): Call custom-theme-recalc face
anytime existing face settings are present.
2011-06-18 14:49:19 -04:00
Chong Yidong
027f966de4 Handle calling defface on a face with existing theme settings (Bug#8454).
* lisp/cus-face.el (custom-declare-face): Call custom-theme-recalc-face if
the face has existing theme settings.
2011-05-08 16:07:38 -04:00
Juanma Barranquero
135377f157 Fix typos in comments. 2011-04-08 01:59:27 +02:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0 Nuke arch-tags. 2011-01-15 15:16:57 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Chong Yidong
7fd8732d2e Revert 2010-10-18 change; use safe-functions instead.
* 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.
2010-10-19 15:22:40 -04:00
Chong Yidong
e48eb34332 Use unsafep to check for theme safety.
* 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.
2010-10-18 13:26:25 -04:00
Chong Yidong
de43f11b36 Fix 2010-10-12 change to custom-theme-set-faces.
* cus-face.el (custom-theme-set-faces): Call custom-push-theme
only after checking the theme-face property.
2010-10-14 01:57:58 -04:00
Chong Yidong
6b09b5d118 New interface for choosing Custom themes.
* 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.
2010-10-11 23:10:21 -04:00
Chong Yidong
bd78fa1d54 Add "Package:" file headers to denote built-in packages. 2010-08-29 12:17:13 -04:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Dan Nicolaescu
0b7f397ca7 * progmodes/ld-script.el (auto-mode-alist):
* vc-hooks.el (vc-directory-exclusion-list): Purecopy strings.

* cus-face.el (custom-declare-face): Purecopy face spec.
2009-11-06 07:50:54 +00:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Dan Nicolaescu
9e2a264775 Remove support for Mac Carbon.
* mactoolbox.c:
* macterm.h:
* macterm.c:
* macselect.c:
* macmenu.c:
* macgui.h:
* macfns.c:
* mac.c: Remove file.
* s/darwin.h:
* m/intel386.h:
* xfaces.c:
* xdisp.c:
* window.c:
* tparam.c:
* termhooks.h:
* termcap.c:
* term.c:
* syssignal.h:
* sysselect.h:
* sysdep.c:
* process.c:
* lread.c:
* lisp.h:
* keyboard.c:
* image.c:
* fringe.c:
* frame.h:
* frame.c:
* fontset.c:
* font.h:
* font.c:
* fns.c:
* fileio.c:
* emacs.c:
* dispnew.c:
* dispextern.h:
* config.in:
* atimer.c:
* Makefile.in: Remove code for Carbon

* erc.el: Remove code for Carbon.

Remove support for Mac Carbon.
* term/mac-win.el: Remove file
* international/mule-cmds.el:
* version.el:
* startup.el:
* simple.el:
* mwheel.el:
* mouse.el:
* loadup.el:
* isearch.el:
* info.el:
* frame.el:
* faces.el:
* disp-table.el:
* cus-start.el:
* cus-face.el:
* cus-edit.el:
* Makefile.in: Remove code for Carbon.

Remove support for Mac Carbon.
* makefile.w32-in:
* emacsclient.c: Remove code for Carbon.

* PROBLEMS:
* MACHINES: Remove mentions of Mac Carbon.

* ns-emacs.texi:
* faq.texi: Remove mentions of Mac Carbon.

* os.texi:
* frames.texi:
* display.texi: Remove mentions of Mac Carbon.

* xresources.texi: Remove mentions of Mac Carbon.

* make-tarball.txt:
* admin.el:
* FOR-RELEASE:
* CPP-DEFINES: Remove mentions of Mac Carbon.

Remove support for Mac Carbon.
* mac: Remove directory.
* make-dist:
* configure.in:
* README:
* Makefile.in:
* INSTALL:  Remove code for Carbon.
* configure: Regenerate.
2008-07-27 18:24:48 +00:00