GNU bug report logs - #11430
24.0.96; Customizing `inverse-video' has no effect on session

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Mon, 7 May 2012 16:41:01 UTC

Severity: wishlist

Tags: confirmed, moreinfo, patch

Found in version 24.0.96

Full log


Message #22 received at 11430 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 11430 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Stefan Kangas <stefan <at> marxist.se>
Subject: Re: bug#11430: 24.0.96; Customizing `inverse-video' has no effect
 on session
Date: Fri, 01 Nov 2019 20:58:18 +0100
[Message part 1 (text/plain, inline)]
Drew Adams <drew.adams <at> 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 <at> 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 <at> 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

[inverse-video.diff (text/x-diff, inline)]
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);
 }
 
 
@@ -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))

This bug report was last modified 1 year and 51 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.