From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#11430: 24.0.96; Customizing `inverse-video' has no effect on session Date: Fri, 01 Nov 2019 20:58:18 +0100 Message-ID: <87k18jxtb9.fsf@marxist.se> References: <87sirsewrg.fsf@building.gnus.org> <87lfszihrv.fsf@skangas.se> <12b63a55-3b24-4e61-962a-29754f2e0b84@default> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="40665"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 11430@debbugs.gnu.org, Lars Ingebrigtsen , Stefan Kangas To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 01 20:59:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iQd4g-000AU2-KN for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Nov 2019 20:59:10 +0100 Original-Received: from localhost ([::1]:42524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQd4f-0005Ir-GE for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Nov 2019 15:59:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38680) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQd4Z-0005Ih-Hb for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 15:59:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQd4Y-0006Jb-9N for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 15:59:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48422) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iQd4Y-0006JE-3Z for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 15:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iQd4Y-0000Yb-0n for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 15:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Nov 2019 19:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11430 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 11430-submit@debbugs.gnu.org id=B11430.15726383102086 (code B ref 11430); Fri, 01 Nov 2019 19:59:01 +0000 Original-Received: (at 11430) by debbugs.gnu.org; 1 Nov 2019 19:58:30 +0000 Original-Received: from localhost ([127.0.0.1]:57243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQd42-0000Xa-2L for submit@debbugs.gnu.org; Fri, 01 Nov 2019 15:58:30 -0400 Original-Received: from host.gofardesign.uk ([208.79.239.190]:33820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQd40-0000XL-V2 for 11430@debbugs.gnu.org; Fri, 01 Nov 2019 15:58:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LsTOhcwfCetprHvfPE1692AbknTMN1ZO5qhiixGivP0=; b=Lg2uvfWfUzl+aiybK7TutYv8Ra PgRgjJaj+VtfFDp2PyDn4TUMaUcCNMX06ZW64gYrMxgdnMomMbw0WODdsuwjGl8gLIG2mgtj80aMl VVy86cJEF2HjtZ2GPOcj2IoYkd/rjLU6gooqmVYAB2kIvNGo22Z/g1M3qBuJ6EI3KmmA=; Original-Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:58000 helo=localhost) by host.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iQd3r-00081V-P4; Fri, 01 Nov 2019 14:58:20 -0500 In-Reply-To: <12b63a55-3b24-4e61-962a-29754f2e0b84@default> (Drew Adams's message of "Fri, 1 Nov 2019 11:24:07 -0700 (PDT)") X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: host.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: host.gofardesign.uk: stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170668 Archived-At: --=-=-= Content-Type: text/plain Drew Adams 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 >> [...] >> > 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 >> > >> > * 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=inverse-video.diff 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, 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)) --=-=-=--