From ae56edbbf8fa49ffec2aa8983970f1665450670d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 9 Aug 2025 15:42:26 +0300 Subject: [PATCH] Revert "Stop subprocesses from using inherited or default PAGER" This reverts commit 7811a7d38bb7cb303dc66efa02eb95e75a03f39d. Users set PAGER and don't expect Emacs to override that. See https://lists.gnu.org/archive/html/emacs-devel/2025-07/msg00309.html. --- lisp/startup.el | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lisp/startup.el b/lisp/startup.el index 35c3cb03e17..836ead6deb0 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -853,12 +853,6 @@ It is the default value of the variable `top-level'." ;; We are careful to do it late (after term-setup-hook), although the ;; new multi-tty code does not use $TERM any more there anyway. (setenv "TERM" "dumb") - ;; Similarly, a subprocess should not try to invoke a pager, as most - ;; pagers will fail in a dumb terminal. Many programs default to - ;; using "less" when PAGER is unset, so set PAGER to "cat"; using cat - ;; as a pager is equivalent to not using a pager at all. - (when (executable-find "cat") - (setenv "PAGER" "cat")) ;; Remove DISPLAY from the process-environment as well. This allows ;; `callproc.c' to give it a useful adaptive default which is either ;; the value of the `display' frame-parameter or the DISPLAY value