diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-08-15 14:35:16 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-08-15 14:35:16 +0200 |
commit | 1e7102640b8df5a5a94147c5a490c6cf69d605f9 (patch) | |
tree | 2a0a1db84f1c6a23e0979e911e95a633aa63ae9b /lisp | |
parent | 37358dd43cf6bda238b1861cdbe55aedfcb1740e (diff) | |
download | emacs-1e7102640b8df5a5a94147c5a490c6cf69d605f9.tar.gz emacs-1e7102640b8df5a5a94147c5a490c6cf69d605f9.tar.bz2 emacs-1e7102640b8df5a5a94147c5a490c6cf69d605f9.zip |
Add new variable term-set-terminal-size (not setting LINES/COLUMNS)
* lisp/term.el (term-set-terminal-size): New variable (bug#37564).
(term-exec-1): Use it. Based on a patch from Matthew Leach
<matthew@mattleach.net>.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/term.el | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/term.el b/lisp/term.el index 149405fa413..99f1bf4f54f 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -467,6 +467,11 @@ Customize this option to nil if you want the previous behavior." :type 'boolean :group 'term) +(defcustom term-set-terminal-size nil + "If non-nil, set the LINES and COLUMNS environment variables." + :type 'boolean + :version "28.1") + (defcustom term-char-mode-point-at-process-mark t "If non-nil, keep point at the process mark in char mode. @@ -1551,9 +1556,12 @@ Nil if unknown.") (format term-termcap-format "TERMCAP=" term-term-name term-height term-width) - (format "INSIDE_EMACS=%s,term:%s" emacs-version term-protocol-version) - (format "LINES=%d" term-height) - (format "COLUMNS=%d" term-width)) + (format "INSIDE_EMACS=%s,term:%s" + emacs-version term-protocol-version)) + (when term-set-terminal-size + (list + (format "LINES=%d" term-height) + (format "COLUMNS=%d" term-width))) process-environment)) (process-connection-type t) ;; We should suppress conversion of end-of-line format. |