;;; 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>
;; Internal Variables:
-;; these are only set to `nil' initially for the sake of the
+;; these are only set to nil initially for the sake of the
;; byte-compiler, when compiling other files which `require' this one
(defvar eshell-mode nil)
(defvar eshell-mode-map nil)
(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)
(setq local-abbrev-table eshell-mode-abbrev-table)
- (set (make-local-variable 'dired-directory) default-directory)
(set (make-local-variable 'list-buffers-directory)
(expand-file-name default-directory))
(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.
(let ((proc-running-p (and (eshell-interactive-process)
(not queue-p)))
(inhibit-point-motion-hooks t)
- after-change-functions)
+ (inhibit-modification-hooks t))
(unless (and proc-running-p
(not (eq (process-status
- (eshell-interactive-process)) 'run)))
+ (eshell-interactive-process))
+ 'run)))
(if (or proc-running-p
(>= (point) eshell-last-output-end))
(goto-char (point-max))
(let ((oprocbuf (if process (process-buffer process)
(current-buffer)))
(inhibit-point-motion-hooks t)
- after-change-functions)
+ (inhibit-modification-hooks t))
(let ((functions eshell-preoutput-filter-functions))
(while (and functions string)
(setq string (funcall (car functions) string))
(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."