aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/shell.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index b4b388655c8..1ed43863452 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -510,6 +510,16 @@ buffer."
510 (set (make-local-variable 'shell-dirstack) nil) 510 (set (make-local-variable 'shell-dirstack) nil)
511 (set (make-local-variable 'shell-last-dir) nil) 511 (set (make-local-variable 'shell-last-dir) nil)
512 (shell-dirtrack-mode 1) 512 (shell-dirtrack-mode 1)
513
514 ;; By default, ansi-color applies faces using overlays. This is
515 ;; very inefficient in Shell buffers (e.g. Bug#10835). We use a
516 ;; custom `ansi-color-apply-face-function' to convert color escape
517 ;; sequences into `font-lock-face' properties.
518 (set (make-local-variable 'ansi-color-apply-face-function)
519 (lambda (beg end face)
520 (when face
521 (put-text-property beg end 'font-lock-face face))))
522
513 ;; This is not really correct, since the shell buffer does not really 523 ;; This is not really correct, since the shell buffer does not really
514 ;; edit this directory. But it is useful in the buffer list and menus. 524 ;; edit this directory. But it is useful in the buffer list and menus.
515 (setq list-buffers-directory (expand-file-name default-directory)) 525 (setq list-buffers-directory (expand-file-name default-directory))
@@ -625,7 +635,6 @@ Otherwise, one argument `-i' is passed to the shell.
625 (read-directory-name 635 (read-directory-name
626 "Default directory: " default-directory default-directory 636 "Default directory: " default-directory default-directory
627 t nil)))))))) 637 t nil))))))))
628 (require 'ansi-color)
629 (setq buffer (if (or buffer (not (derived-mode-p 'shell-mode)) 638 (setq buffer (if (or buffer (not (derived-mode-p 'shell-mode))
630 (comint-check-proc (current-buffer))) 639 (comint-check-proc (current-buffer)))
631 (get-buffer-create (or buffer "*shell*")) 640 (get-buffer-create (or buffer "*shell*"))