unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#73552: obsolete (and broken) face attribute :reverse-video
@ 2024-09-29 10:49 Mattias Engdegård
  2024-09-29 11:31 ` Gerd Möllmann
  2024-09-29 13:55 ` Stefan Kangas
  0 siblings, 2 replies; 10+ messages in thread
From: Mattias Engdegård @ 2024-09-29 10:49 UTC (permalink / raw)
  To: 73552; +Cc: Gerd Möllmann, Eli Zaretskii, Stefan Monnier

The face attribute keyword :reverse-video has been broken in defface for a long time, and it's not used very much, so I added a compiler warning and a notice to NEWS.

This keyword along with :bold and :italic have been obsolete for longer than that and aren't even mentioned in any documentation (on purpose) but in the internal face-and-display machinery they still partly work.

I'm not quite sure why :reverse-video doesn't work in defface. Demo, in *scratch*:

  (defface myface '((t :reverse-video t)) "my face")

  (insert (propertize "bon bon" 'font-lock-face 'myface) ?\n)
  => bon bon  ; not inverted

  (insert (propertize "non non" 'font-lock-face '(:reverse-video t)) ?\n)
  => non non  ; inverted

I first blamed a simple 14 years old mistake in `custom-fix-face-spec` but fixing that doesn't help, not sure why. But it means that we probably don't need to fix it, and indeed there are precious few packages using :reverse-video. One is make-mode.el; outside Emacs, I only found one (yaml-mode).

While :bold and :italic are obsolete as well, they are used a lot more (and actually seem to work) so I'm not warning about them now.

To summarise:
- Should we fix `custom-fix-face-spec`? Maybe, or just stop pretending that it handles :reverse-video.
- Should we bother to fix what other mechanism preventing :reverse-video from working? Probably no.
- Should we remove :reverse-video from the display machinery? Yes, but maybe not now?
- Should we remove :bold and :italic? Yes, but definitely not now.






^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-09-29 17:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-29 10:49 bug#73552: obsolete (and broken) face attribute :reverse-video Mattias Engdegård
2024-09-29 11:31 ` Gerd Möllmann
2024-09-29 12:35   ` Mattias Engdegård
2024-09-29 12:55     ` Eli Zaretskii
2024-09-29 13:41       ` Mattias Engdegård
2024-09-29 13:49         ` Eli Zaretskii
2024-09-29 13:55 ` Stefan Kangas
2024-09-29 16:22   ` Mattias Engdegård
2024-09-29 16:42     ` Eli Zaretskii
2024-09-29 17:25       ` Mattias Engdegård

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).