From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#73552: obsolete (and broken) face attribute :reverse-video Date: Sun, 29 Sep 2024 13:31:07 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24213"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73552@debbugs.gnu.org, eliz@gnu.org, monnier@iro.umontreal.ca To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 29 13:31:54 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sus9Z-00065n-DV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Sep 2024 13:31:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sus9G-0004Xq-Ea; Sun, 29 Sep 2024 07:31:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sus9E-0004XJ-06 for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2024 07:31:32 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sus9D-0000KM-NW for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2024 07:31:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=uuXgXaJ5Ruyd4YFtdS4o1kTJzReoRSUYQ0X3itgvbRA=; b=gpYXjtDzSSQ7vsSMiZMFRVxUg7PX7ox4snbaeB5ZyjntDKd/M09VFjp6fZmTRDFLPKHCeE8HzlG0tAbj5f7NdzBQ1jdpk4OQ7mr2CPE1MzoOjPFacuhlHIfy/pw4rS2OnyL2khQIaufPhCj0Pzn6y9DxBC3BbglkQbQxXpWO+6HFqMRTkMf4uJ4YuQ3o2wUBh0ynMJ3OOIU/ZYxu9WaTWYKSc0kbax0izNP4mSnQlIlahYfG8T7fhD5144Fh25qpCAkGuvVZbgCvNf6EjAmDBXgOqrItrj6JPggGPfe/9tUNsJuJ8a8dGbYvN3XSUV6BJPNrdv90D3fW38/JDZGy4g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sus9i-0006BY-SN for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2024 07:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Sep 2024 11:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73552 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: Emacs Bug Report , Eli Zaretskii , Stefan Monnier Original-Received: via spool by submit@debbugs.gnu.org id=B.172760950923690 (code B ref -1); Sun, 29 Sep 2024 11:32:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Sep 2024 11:31:49 +0000 Original-Received: from localhost ([127.0.0.1]:40186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sus9V-0006A2-GO for submit@debbugs.gnu.org; Sun, 29 Sep 2024 07:31:49 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:41734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sus9T-00069u-Jc for submit@debbugs.gnu.org; Sun, 29 Sep 2024 07:31:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sus8y-0004WT-3x for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2024 07:31:16 -0400 Original-Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sus8u-0000J4-6K; Sun, 29 Sep 2024 07:31:15 -0400 Original-Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a8a7596b7dfso405138566b.0; Sun, 29 Sep 2024 04:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727609469; x=1728214269; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uuXgXaJ5Ruyd4YFtdS4o1kTJzReoRSUYQ0X3itgvbRA=; b=ks2UYBNfU+m2S0BfJaCIRk3k0Xg9BOb8C4ALnECt4/0Hn15Kc56HA2JgLtMU7qg11p D62N29PGYIgh140P7z5xjzDbUbDYU3tan6TNatMkPk2JZjzbMW0oAEGoOYjRK5o/UO67 gkwMCnum2F1FnuA7L/JWrC2SdfdGv3YetKSk1ooZ2rXNYzseiTC945DnZy6cBO3OU8gY Sq7zzFu0ViGr8czz61dzMjYmULDC2hBjrEBIP7EMsT6FtSiJUjX5uvN9Wib1kS3pyRZb soK/b4BnFHdVZ8DzOnPs+ZYLHiwML4o1uEatBBxWe02Zlsw8AXKJCB3MFGBRfWZpLOV3 QBxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727609469; x=1728214269; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=uuXgXaJ5Ruyd4YFtdS4o1kTJzReoRSUYQ0X3itgvbRA=; b=ndLJwmtruTyGhZ8yRPkqb/GaHy1hXEbrPqTyH3L9SNfT9SSTTMiaMAJvxoh0ROojvM HVmv8PXgEhKmD+RxJ5dpF+MP36C3vrpv4MqlJBC0Mv9nyYnywrYNOEqlpiCv43DuONG4 8CCBSNMyWS/euJ+ESVUlfQRV+HWa8YQ94bj038WZ+tkwzudkwQwf9DuC8nJIISdSu+Fh Or21SnqMqVTTKujHauHxjUrIZZ77YOv2sO7LLxDY4E3CxRhltu3E1gA8uA9q5j3HXjkg wQSEywd6XBhUvTutk7Pmuzi46cTY3pFSyzSbBR/IpzZu/IUMh+pxmfXaUnlfd1fvkbgV nT1A== X-Forwarded-Encrypted: i=1; AJvYcCUoqkh6/1l7xzKJqstkIuNZic5I9joRzhsbTRT4L9jL2xlXLvWbp3n+JZ+YZULGw9S3djzi@gnu.org X-Gm-Message-State: AOJu0Yw18TIsHD5Zep9L5KrTaHPms36VWJTJVlUpG3k6h29fdh9wbuHN J0JGKO4v5HDZeYIocUxZX/bvdVojIrDSlhBS3w3KJpOMQ+hIh3nd7lUweg== X-Google-Smtp-Source: AGHT+IHLUcLwWWbxKu6Oo8m3gCo8bgCwxMZBtG4B1/CRh1/AyAd9vrGp1GJPqu6D3AkxxGU8EgStNQ== X-Received: by 2002:a17:907:2d90:b0:a8b:58e3:ac1f with SMTP id a640c23a62f3a-a93c30c3b8fmr874730166b.12.1727609469274; Sun, 29 Sep 2024 04:31:09 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3ae30.dip0.t-ipconnect.de. [79.227.174.48]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c2947a86sm363324466b.124.2024.09.29.04.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 04:31:08 -0700 (PDT) In-Reply-To: ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Sun, 29 Sep 2024 12:49:44 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292630 Archived-At: Mattias Engdeg=C3=A5rd writes: > 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) > =3D> bon bon ; not inverted > > (insert (propertize "non non" 'font-lock-face '(:reverse-video t)) ?\n) > =3D> 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 th= at 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 ma= ybe not now? > - Should we remove :bold and :italic? Yes, but definitely not now. FWIW I'm pretty sure that I added :italic, :bold, :reverse-video to what later became Emacs 21 only for backwards compatibility with the old pre-21 face implementation. At least on the surface, because 21 faces work completely differently. (I also seem to remeber that reverse-video was a synonym for inverse-video in the old code, maybe even undocumented. Too lazy to look that up ATM, though :-).)