From c5790e1e773632e78237d6d7285038d5222c561b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sun, 29 Sep 2024 16:24:42 +0200 Subject: [PATCH] Cease accepting the :reverse-video face attribute (bug#73552) It was an old alias for :inverse-video that hasn't worked very well for many years. * src/xfaces.c (merge_face_ref, Finternal_set_lisp_face_attribute) (Finternal_set_lisp_face_attribute_from_resource) (Finternal_get_lisp_face_attribute) (Finternal_lisp_face_attribute_values, syms_of_xfaces): Stop recognising :reverse-video. * etc/NEWS: Announce. (cherry picked from commit 0c28a1b0fab26dd726ea54927661d0402f8047dc) --- etc/NEWS | 2 +- src/xfaces.c | 18 +++++------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 7bd59311e29..756598afe6c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -430,7 +430,7 @@ All the characters that belong to the 'symbol' script (according to * Lisp Changes in Emacs 31.1 --- -** The face attribute ':reverse-video' is obsolete. +** The obsolete face attribute ':reverse-video' has been removed. Use ':inverse-video' instead. +++ diff --git a/src/xfaces.c b/src/xfaces.c index bbc3448e457..e248279e9b7 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -2693,9 +2693,7 @@ merge_face_ref (struct window *w, Lisp_Object keyword = XCAR (face_ref_tem); Lisp_Object value = XCAR (XCDR (face_ref_tem)); - if (EQ (keyword, face_attr_sym[attr_filter]) - || (attr_filter == LFACE_INVERSE_INDEX - && EQ (keyword, QCreverse_video))) + if (EQ (keyword, face_attr_sym[attr_filter])) { attr_filter_seen = true; if (NILP (value)) @@ -2831,8 +2829,7 @@ merge_face_ref (struct window *w, else err = true; } - else if (EQ (keyword, QCinverse_video) - || EQ (keyword, QCreverse_video)) + else if (EQ (keyword, QCinverse_video)) { if (EQ (value, Qt) || NILP (value)) to[LFACE_INVERSE_INDEX] = value; @@ -3461,8 +3458,7 @@ FRAME 0 means change the face on all frames, and change the default old_value = LFACE_BOX (lface); ASET (lface, LFACE_BOX_INDEX, value); } - else if (EQ (attr, QCinverse_video) - || EQ (attr, QCreverse_video)) + else if (EQ (attr, QCinverse_video)) { if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value) @@ -3980,8 +3976,7 @@ DEFUN ("internal-set-lisp-face-attribute-from-resource", value = face_boolean_x_resource_value (value, true); else if (EQ (attr, QCweight) || EQ (attr, QCslant) || EQ (attr, QCwidth)) value = intern (SSDATA (value)); - else if (EQ (attr, QCreverse_video) - || EQ (attr, QCinverse_video) + else if (EQ (attr, QCinverse_video) || EQ (attr, QCextend)) value = face_boolean_x_resource_value (value, true); else if (EQ (attr, QCunderline) @@ -4192,8 +4187,7 @@ frames). If FRAME is omitted or nil, use the selected frame. */) value = LFACE_STRIKE_THROUGH (lface); else if (EQ (keyword, QCbox)) value = LFACE_BOX (lface); - else if (EQ (keyword, QCinverse_video) - || EQ (keyword, QCreverse_video)) + else if (EQ (keyword, QCinverse_video)) value = LFACE_INVERSE (lface); else if (EQ (keyword, QCforeground)) value = LFACE_FOREGROUND (lface); @@ -4237,7 +4231,6 @@ Value is nil if ATTR doesn't have a discrete set of valid values. */) if (EQ (attr, QCunderline) || EQ (attr, QCoverline) || EQ (attr, QCstrike_through) || EQ (attr, QCinverse_video) - || EQ (attr, QCreverse_video) || EQ (attr, QCextend)) result = list2 (Qt, Qnil); @@ -7372,7 +7365,6 @@ syms_of_xfaces (void) DEFSYM (QCslant, ":slant"); DEFSYM (QCunderline, ":underline"); DEFSYM (QCinverse_video, ":inverse-video"); - DEFSYM (QCreverse_video, ":reverse-video"); DEFSYM (QCforeground, ":foreground"); DEFSYM (QCbackground, ":background"); DEFSYM (QCstipple, ":stipple"); -- 2.39.5