aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2015-10-29 19:25:28 +0200
committerEli Zaretskii <eliz@gnu.org>2015-10-29 19:27:31 +0200
commite681cf3fe50d3c8d17dabde079bbd949a59ef53a (patch)
tree875b61d2e0aea49cf03daf26f96b337919f7a576
parentebf05345dadb3fcb232cb788a9126e563f6bb767 (diff)
downloadgdb-e681cf3fe50d3c8d17dabde079bbd949a59ef53a.zip
gdb-e681cf3fe50d3c8d17dabde079bbd949a59ef53a.tar.gz
gdb-e681cf3fe50d3c8d17dabde079bbd949a59ef53a.tar.bz2
Disable paging when run by Emacs 25.1 and later.
gdb/ChangeLog: * utils.c (init_page_info): Disable paging if INSIDE_EMACS is set in the environment.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/utils.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 84fa773..000566e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-29 Eli Zaretskii <eliz@gnu.org>
+
+ * utils.c (init_page_info): Disable paging if INSIDE_EMACS is set
+ in the environment.
+
2015-10-29 Pedro Alves <palves@redhat.com>
* gnu-v2-abi.c (gnuv2_is_destructor_name)
diff --git a/gdb/utils.c b/gdb/utils.c
index 255aee8..bb13522 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1677,8 +1677,9 @@ 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. $EMACS was used
+ before Emacs v25.1, $INSIDE_EMACS is used since then. */
+ || 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