Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [PATH] Honor $INSIDE_EMACS, not only $EMACS.
  2015-10-29 17:10 [PATH] Honor $INSIDE_EMACS, not only $EMACS Eli Zaretskii
@ 2015-10-29 17:10 ` Pedro Alves
  2015-10-29 17:50   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2015-10-29 17:10 UTC (permalink / raw)
  To: Eli Zaretskii, gdb-patches

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  <eliz@gnu.org>
> +
> +	* 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATH] Honor $INSIDE_EMACS, not only $EMACS.
@ 2015-10-29 17:10 Eli Zaretskii
  2015-10-29 17:10 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2015-10-29 17:10 UTC (permalink / raw)
  To: gdb-patches

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  <eliz@gnu.org>
+
+	* 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  <palves@redhat.com>
 
 	* 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATH] Honor $INSIDE_EMACS, not only $EMACS.
  2015-10-29 17:10 ` Pedro Alves
@ 2015-10-29 17:50   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2015-10-29 17:50 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

> Date: Thu, 29 Oct 2015 16:50:50 +0000
> From: Pedro Alves <palves@redhat.com>
> 
> > 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  <eliz@gnu.org>
> > +
> > +	* 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, pushed.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-29 17:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-29 17:10 [PATH] Honor $INSIDE_EMACS, not only $EMACS Eli Zaretskii
2015-10-29 17:10 ` Pedro Alves
2015-10-29 17:50   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox