emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r112958: * term.el (term-suppress-hard-newline): New


From: Glenn Morris
Subject: [Emacs-diffs] trunk r112958: * term.el (term-suppress-hard-newline): New option (tiny change)
Date: Thu, 13 Jun 2013 05:27:15 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112958
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/12017
author: Michael Hoffman <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-06-12 22:27:05 -0700
message:
  * term.el (term-suppress-hard-newline): New option (tiny change)
  (term-emulate-terminal): Respect term-suppress-hard-newline.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/term.el                   term.el-20091113204419-o5vbwnq5f7feedwu-794
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-06-13 05:10:48 +0000
+++ b/lisp/ChangeLog    2013-06-13 05:27:05 +0000
@@ -1,3 +1,8 @@
+2013-06-13  Michael Hoffman  <address@hidden>  (tiny change)
+
+       * term.el (term-suppress-hard-newline): New option.  (Bug#12017)
+       (term-emulate-terminal): Respect term-suppress-hard-newline.
+
 2013-06-13  E Sabof  <address@hidden>  (tiny change)
 
        * image-dired.el (image-dired-dired-toggle-marked-thumbs):

=== modified file 'lisp/term.el'
--- a/lisp/term.el      2013-05-11 02:15:46 +0000
+++ b/lisp/term.el      2013-06-13 05:27:05 +0000
@@ -560,6 +560,13 @@
   :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.
@@ -2828,8 +2835,9 @@
                          (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]