X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/61655fd96ce959e47ad8d047387e5585843fc789..1b8dff239bf8091a75572064ff8fb085f3c073d6:/lisp/term.el diff --git a/lisp/term.el b/lisp/term.el index b37e71280d..31889a7827 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -560,6 +560,13 @@ This variable is buffer-local." :type 'boolean :group 'term) +(defcustom term-suppress-hard-newline nil + "Non-nil means interpreter should not break long lines with newlines. +This means text can automatically reflow if the window is resized." + :version "24.4" + :type 'boolean + :group 'term) + ;; Where gud-display-frame should put the debugging arrow. This is ;; set by the marker-filter, which scans the debugger's output for ;; indications of the current pc. @@ -953,7 +960,7 @@ is buffer-local." (when term-escape-char ;; Undo previous term-set-escape-char. (define-key term-raw-map term-escape-char 'term-send-raw)) - (setq term-escape-char (vector key)) + (setq term-escape-char (if (vectorp key) key (vector key))) (define-key term-raw-map term-escape-char term-raw-escape-map) ;; FIXME: If we later call term-set-escape-char again with another key, ;; we should undo this binding. @@ -2828,8 +2835,9 @@ See `term-prompt-regexp'." (setq count (length decoded-substring)) (setq temp (- (+ (term-horizontal-column) count) term-width)) - (cond ((<= temp 0)) ;; All count chars fit in line. - ((> count temp) ;; Some chars fit. + (cond ((or term-suppress-hard-newline (<= temp 0))) + ;; All count chars fit in line. + ((> count temp) ;; Some chars fit. ;; This iteration, handle only what fits. (setq count (- count temp)) (setq count-bytes