to track your current directory. It can be used instead of or in addition
to `dirtrack-mode'."
:group 'shell
- :type '(choice (const nil) regexp))
+ :type '(choice (const nil) regexp)
+ :version "24.1")
(defun shell-parse-pcomplete-arguments ()
"Parse whitespace separated arguments in the current region."
t shell-file-name))
'localname))))
- ;; Pop to buffer, so that the buffer's window will be correctly set
- ;; when we call comint (so that comint sets the COLUMNS env var properly).
- (pop-to-buffer buffer)
+ ;; The buffer's window must be correctly set when we call comint (so
+ ;; that comint sets the COLUMNS env var properly).
+ (pop-to-buffer-same-window buffer)
(unless (comint-check-proc buffer)
(let* ((prog (or explicit-shell-file-name
(getenv "ESHELL") shell-file-name))
(shell-mode)))
buffer)
-;; Don't do this when shell.el is loaded, only while dumping.
-;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*shell*"))
-
;;; Directory tracking
;;
;; This code provides the shell mode input sentinel
(defvaralias 'shell-dirtrack-mode 'shell-dirtrackp)
(define-minor-mode shell-dirtrack-mode
- "Turn directory tracking on and off in a shell buffer.
-The `dirtrack' package provides an alternative implementation of this
-feature - see the function `dirtrack-mode'."
+ "Toggle directory tracking in this shell buffer (Shell Dirtrack mode).
+With a prefix argument ARG, enable Shell Dirtrack mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+The `dirtrack' package provides an alternative implementation of
+this feature; see the function `dirtrack-mode'."
nil nil nil
(setq list-buffers-directory (if shell-dirtrack-mode default-directory))
(if shell-dirtrack-mode