diff options
Diffstat (limited to 'lisp/eshell/esh-mode.el')
-rw-r--r-- | lisp/eshell/esh-mode.el | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 74320538fe9..9da3f8e2e79 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -193,11 +193,14 @@ This is used by `eshell-watch-for-password-prompt'." :type '(choice (const nil) function) :group 'eshell-mode) -(defcustom eshell-status-in-modeline t - "If non-nil, let the user know a command is running in the modeline." +(defcustom eshell-status-in-mode-line t + "If non-nil, let the user know a command is running in the mode line." :type 'boolean :group 'eshell-mode) +(define-obsolete-variable-alias 'eshell-status-in-modeline + 'eshell-status-in-mode-line "24.2") + (defvar eshell-first-time-p t "A variable which is non-nil the first time Eshell is loaded.") @@ -314,14 +317,14 @@ and the hook `eshell-exit-hook'." (setq eshell-mode-map (make-sparse-keymap)) (use-local-map eshell-mode-map) - (when eshell-status-in-modeline + (when eshell-status-in-mode-line (make-local-variable 'eshell-command-running-string) (let ((fmt (copy-sequence mode-line-format))) (make-local-variable 'mode-line-format) (setq mode-line-format fmt)) - (let ((modeline (memq 'mode-line-modified mode-line-format))) - (if modeline - (setcar modeline 'eshell-command-running-string)))) + (let ((mode-line-elt (memq 'mode-line-modified mode-line-format))) + (if mode-line-elt + (setcar mode-line-elt 'eshell-command-running-string)))) (define-key eshell-mode-map [return] 'eshell-send-input) (define-key eshell-mode-map [(control ?m)] 'eshell-send-input) @@ -434,7 +437,7 @@ and the hook `eshell-exit-hook'." (when eshell-scroll-show-maximum-output (set (make-local-variable 'scroll-conservatively) 1000)) - (when eshell-status-in-modeline + (when eshell-status-in-mode-line (add-hook 'eshell-pre-command-hook 'eshell-command-started nil t) (add-hook 'eshell-post-command-hook 'eshell-command-finished nil t)) @@ -448,12 +451,12 @@ and the hook `eshell-exit-hook'." (put 'eshell-mode 'mode-class 'special) (defun eshell-command-started () - "Indicate in the modeline that a command has started." + "Indicate in the mode line that a command has started." (setq eshell-command-running-string "**") (force-mode-line-update)) (defun eshell-command-finished () - "Indicate in the modeline that a command has finished." + "Indicate in the mode line that a command has finished." (setq eshell-command-running-string "--") (force-mode-line-update)) |