Mercurial > emacs
comparison lisp/shell.el @ 4131:c9a0f06110bd
* shell.el (shell-process-pushd): Fix syntax error in
condition-case.
* shell.el (shell-prompt-pattern): Don't match more than one line.
Doc fix.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sun, 18 Jul 1993 06:20:47 +0000 |
parents | fe1623f77956 |
children | a95bec390bc3 |
comparison
equal
deleted
inserted
replaced
4130:e5aee6a3bb75 | 4131:c9a0f06110bd |
---|---|
142 ;;; Code: | 142 ;;; Code: |
143 | 143 |
144 (require 'comint) | 144 (require 'comint) |
145 | 145 |
146 ;;;###autoload | 146 ;;;###autoload |
147 (defvar shell-prompt-pattern "^[^#$%>]*[#$%>] *" | 147 (defvar shell-prompt-pattern "^[^#$%>\n]*[#$%>] *" |
148 "Regexp to match prompts in the inferior shell. | 148 "Regexp to match prompts in the inferior shell. |
149 Defaults to \"^[^#$%>]*[#$%>] *\", which works pretty well. | 149 Defaults to \"^[^#$%>\\n]*[#$%>] *\", which works pretty well. |
150 This variable is used to initialise `comint-prompt-regexp' in the | 150 This variable is used to initialise `comint-prompt-regexp' in the |
151 shell buffer. | 151 shell buffer. |
152 | |
153 The pattern should probably not match more than one line. If it does, | |
154 shell-mode may become confused trying to distinguish prompt from input | |
155 on lines which don't start with a prompt. | |
152 | 156 |
153 This is a fine thing to set in your `.emacs' file.") | 157 This is a fine thing to set in your `.emacs' file.") |
154 | 158 |
155 (defvar shell-popd-regexp "popd" | 159 (defvar shell-popd-regexp "popd" |
156 "*Regexp to match subshell commands equivalent to popd.") | 160 "*Regexp to match subshell commands equivalent to popd.") |
412 (cd (car shell-dirstack)) | 416 (cd (car shell-dirstack)) |
413 (setq shell-dirstack | 417 (setq shell-dirstack |
414 (cons old (cdr shell-dirstack))) | 418 (cons old (cdr shell-dirstack))) |
415 (shell-dirstack-message)) | 419 (shell-dirstack-message)) |
416 (message "Directory stack empty.")) | 420 (message "Directory stack empty.")) |
417 (message "Couldn't cd.")) | 421 (error |
422 (message "Couldn't cd."))) | |
418 | 423 |
419 (let ((num (shell-extract-num arg))) | 424 (let ((num (shell-extract-num arg))) |
420 (if num ; pushd +n | 425 (if num ; pushd +n |
421 (if (> num (length shell-dirstack)) | 426 (if (> num (length shell-dirstack)) |
422 (message "Directory stack not that deep.") | 427 (message "Directory stack not that deep.") |