From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34116 invoked by alias); 29 Oct 2015 16:51:05 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 34100 invoked by uid 89); 29 Oct 2015 16:51:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 29 Oct 2015 16:51:04 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 0618091EAF; Thu, 29 Oct 2015 16:51:02 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9TGoqD1012016; Thu, 29 Oct 2015 12:50:57 -0400 Message-ID: <56324E6A.3070003@redhat.com> Date: Thu, 29 Oct 2015 17:10:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Eli Zaretskii , gdb-patches@sourceware.org Subject: Re: [PATH] Honor $INSIDE_EMACS, not only $EMACS. References: <83r3kd1v16.fsf@gnu.org> In-Reply-To: <83r3kd1v16.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-10/txt/msg00701.txt.bz2 On 10/29/2015 04:47 PM, Eli Zaretskii wrote: > 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. The last sentence ("25 and later") ... > --- 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")) > { ... would be better moved to the comment here instead. LGTM with that change. Thanks, Pedro Alves