unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
@ 2012-05-07 16:38 Drew Adams
  2012-09-16 23:57 ` Drew Adams
  2014-02-09  4:27 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 15+ messages in thread
From: Drew Adams @ 2012-05-07 16:38 UTC (permalink / raw)
  To: 11430

emacs -Q
M-x customize-variable inverse-video
Toggle the value to choose inverse video.  Set for current session.
 
It has no effect, either on existing frames or on new ones.

But doing this has the desired effect:
M-x customize-face default
Turn on attribute `inverse-video'.  Set for current session.

Setting user option `inverse-video' should have the same effect: it
should affect the current session.

In GNU Emacs 24.0.96.1 (i386-mingw-nt5.1.2600)
 of 2012-04-28 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include'
 






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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2012-05-07 16:38 bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session Drew Adams
@ 2012-09-16 23:57 ` Drew Adams
  2014-02-09  4:27 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 15+ messages in thread
From: Drew Adams @ 2012-09-16 23:57 UTC (permalink / raw)
  To: 11430

ping






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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2012-05-07 16:38 bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session Drew Adams
  2012-09-16 23:57 ` Drew Adams
@ 2014-02-09  4:27 ` Lars Ingebrigtsen
  2019-11-01 18:16   ` Stefan Kangas
  1 sibling, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-09  4:27 UTC (permalink / raw)
  To: Drew Adams; +Cc: 11430

"Drew Adams" <drew.adams@oracle.com> writes:

> emacs -Q
> M-x customize-variable inverse-video
> Toggle the value to choose inverse video.  Set for current session.
>
> It has no effect, either on existing frames or on new ones.

Hm.  Is this a deprecated variable or something?  Or is it only used on
startup?  In any case, the doc string should probably mention this,
whatever is going on...

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2014-02-09  4:27 ` Lars Ingebrigtsen
@ 2019-11-01 18:16   ` Stefan Kangas
  2019-11-01 18:24     ` Drew Adams
  0 siblings, 1 reply; 15+ messages in thread
From: Stefan Kangas @ 2019-11-01 18:16 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 11430

Lars Ingebrigtsen <larsi@gnus.org> writes:

> "Drew Adams" <drew.adams@oracle.com> writes:
>
>> emacs -Q
>> M-x customize-variable inverse-video
>> Toggle the value to choose inverse video.  Set for current session.
>>
>> It has no effect, either on existing frames or on new ones.
>
> Hm.  Is this a deprecated variable or something?  Or is it only used on
> startup?  In any case, the doc string should probably mention this,
> whatever is going on...

Not sure what it is.  It seems to be orthogonal to "emacs
--reverse-video", and has no effect when I try setting it manually in a
running session, nor when I run "emacs --eval='(setq inverse-video t)'
-Q -nw".

It was removed from the manual here:
b4a1a8b278 2010-03-02 Chong Yidong * frames.texi (Mouse Avoidance): Mention make-pointer-invisible.

I also found the following:

./src/ChangeLog.9:

> 2001-10-20  Miles Bader  <miles@gnu.org>
[...]
> 	The following changes remove inverse-video support for terminals
> 	that use a `magic cookie' standout mode.  Due to changes in the
> 	way mode-lines are displayed, such support no longer works
> 	anyway, and it's probable that almost no one uses such terminals
> 	anymore:
[...]
> 2001-04-25  Gerd Moellmann  <gerd@gnu.org>
> 
> 	* faces.el (tty-handle-reverse-video): Don't set inverse-video.

So I have the same question as Lars: is this just some old obsolete
variable that should be removed?

Best regards,
Stefan Kangas





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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2019-11-01 18:16   ` Stefan Kangas
@ 2019-11-01 18:24     ` Drew Adams
  2019-11-01 19:58       ` Stefan Kangas
  0 siblings, 1 reply; 15+ messages in thread
From: Drew Adams @ 2019-11-01 18:24 UTC (permalink / raw)
  To: Stefan Kangas, Lars Ingebrigtsen; +Cc: 11430

> >> emacs -Q
> >> M-x customize-variable inverse-video
> >> Toggle the value to choose inverse video.  Set for current session.
> >>
> >> It has no effect, either on existing frames or on new ones.
> >
> > Hm.  Is this a deprecated variable or something?  Or is it only used
> on
> > startup?  In any case, the doc string should probably mention this,
> > whatever is going on...
> 
> Not sure what it is.  It seems to be orthogonal to "emacs
> --reverse-video", and has no effect when I try setting it manually in a
> running session, nor when I run "emacs --eval='(setq inverse-video t)'
> -Q -nw".
> 
> It was removed from the manual here:
> b4a1a8b278 2010-03-02 Chong Yidong * frames.texi (Mouse Avoidance):
> Mention make-pointer-invisible.
> 
> I also found the following:
> 
> ./src/ChangeLog.9:
> 
> > 2001-10-20  Miles Bader  <miles@gnu.org>
> [...]
> > 	The following changes remove inverse-video support for terminals
> > 	that use a `magic cookie' standout mode.  Due to changes in the
> > 	way mode-lines are displayed, such support no longer works
> > 	anyway, and it's probable that almost no one uses such terminals
> > 	anymore:
> [...]
> > 2001-04-25  Gerd Moellmann  <gerd@gnu.org>
> >
> > 	* faces.el (tty-handle-reverse-video): Don't set inverse-video.
> 
> So I have the same question as Lars: is this just some old obsolete
> variable that should be removed?

Why would it be obsolete?  Anyway, it's in the C source code still.





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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2019-11-01 18:24     ` Drew Adams
@ 2019-11-01 19:58       ` Stefan Kangas
  2019-11-01 21:06         ` Drew Adams
  2019-11-02  9:45         ` Eli Zaretskii
  0 siblings, 2 replies; 15+ messages in thread
From: Stefan Kangas @ 2019-11-01 19:58 UTC (permalink / raw)
  To: Drew Adams; +Cc: 11430, Lars Ingebrigtsen, Stefan Kangas

[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]

Drew Adams <drew.adams@oracle.com> writes:

>> Not sure what it is.  It seems to be orthogonal to "emacs
>> --reverse-video", and has no effect when I try setting it manually in a
>> running session, nor when I run "emacs --eval='(setq inverse-video t)'
>> -Q -nw".
>> 
>> It was removed from the manual here:
>> b4a1a8b278 2010-03-02 Chong Yidong * frames.texi (Mouse Avoidance):
>> Mention make-pointer-invisible.
>> 
>> I also found the following:
>> 
>> ./src/ChangeLog.9:
>> 
>> > 2001-10-20  Miles Bader  <miles@gnu.org>
>> [...]
>> > 	The following changes remove inverse-video support for terminals
>> > 	that use a `magic cookie' standout mode.  Due to changes in the
>> > 	way mode-lines are displayed, such support no longer works
>> > 	anyway, and it's probable that almost no one uses such terminals
>> > 	anymore:
>> [...]
>> > 2001-04-25  Gerd Moellmann  <gerd@gnu.org>
>> >
>> > 	* faces.el (tty-handle-reverse-video): Don't set inverse-video.
>> 
>> So I have the same question as Lars: is this just some old obsolete
>> variable that should be removed?
>
> Why would it be obsolete?  Anyway, it's in the C source code still.

As I said, I can't discern any visible effects from setting it to t.

By the way, the attached patch removes the variable.  I'm not suggesting
to install it as is, but perhaps it could be useful in figuring out what
the inverse-video variable does and what to do about it.

Best regards,
Stefan Kangas


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: inverse-video.diff --]
[-- Type: text/x-diff, Size: 2931 bytes --]

diff --git a/src/dispnew.c b/src/dispnew.c
index 4cdc76f5bc..6cea3b8de6 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6234,7 +6234,6 @@ init_display_interactive (void)
   SET_CHAR_GLYPH (space_glyph, ' ', DEFAULT_FACE_ID, 0);
   space_glyph.charpos = -1;
 
-  inverse_video = 0;
   cursor_in_echo_area = false;
 
   /* Now is the time to initialize this; it's used by init_sys_modes
@@ -6497,10 +6496,6 @@ syms_of_display (void)
 On most systems, changing this value will affect the amount of padding
 and the other strategic decisions made during redisplay.  */);
 
-  DEFVAR_BOOL ("inverse-video", inverse_video,
-	       doc: /* Non-nil means invert the entire frame display.
-This means everything is in inverse video which otherwise would not be.  */);
-
   DEFVAR_BOOL ("visible-bell", visible_bell,
 	       doc: /* Non-nil means try to flash the frame to represent a bell.
 
diff --git a/src/msdos.c b/src/msdos.c
index 1192b37a0d..e1ba6d0813 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -838,14 +838,6 @@ IT_set_face (int face)
       fg = bg;
       bg = tem;
     }
-  /* If the user requested inverse video, obey.  */
-  if (inverse_video)
-    {
-      unsigned long tem2 = fg;
-
-      fg = bg;
-      bg = tem2;
-    }
   if (tty->termscript)
     fprintf (tty->termscript, "<FACE %d: %lu/%lu[FG:%lu/BG:%lu]>", face,
 	     fp->foreground, fp->background, fg, bg);
diff --git a/src/term.c b/src/term.c
index 642010549b..9407385540 100644
--- a/src/term.c
+++ b/src/term.c
@@ -356,16 +356,12 @@ tty_show_cursor (struct tty_display_info *tty)
 
 
 /* Set standout mode to the state it should be in for
-   empty space inside windows.  What this is,
-   depends on the user option inverse-video.  */
+   empty space inside windows.  */
 
 static void
 tty_background_highlight (struct tty_display_info *tty)
 {
-  if (inverse_video)
-    tty_turn_on_highlight (tty);
-  else
-    tty_turn_off_highlight (tty);
+  tty_turn_off_highlight (tty);
 }
 
 /* Set standout mode to the mode specified for the text to be output.  */
@@ -373,10 +369,7 @@ tty_background_highlight (struct tty_display_info *tty)
 static void
 tty_highlight_if_desired (struct tty_display_info *tty)
 {
-  if (inverse_video)
-    tty_turn_on_highlight (tty);
-  else
-    tty_turn_off_highlight (tty);
+  tty_turn_off_highlight (tty);
 }
 \f
 
@@ -1909,9 +1902,7 @@ turn_on_face (struct frame *f, int face_id)
      Do this first because TS_end_standout_mode may be the same
      as TS_exit_attribute_mode, which turns all appearances off. */
   if (MAY_USE_WITH_COLORS_P (tty, NC_REVERSE)
-      && (inverse_video
-	  ? fg == FACE_TTY_DEFAULT_FG_COLOR || bg == FACE_TTY_DEFAULT_BG_COLOR
-	  : fg == FACE_TTY_DEFAULT_BG_COLOR || bg == FACE_TTY_DEFAULT_FG_COLOR))
+      && (fg == FACE_TTY_DEFAULT_BG_COLOR || bg == FACE_TTY_DEFAULT_FG_COLOR))
     tty_toggle_highlight (tty);
 
   if (face->tty_bold_p && MAY_USE_WITH_COLORS_P (tty, NC_BOLD))

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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2019-11-01 19:58       ` Stefan Kangas
@ 2019-11-01 21:06         ` Drew Adams
  2019-11-02  9:45         ` Eli Zaretskii
  1 sibling, 0 replies; 15+ messages in thread
From: Drew Adams @ 2019-11-01 21:06 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 11430, Lars Ingebrigtsen

> > Why would it be obsolete?  Anyway, it's in the C source code still.
> 
> As I said, I can't discern any visible effects from setting it to t.
> 
> By the way, the attached patch removes the variable.  I'm not
> suggesting to install it as is, but perhaps it could be useful
> in figuring out what the inverse-video variable does and what
> to do about it.

OK by me. 

I was hoping someone might know what this is about,
but I guess it's too late for that.





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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2019-11-01 19:58       ` Stefan Kangas
  2019-11-01 21:06         ` Drew Adams
@ 2019-11-02  9:45         ` Eli Zaretskii
  2019-11-02 11:06           ` Stefan Kangas
  2020-09-21 15:03           ` Lars Ingebrigtsen
  1 sibling, 2 replies; 15+ messages in thread
From: Eli Zaretskii @ 2019-11-02  9:45 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 11430, larsi, stefan

> From: Stefan Kangas <stefan@marxist.se>
> Date: Fri, 01 Nov 2019 20:58:18 +0100
> Cc: 11430@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>,
>  Stefan Kangas <stefan@marxist.se>
> 
> > Why would it be obsolete?  Anyway, it's in the C source code still.
> 
> As I said, I can't discern any visible effects from setting it to t.

It's a bug, plain and simple, that setting that variable doesn't
affect the display.

Fixing the bug may not be easy, and isn't high priority, but it
nevertheless is a bug.

FWIW, I see no reason to remove the variable just because we don't
seem to know how to fix this.





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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2019-11-02  9:45         ` Eli Zaretskii
@ 2019-11-02 11:06           ` Stefan Kangas
  2020-09-21 15:03           ` Lars Ingebrigtsen
  1 sibling, 0 replies; 15+ messages in thread
From: Stefan Kangas @ 2019-11-02 11:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 11430, Lars Ingebrigtsen

Eli Zaretskii <eliz@gnu.org> writes:
> It's a bug, plain and simple, that setting that variable doesn't
> affect the display.
>
> Fixing the bug may not be easy, and isn't high priority, but it
> nevertheless is a bug.
>
> FWIW, I see no reason to remove the variable just because we don't
> seem to know how to fix this.

I'd argue it's not an important feature.  It seems like it's been
broken for a long time without anyone complaining.  We could remove it
and refer any existing users to "emacs -rv" instead.

Just my two cents, but I don't feel strongly either way.

Best regards,
Stefan Kangas





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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2019-11-02  9:45         ` Eli Zaretskii
  2019-11-02 11:06           ` Stefan Kangas
@ 2020-09-21 15:03           ` Lars Ingebrigtsen
  2020-09-21 15:33             ` Drew Adams
  2020-09-21 15:36             ` Eli Zaretskii
  1 sibling, 2 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-21 15:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 11430, Stefan Kangas

Eli Zaretskii <eliz@gnu.org> writes:

> It's a bug, plain and simple, that setting that variable doesn't
> affect the display.
>
> Fixing the bug may not be easy, and isn't high priority, but it
> nevertheless is a bug.
>
> FWIW, I see no reason to remove the variable just because we don't
> seem to know how to fix this.

The variable hasn't worked for 20 years (apparently), and this is the
only bug report about it, which is perhaps a hint that we should just
remove it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2020-09-21 15:03           ` Lars Ingebrigtsen
@ 2020-09-21 15:33             ` Drew Adams
  2020-09-21 15:36             ` Eli Zaretskii
  1 sibling, 0 replies; 15+ messages in thread
From: Drew Adams @ 2020-09-21 15:33 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Eli Zaretskii; +Cc: 11430, Stefan Kangas

> The variable hasn't worked for 20 years (apparently), and this is the
> only bug report about it, which is perhaps a hint that we should just
> remove it.

It doesn't follow that we should remove it.
A bug is a bug.  Better to keep this bug open.
Someday, perhaps, Someone(TM) will be motivated
and find a way to fix it.  And if not, so what?

What harm does it do to keep a report open for
a recognized bug?  When it comes to free software
and its volunteers, no one's career is boosted by
just reducing a bug count as an end in itself.
Or am I missing something?





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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2020-09-21 15:03           ` Lars Ingebrigtsen
  2020-09-21 15:33             ` Drew Adams
@ 2020-09-21 15:36             ` Eli Zaretskii
  2020-09-22 14:10               ` Lars Ingebrigtsen
  1 sibling, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2020-09-21 15:36 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 11430, stefan

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Stefan Kangas <stefan@marxist.se>,  11430@debbugs.gnu.org,
>   drew.adams@oracle.com
> Date: Mon, 21 Sep 2020 17:03:36 +0200
> 
> > FWIW, I see no reason to remove the variable just because we don't
> > seem to know how to fix this.
> 
> The variable hasn't worked for 20 years (apparently), and this is the
> only bug report about it, which is perhaps a hint that we should just
> remove it.

I'm asking not to remove it yet.  Maybe one of these days I will find
time to work on this.  It bugs me (pun intended) that this veteran
feature stopped working on TTY frames.





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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2020-09-21 15:36             ` Eli Zaretskii
@ 2020-09-22 14:10               ` Lars Ingebrigtsen
  2024-06-23 18:52                 ` Stefan Kangas
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-22 14:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 11430, stefan

Eli Zaretskii <eliz@gnu.org> writes:

> I'm asking not to remove it yet.  Maybe one of these days I will find
> time to work on this.  It bugs me (pun intended) that this veteran
> feature stopped working on TTY frames.

My point is that now -- 20 years after this stopped working -- we should
step back a bit and look at whether this functionality (which must at
this remove be seen to be a new feature) makes sense.

And I don't think it does much.  Setting a variable that makes the Emacs
display go inverse?  That's just kinda odd.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2020-09-22 14:10               ` Lars Ingebrigtsen
@ 2024-06-23 18:52                 ` Stefan Kangas
  2024-06-23 19:27                   ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Stefan Kangas @ 2024-06-23 18:52 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 11430, Eli Zaretskii, drew.adams

[-- Attachment #1: Type: text/plain, Size: 736 bytes --]

tags 11430 + patch
thanks

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>> I'm asking not to remove it yet.  Maybe one of these days I will find
>> time to work on this.  It bugs me (pun intended) that this veteran
>> feature stopped working on TTY frames.
>
> My point is that now -- 20 years after this stopped working -- we should
> step back a bit and look at whether this functionality (which must at
> this remove be seen to be a new feature) makes sense.
>
> And I don't think it does much.  Setting a variable that makes the Emacs
> display go inverse?  That's just kinda odd.

(That was four years ago.)

The attached patch obsoletes 'inverse-video' and makes the variable into
a no-op.

[-- Attachment #2: 0001-Make-inverse-video-obsolete.patch --]
[-- Type: text/x-diff, Size: 8617 bytes --]

From 2359fdd0f4d36533853704cd023c1dd2115917c2 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Sun, 23 Jun 2024 19:51:23 +0200
Subject: [PATCH] Make 'inverse-video' obsolete

* src/dispnew.c (syms_of_display) <inverse-video>:
* lisp/subr.el (inverse-video): Declare variable as obsolete.
* src/msdos.c (IT_set_face): Don't use above variable.
* lisp/cus-start.el (standard): Remove variable 'inverse-video'
* src/term.c (tty_background_highlight, tty_highlight_if_desired):
Inline calls to 'tty_turn_off_highlight' and delete functions.
Update all callers.  (Bug#11430)
---
 etc/NEWS          |  4 ++++
 lisp/cus-start.el |  1 -
 lisp/subr.el      |  2 ++
 src/dispnew.c     |  3 +--
 src/msdos.c       |  8 --------
 src/term.c        | 52 ++++++++++++-----------------------------------
 6 files changed, 20 insertions(+), 50 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index af32a93d9c4..a034410448a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -30,6 +30,10 @@ applies, and please also update docstrings as needed.
 \f
 * Changes in Emacs 31.1
 
+** The user option 'inverse-video' is now obsolete.
+It has been broken for a long time, and is now declared obsolete.
+Setting it no longer has an effect.
+
 \f
 * Editing Changes in Emacs 31.1
 
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index a3299cde564..2c161a18f6a 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -228,7 +228,6 @@ minibuffer-prompt-properties--setter
 					    (repeat (string :format "%v")))
 	     ;; dispnew.c
 	     (baud-rate display integer)
-	     (inverse-video display boolean)
 	     (visible-bell display boolean)
 	     (no-redraw-on-reenter display boolean)
 	     (mouse-prefer-closest-glyph display boolean)
diff --git a/lisp/subr.el b/lisp/subr.el
index ab388630a91..782b2dd5c15 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2043,6 +2043,8 @@ 'native-comp-deferred-compilation
 
 (define-obsolete-function-alias 'fetch-bytecode #'ignore "30.1")
 
+(make-obsolete-variable 'inverse-video nil "31.1")
+
 \f
 ;;;; Alternate names for functions - these are not being phased out.
 
diff --git a/src/dispnew.c b/src/dispnew.c
index 8bbb818bc19..36c047bba9b 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6827,8 +6827,7 @@ syms_of_display (void)
 and the other strategic decisions made during redisplay.  */);
 
   DEFVAR_BOOL ("inverse-video", inverse_video,
-	       doc: /* Non-nil means invert the entire frame display.
-This means everything is in inverse video which otherwise would not be.  */);
+	       doc: /* This variable is obsolete, and has no effect.  */);
 
   DEFVAR_BOOL ("visible-bell", visible_bell,
 	       doc: /* Non-nil means try to flash the frame to represent a bell.
diff --git a/src/msdos.c b/src/msdos.c
index e9faa48fa70..72c14c2c6d0 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -838,14 +838,6 @@ IT_set_face (int face)
       fg = bg;
       bg = tem;
     }
-  /* If the user requested inverse video, obey.  */
-  if (inverse_video)
-    {
-      unsigned long tem2 = fg;
-
-      fg = bg;
-      bg = tem2;
-    }
   if (tty->termscript)
     fprintf (tty->termscript, "<FACE %d: %lu/%lu[FG:%lu/BG:%lu]>", face,
 	     fp->foreground, fp->background, fg, bg);
diff --git a/src/term.c b/src/term.c
index 1f524880054..11914ef696d 100644
--- a/src/term.c
+++ b/src/term.c
@@ -70,7 +70,6 @@
 static void tty_turn_off_highlight (struct tty_display_info *);
 static void tty_show_cursor (struct tty_display_info *);
 static void tty_hide_cursor (struct tty_display_info *);
-static void tty_background_highlight (struct tty_display_info *tty);
 static void clear_tty_hooks (struct terminal *terminal);
 static void set_tty_hooks (struct terminal *terminal);
 static void dissociate_if_controlling_tty (int fd);
@@ -252,7 +251,7 @@ tty_update_end (struct frame *f)
   if (!XWINDOW (selected_window)->cursor_off_p)
     tty_show_cursor (tty);
   tty_turn_off_insert (tty);
-  tty_background_highlight (tty);
+  tty_turn_off_highlight (tty);
   fflush (tty->output);
 }
 
@@ -370,29 +369,6 @@ tty_show_cursor (struct tty_display_info *tty)
 }
 
 
-/* Set standout mode to the state it should be in for
-   empty space inside windows.  What this is,
-   depends on the user option inverse-video.  */
-
-static void
-tty_background_highlight (struct tty_display_info *tty)
-{
-  if (inverse_video)
-    tty_turn_on_highlight (tty);
-  else
-    tty_turn_off_highlight (tty);
-}
-
-/* Set standout mode to the mode specified for the text to be output.  */
-
-static void
-tty_highlight_if_desired (struct tty_display_info *tty)
-{
-  if (inverse_video)
-    tty_turn_on_highlight (tty);
-  else
-    tty_turn_off_highlight (tty);
-}
 \f
 
 /* Move cursor to row/column position VPOS/HPOS.  HPOS/VPOS are
@@ -412,7 +388,7 @@ tty_cursor_to (struct frame *f, int vpos, int hpos)
       && curX (tty) == hpos)
     return;
   if (!tty->TF_standout_motion)
-    tty_background_highlight (tty);
+    tty_turn_off_highlight (tty);
   if (!tty->TF_insmode_motion)
     tty_turn_off_insert (tty);
   cmgoto (tty, vpos, hpos);
@@ -429,7 +405,7 @@ tty_raw_cursor_to (struct frame *f, int row, int col)
       && curX (tty) == col)
     return;
   if (!tty->TF_standout_motion)
-    tty_background_highlight (tty);
+    tty_turn_off_highlight (tty);
   if (!tty->TF_insmode_motion)
     tty_turn_off_insert (tty);
   cmgoto (tty, row, col);
@@ -447,7 +423,7 @@ tty_clear_to_end (struct frame *f)
 
   if (tty->TS_clr_to_bottom)
     {
-      tty_background_highlight (tty);
+      tty_turn_off_highlight (tty);
       OUTPUT (tty, tty->TS_clr_to_bottom);
     }
   else
@@ -469,7 +445,7 @@ tty_clear_frame (struct frame *f)
 
   if (tty->TS_clr_frame)
     {
-      tty_background_highlight (tty);
+      tty_turn_off_highlight (tty);
       OUTPUT (tty, tty->TS_clr_frame);
       cmat (tty, 0, 0);
     }
@@ -497,7 +473,7 @@ tty_clear_end_of_line (struct frame *f, int first_unused_hpos)
 
   if (curX (tty) >= first_unused_hpos)
     return;
-  tty_background_highlight (tty);
+  tty_turn_off_highlight (tty);
   if (tty->TS_clr_line)
     {
       OUTPUT1 (tty, tty->TS_clr_line);
@@ -793,7 +769,7 @@ tty_write_glyphs (struct frame *f, struct glyph *string, int len)
 	  break;
 
       /* Turn appearance modes of the face of the run on.  */
-      tty_highlight_if_desired (tty);
+      tty_turn_off_highlight (tty);
       turn_on_face (f, face_id);
 
       if (n == stringlen)
@@ -855,7 +831,7 @@ tty_write_glyphs_with_face (register struct frame *f, register struct glyph *str
   coding->mode &= ~CODING_MODE_LAST_BLOCK;
 
   /* Turn appearance modes of the face.  */
-  tty_highlight_if_desired (tty);
+  tty_turn_off_highlight (tty);
   turn_on_face (f, face_id);
 
   coding->mode |= CODING_MODE_LAST_BLOCK;
@@ -927,7 +903,7 @@ tty_insert_glyphs (struct frame *f, struct glyph *start, int len)
 	}
       else
 	{
-	  tty_highlight_if_desired (tty);
+	  tty_turn_off_highlight (tty);
 	  turn_on_face (f, start->face_id);
 	  glyph = start;
 	  ++start;
@@ -1031,7 +1007,7 @@ tty_ins_del_lines (struct frame *f, int vpos, int n)
   if (multi)
     {
       raw_cursor_to (f, vpos, 0);
-      tty_background_highlight (tty);
+      tty_turn_off_highlight (tty);
       buf = tparam (multi, 0, 0, i, 0, 0, 0);
       OUTPUT (tty, buf);
       xfree (buf);
@@ -1039,7 +1015,7 @@ tty_ins_del_lines (struct frame *f, int vpos, int n)
   else if (single)
     {
       raw_cursor_to (f, vpos, 0);
-      tty_background_highlight (tty);
+      tty_turn_off_highlight (tty);
       while (--i >= 0)
         OUTPUT (tty, single);
       if (tty->TF_teleray)
@@ -1052,7 +1028,7 @@ tty_ins_del_lines (struct frame *f, int vpos, int n)
         raw_cursor_to (f, tty->specified_window - 1, 0);
       else
         raw_cursor_to (f, vpos, 0);
-      tty_background_highlight (tty);
+      tty_turn_off_highlight (tty);
       while (--i >= 0)
         OUTPUTL (tty, scroll, tty->specified_window - vpos);
       tty_set_scroll_region (f, 0, tty->specified_window);
@@ -1992,9 +1968,7 @@ turn_on_face (struct frame *f, int face_id)
      Do this first because TS_end_standout_mode may be the same
      as TS_exit_attribute_mode, which turns all appearances off. */
   if (MAY_USE_WITH_COLORS_P (tty, NC_REVERSE)
-      && (inverse_video
-	  ? fg == FACE_TTY_DEFAULT_FG_COLOR || bg == FACE_TTY_DEFAULT_BG_COLOR
-	  : fg == FACE_TTY_DEFAULT_BG_COLOR || bg == FACE_TTY_DEFAULT_FG_COLOR))
+      && (fg == FACE_TTY_DEFAULT_BG_COLOR || bg == FACE_TTY_DEFAULT_FG_COLOR))
     tty_toggle_highlight (tty);
 
   if (face->tty_bold_p && MAY_USE_WITH_COLORS_P (tty, NC_BOLD))
-- 
2.39.2


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

* bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session
  2024-06-23 18:52                 ` Stefan Kangas
@ 2024-06-23 19:27                   ` Eli Zaretskii
  0 siblings, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2024-06-23 19:27 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 11430, larsi, drew.adams

> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Sun, 23 Jun 2024 11:52:25 -0700
> Cc: Eli Zaretskii <eliz@gnu.org>, 11430@debbugs.gnu.org, drew.adams@oracle.com
> 
> Lars Ingebrigtsen <larsi@gnus.org> writes:
> 
> > Eli Zaretskii <eliz@gnu.org> writes:
> >
> >> I'm asking not to remove it yet.  Maybe one of these days I will find
> >> time to work on this.  It bugs me (pun intended) that this veteran
> >> feature stopped working on TTY frames.
> >
> > My point is that now -- 20 years after this stopped working -- we should
> > step back a bit and look at whether this functionality (which must at
> > this remove be seen to be a new feature) makes sense.
> >
> > And I don't think it does much.  Setting a variable that makes the Emacs
> > display go inverse?  That's just kinda odd.
> 
> (That was four years ago.)
> 
> The attached patch obsoletes 'inverse-video' and makes the variable into
> a no-op.

Please wait some more, I'd like to look into making it work again (if
I ever find time for that...)





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

end of thread, other threads:[~2024-06-23 19:27 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-07 16:38 bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session Drew Adams
2012-09-16 23:57 ` Drew Adams
2014-02-09  4:27 ` Lars Ingebrigtsen
2019-11-01 18:16   ` Stefan Kangas
2019-11-01 18:24     ` Drew Adams
2019-11-01 19:58       ` Stefan Kangas
2019-11-01 21:06         ` Drew Adams
2019-11-02  9:45         ` Eli Zaretskii
2019-11-02 11:06           ` Stefan Kangas
2020-09-21 15:03           ` Lars Ingebrigtsen
2020-09-21 15:33             ` Drew Adams
2020-09-21 15:36             ` Eli Zaretskii
2020-09-22 14:10               ` Lars Ingebrigtsen
2024-06-23 18:52                 ` Stefan Kangas
2024-06-23 19:27                   ` Eli Zaretskii

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).