[Top][All Lists]

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

[Emacs-diffs] emacs-25 7f83e7e: Fix slow redisplay in term-mode

From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 7f83e7e: Fix slow redisplay in term-mode
Date: Sun, 26 Jun 2016 16:41:25 +0000 (UTC)

branch: emacs-25
commit 7f83e7e5367cc11071a628a6ff7ba0c050a80c6d
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Fix slow redisplay in term-mode
    * lisp/term.el (term-mode): Move the setting of
    bidi-paragraph-direction from 'ansi-term' to here, since term-mode
    is also affected.  Do not merge to master, since there the problem
    is solved in bidi.c by changing the regexps that delimit a
    paragraph.  (Bug#23801)
 lisp/term.el |   17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/lisp/term.el b/lisp/term.el
index 7e44c57..562d9b0 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1098,6 +1098,11 @@ Entry to this mode runs the hooks on `term-mode-hook'."
                     (term-reset-size (cdr size) (car size)))
+  ;; Without the below setting, term-mode and ansi-term behave
+  ;; sluggishly when the buffer includes a lot of whitespace
+  ;; characters.
+  (setq bidi-paragraph-direction 'left-to-right)
   (easy-menu-add term-terminal-menu)
   (easy-menu-add term-signals-menu)
   (or term-input-ring
@@ -4138,17 +4143,7 @@ the process.  Any more args are arguments to PROGRAM."
     ;; .emacs ...
     (term-set-escape-char ?\C-x))
-  (switch-to-buffer term-ansi-buffer-name)
-  ;; For some reason, without the below setting, ansi-term behaves
-  ;; sluggishly, not clear why, since the buffer is typically very
-  ;; small.
-  ;;
-  ;; There's a larger problem here with supporting bidirectional text:
-  ;; the application that writes to the terminal could have its own
-  ;; ideas about displaying bidirectional text, and might not want us
-  ;; reordering the text or deciding on base paragraph direction.  One
-  ;; such application is Emacs in TTY mode...  FIXME.
-  (setq bidi-paragraph-direction 'left-to-right))
+  (switch-to-buffer term-ansi-buffer-name))
 ;;; Serial terminals

reply via email to

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