]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/esh-mode.el
CC Mode: truncate the semi-nonlit cache when applying syntax-table to a quote
[gnu-emacs] / lisp / eshell / esh-mode.el
index 3df820d59568e2b81004d70db91cef69e2f05a18..104841d999c24db9207d20b042cef2bd2d921b14 100644 (file)
@@ -1,6 +1,6 @@
 ;;; esh-mode.el --- user interface  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1999-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2016 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -296,7 +296,7 @@ and the hook `eshell-exit-hook'."
   (run-hooks 'eshell-exit-hook))
 
 ;;;###autoload
-(define-derived-mode eshell-mode fundamental-mode "EShell"
+(define-derived-mode eshell-mode fundamental-mode "Eshell"
   "Emacs shell interactive mode."
   (setq-local eshell-mode t)
 
@@ -380,6 +380,11 @@ and the hook `eshell-exit-hook'."
     (make-local-variable 'eshell-modules-list)
     (setq eshell-modules-list modules-list))
 
+  ;; This is to avoid making the paragraph base direction
+  ;; right-to-left if the first word just happens to start with a
+  ;; strong R2L character.
+  (setq bidi-paragraph-direction 'left-to-right)
+
   ;; load extension modules into memory.  This will cause any global
   ;; variables they define to be visible, since some of the core
   ;; modules sometimes take advantage of their functionality if used.
@@ -877,9 +882,8 @@ If SCROLLBACK is non-nil, clear the scrollback contents."
   (interactive)
   (if scrollback
       (eshell/clear-scrollback)
-    (let ((number-newlines (count-lines (window-start) (point))))
-      (insert (make-string number-newlines ?\n))
-      (eshell-send-input))))
+    (insert (make-string (window-size) ?\n))
+    (eshell-send-input)))
 
 (defun eshell/clear-scrollback ()
   "Clear the scrollback content of the eshell window."