Mercurial > emacs
comparison lisp/shell.el @ 79804:0b921cfccfde
(shell-dirtrack-verbose, shell-mode)
(shell-directory-tracker, shell-dirtrack-mode): Doc fix.
(dirtrack-toggle, dirtrack-mode): No longer alias to
shell-dirtrack-mode.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 10 Jan 2008 04:04:11 +0000 |
parents | 73661ddc7ac7 |
children | 1eda7cc2e474 |
comparison
equal
deleted
inserted
replaced
79803:3bf0a434954a | 79804:0b921cfccfde |
---|---|
91 ;; m-? comint-dynamic-list-filename-completions | 91 ;; m-? comint-dynamic-list-filename-completions |
92 ;; List completions in help buffer | 92 ;; List completions in help buffer |
93 ;; m-c-f shell-forward-command Forward a shell command | 93 ;; m-c-f shell-forward-command Forward a shell command |
94 ;; m-c-b shell-backward-command Backward a shell command | 94 ;; m-c-b shell-backward-command Backward a shell command |
95 ;; dirs Resync the buffer's dir stack | 95 ;; dirs Resync the buffer's dir stack |
96 ;; dirtrack-mode Turn dir tracking on/off | 96 ;; shell-dirtrack-mode Turn dir tracking on/off |
97 ;; comint-strip-ctrl-m Remove trailing ^Ms from output | 97 ;; comint-strip-ctrl-m Remove trailing ^Ms from output |
98 ;; | 98 ;; |
99 ;; The shell mode hook is shell-mode-hook | 99 ;; The shell mode hook is shell-mode-hook |
100 ;; comint-prompt-regexp is initialised to shell-prompt-pattern, for backwards | 100 ;; comint-prompt-regexp is initialised to shell-prompt-pattern, for backwards |
101 ;; compatibility. | 101 ;; compatibility. |
261 (const nil)) | 261 (const nil)) |
262 :group 'shell-directories) | 262 :group 'shell-directories) |
263 | 263 |
264 (defcustom shell-dirtrack-verbose t | 264 (defcustom shell-dirtrack-verbose t |
265 "If non-nil, show the directory stack following directory change. | 265 "If non-nil, show the directory stack following directory change. |
266 This is effective only if directory tracking is enabled." | 266 This is effective only if directory tracking is enabled. |
267 The `dirtrack' package provides an alternative implementation of this feature - | |
268 see the function `dirtrack-mode'." | |
267 :type 'boolean | 269 :type 'boolean |
268 :group 'shell-directories) | 270 :group 'shell-directories) |
269 | 271 |
270 (defcustom explicit-shell-file-name nil | 272 (defcustom explicit-shell-file-name nil |
271 "If non-nil, is file name to use for explicitly requested inferior shell." | 273 "If non-nil, is file name to use for explicitly requested inferior shell." |
396 keep this buffer's default directory the same as the shell's working directory. | 398 keep this buffer's default directory the same as the shell's working directory. |
397 While directory tracking is enabled, the shell's working directory is displayed | 399 While directory tracking is enabled, the shell's working directory is displayed |
398 by \\[list-buffers] or \\[mouse-buffer-menu] in the `File' field. | 400 by \\[list-buffers] or \\[mouse-buffer-menu] in the `File' field. |
399 \\[dirs] queries the shell and resyncs Emacs' idea of what the current | 401 \\[dirs] queries the shell and resyncs Emacs' idea of what the current |
400 directory stack is. | 402 directory stack is. |
401 \\[dirtrack-mode] turns directory tracking on and off. | 403 \\[shell-dirtrack-mode] turns directory tracking on and off. |
404 \(The `dirtrack' package provides an alternative implementation of this | |
405 feature.) | |
402 | 406 |
403 \\{shell-mode-map} | 407 \\{shell-mode-map} |
404 Customization: Entry to this mode runs the hooks on `comint-mode-hook' and | 408 Customization: Entry to this mode runs the hooks on `comint-mode-hook' and |
405 `shell-mode-hook' (in that order). Before each input, the hooks on | 409 `shell-mode-hook' (in that order). Before each input, the hooks on |
406 `comint-input-filter-functions' are run. After each shell output, the hooks | 410 `comint-input-filter-functions' are run. After each shell output, the hooks |
613 "Tracks cd, pushd and popd commands issued to the shell. | 617 "Tracks cd, pushd and popd commands issued to the shell. |
614 This function is called on each input passed to the shell. | 618 This function is called on each input passed to the shell. |
615 It watches for cd, pushd and popd commands and sets the buffer's | 619 It watches for cd, pushd and popd commands and sets the buffer's |
616 default directory to track these commands. | 620 default directory to track these commands. |
617 | 621 |
618 You may toggle this tracking on and off with \\[dirtrack-mode]. | 622 You may toggle this tracking on and off with \\[shell-dirtrack-mode]. |
619 If Emacs gets confused, you can resync with the shell with \\[dirs]. | 623 If Emacs gets confused, you can resync with the shell with \\[dirs]. |
624 \(The `dirtrack' package provides an alternative implementation of this | |
625 feature - see the function `dirtrack-mode'.) | |
620 | 626 |
621 See variables `shell-cd-regexp', `shell-chdrive-regexp', `shell-pushd-regexp', | 627 See variables `shell-cd-regexp', `shell-chdrive-regexp', `shell-pushd-regexp', |
622 and `shell-popd-regexp', while `shell-pushd-tohome', `shell-pushd-dextract', | 628 and `shell-popd-regexp', while `shell-pushd-tohome', `shell-pushd-dextract', |
623 and `shell-pushd-dunique' control the behavior of the relevant command. | 629 and `shell-pushd-dunique' control the behavior of the relevant command. |
624 | 630 |
770 (and (string-match "^\\+[1-9][0-9]*$" str) | 776 (and (string-match "^\\+[1-9][0-9]*$" str) |
771 (string-to-number str))) | 777 (string-to-number str))) |
772 | 778 |
773 (defvaralias 'shell-dirtrack-mode 'shell-dirtrackp) | 779 (defvaralias 'shell-dirtrack-mode 'shell-dirtrackp) |
774 (define-minor-mode shell-dirtrack-mode | 780 (define-minor-mode shell-dirtrack-mode |
775 "Turn directory tracking on and off in a shell buffer." | 781 "Turn directory tracking on and off in a shell buffer. |
782 The `dirtrack' package provides an alternative implementation of this | |
783 feature - see the function `dirtrack-mode'." | |
776 nil nil nil | 784 nil nil nil |
777 (setq list-buffers-directory (if shell-dirtrack-mode default-directory)) | 785 (setq list-buffers-directory (if shell-dirtrack-mode default-directory)) |
778 (if shell-dirtrack-mode | 786 (if shell-dirtrack-mode |
779 (add-hook 'comint-input-filter-functions 'shell-directory-tracker nil t) | 787 (add-hook 'comint-input-filter-functions 'shell-directory-tracker nil t) |
780 (remove-hook 'comint-input-filter-functions 'shell-directory-tracker t))) | 788 (remove-hook 'comint-input-filter-functions 'shell-directory-tracker t))) |
781 | 789 |
782 ;; For your typing convenience: | 790 ;; For your typing convenience: |
783 (defalias 'shell-dirtrack-toggle 'shell-dirtrack-mode) ;??Convenience?? | 791 (defalias 'shell-dirtrack-toggle 'shell-dirtrack-mode) ;??Convenience?? |
784 (defalias 'dirtrack-toggle 'shell-dirtrack-mode) | |
785 (defalias 'dirtrack-mode 'shell-dirtrack-mode) | |
786 | 792 |
787 (defun shell-cd (dir) | 793 (defun shell-cd (dir) |
788 "Do normal `cd' to DIR, and set `list-buffers-directory'." | 794 "Do normal `cd' to DIR, and set `list-buffers-directory'." |
789 (cd dir) | 795 (cd dir) |
790 (if shell-dirtrackp | 796 (if shell-dirtrackp |