From patchwork Thu Oct 29 16:47:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Zaretskii X-Patchwork-Id: 9458 Received: (qmail 19318 invoked by alias); 29 Oct 2015 16:47:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 19307 invoked by uid 89); 29 Oct 2015 16:47:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout28.012.net.il Received: from mtaout28.012.net.il (HELO mtaout28.012.net.il) (80.179.55.184) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Oct 2015 16:47:36 +0000 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NWZ00700QI8ML00@mtaout28.012.net.il> for gdb-patches@sourceware.org; Thu, 29 Oct 2015 18:46:30 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWZ0027QQLIXU50@mtaout28.012.net.il> for gdb-patches@sourceware.org; Thu, 29 Oct 2015 18:46:30 +0200 (IST) Date: Thu, 29 Oct 2015 18:47:33 +0200 From: Eli Zaretskii Subject: [PATH] Honor $INSIDE_EMACS, not only $EMACS. To: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83r3kd1v16.fsf@gnu.org> X-IsSubscribed: yes Lately Emacs switched from defining $EMACS to $INSIDE_EMACS, when it runs subprocesses, so GDB needs to follow suit to disable paging. OK to commit the below? diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 66f6dd6..63a217f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2015-10-29 Eli Zaretskii + + * utils.c (init_page_info): Disable paging if INSIDE_EMACS is set + in the environment. Emacs 25 and later uses that variable instead + of EMACS. + 2015-10-29 Pedro Alves * common/common-exceptions.c (exception_none): Add cast. diff --git a/gdb/utils.c b/gdb/utils.c index 255aee8..968889c 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1677,8 +1677,8 @@ init_page_info (void) Only try to use tgetnum function if rl_get_screen_size did not return a useful value. */ if (((rows <= 0) && (tgetnum ("li") < 0)) - /* Also disable paging if inside EMACS. */ - || getenv ("EMACS")) + /* Also disable paging if inside Emacs. */ + || getenv ("EMACS") || getenv ("INSIDE_EMACS")) { /* The number of lines per page is not mentioned in the terminal description or EMACS evironment variable is set. This probably