Subject: bug#7002: closed (Re: bug#7002: Emacs initializes the alternate screen twice)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 11 Sep 2010 12:59:03 +0000

Your bug report

#7002: Emacs initializes the alternate screen twice

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
7002: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7002
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#7002: Emacs initializes the alternate screen twice
From: Stefan Monnier <[email-masked]>
To: [email-masked]
Date: Sat, 11 Sep 2010 14:55:16 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> When a console-mode Emacs initializes its terminal, it sends the escape
> sequence to switch to the alternate screen twice. This causes problems
> when running under screen (and maybe other terminal programs as well):
> exiting or suspending Emacs completely clears the screen. I have
> attached a patch that fixes this.

Thanks, installed in the emacs-23 branch.

In the future, please include a name of some sort in your
communications, since we need it to maintain accurate
copyright information.

        Stefan

Subject: Emacs initializes the alternate screen twice
From: [email-masked]
To: [email-masked]
Date: Wed, 8 Sep 2010 18:41:57 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

When a console-mode Emacs initializes its terminal, it sends the escape
sequence to switch to the alternate screen twice. This causes problems
when running under screen (and maybe other terminal programs as well):
exiting or suspending Emacs completely clears the screen. I have
attached a patch that fixes this.
diff --git a/src/term.c b/src/term.c
index fda06d6..fc013be 100644
--- a/src/term.c
+++ b/src/term.c
@@ -250,7 +250,6 @@ tty_set_terminal_modes (struct terminal *terminal)
             cmputc ('\n');
         }

-      OUTPUT_IF (tty, tty->TS_termcap_modes);
       OUTPUT_IF (tty, visible_cursor ? tty->TS_cursor_visible : tty->TS_cursor_normal);
       OUTPUT_IF (tty, tty->TS_keypad_mode);
       losecursor (tty);