diff options
| author | Michael Hoffman | 2013-06-12 22:27:05 -0700 |
|---|---|---|
| committer | Glenn Morris | 2013-06-12 22:27:05 -0700 |
| commit | 5755011f76526d2ab57482d796a757ecfcfbb3a8 (patch) | |
| tree | dde0561350fa0734f6d55dcf76b84cc272690b79 /lisp | |
| parent | 0530d5ca3d64c25e7d8488526bb70c3ef28d81d9 (diff) | |
| download | emacs-5755011f76526d2ab57482d796a757ecfcfbb3a8.tar.gz emacs-5755011f76526d2ab57482d796a757ecfcfbb3a8.zip | |
* term.el (term-suppress-hard-newline): New option (tiny change)
(term-emulate-terminal): Respect term-suppress-hard-newline.
Fixes: debbugs:12017
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/term.el | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5ff36f1539c..b19601a7b52 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-06-13 Michael Hoffman <9qobl2n02@sneakemail.com> (tiny change) | ||
| 2 | |||
| 3 | * term.el (term-suppress-hard-newline): New option. (Bug#12017) | ||
| 4 | (term-emulate-terminal): Respect term-suppress-hard-newline. | ||
| 5 | |||
| 1 | 2013-06-13 E Sabof <esabof@gmail.com> (tiny change) | 6 | 2013-06-13 E Sabof <esabof@gmail.com> (tiny change) |
| 2 | 7 | ||
| 3 | * image-dired.el (image-dired-dired-toggle-marked-thumbs): | 8 | * image-dired.el (image-dired-dired-toggle-marked-thumbs): |
diff --git a/lisp/term.el b/lisp/term.el index 1c67057d3a7..31889a78273 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -560,6 +560,13 @@ This variable is buffer-local." | |||
| 560 | :type 'boolean | 560 | :type 'boolean |
| 561 | :group 'term) | 561 | :group 'term) |
| 562 | 562 | ||
| 563 | (defcustom term-suppress-hard-newline nil | ||
| 564 | "Non-nil means interpreter should not break long lines with newlines. | ||
| 565 | This means text can automatically reflow if the window is resized." | ||
| 566 | :version "24.4" | ||
| 567 | :type 'boolean | ||
| 568 | :group 'term) | ||
| 569 | |||
| 563 | ;; Where gud-display-frame should put the debugging arrow. This is | 570 | ;; Where gud-display-frame should put the debugging arrow. This is |
| 564 | ;; set by the marker-filter, which scans the debugger's output for | 571 | ;; set by the marker-filter, which scans the debugger's output for |
| 565 | ;; indications of the current pc. | 572 | ;; indications of the current pc. |
| @@ -2828,8 +2835,9 @@ See `term-prompt-regexp'." | |||
| 2828 | (setq count (length decoded-substring)) | 2835 | (setq count (length decoded-substring)) |
| 2829 | (setq temp (- (+ (term-horizontal-column) count) | 2836 | (setq temp (- (+ (term-horizontal-column) count) |
| 2830 | term-width)) | 2837 | term-width)) |
| 2831 | (cond ((<= temp 0)) ;; All count chars fit in line. | 2838 | (cond ((or term-suppress-hard-newline (<= temp 0))) |
| 2832 | ((> count temp) ;; Some chars fit. | 2839 | ;; All count chars fit in line. |
| 2840 | ((> count temp) ;; Some chars fit. | ||
| 2833 | ;; This iteration, handle only what fits. | 2841 | ;; This iteration, handle only what fits. |
| 2834 | (setq count (- count temp)) | 2842 | (setq count (- count temp)) |
| 2835 | (setq count-bytes | 2843 | (setq count-bytes |