]> git.eshelyaron.com Git - emacs.git/commitdiff
* shell.el (shell-process-pushd): Fix syntax error in
authorJim Blandy <jimb@redhat.com>
Sun, 18 Jul 1993 06:20:47 +0000 (06:20 +0000)
committerJim Blandy <jimb@redhat.com>
Sun, 18 Jul 1993 06:20:47 +0000 (06:20 +0000)
condition-case.

* shell.el (shell-prompt-pattern): Don't match more than one line.
Doc fix.

lisp/shell.el

index d404e46235d6a90782b4b56f7955e9cc387341ca..ccd3bf9fd907e315d61990a77d6db258de912b9e 100644 (file)
 (require 'comint)
 
 ;;;###autoload
-(defvar shell-prompt-pattern "^[^#$%>]*[#$%>] *"
+(defvar shell-prompt-pattern "^[^#$%>\n]*[#$%>] *"
   "Regexp to match prompts in the inferior shell.
-Defaults to \"^[^#$%>]*[#$%>] *\", which works pretty well.
+Defaults to \"^[^#$%>\\n]*[#$%>] *\", which works pretty well.
 This variable is used to initialise `comint-prompt-regexp' in the 
 shell buffer.
 
+The pattern should probably not match more than one line.  If it does,
+shell-mode may become confused trying to distinguish prompt from input
+on lines which don't start with a prompt.
+
 This is a fine thing to set in your `.emacs' file.")
 
 (defvar shell-popd-regexp "popd"
@@ -414,7 +418,8 @@ Environment variables are expanded, see function `substitute-in-file-name'."
                                      (cons old (cdr shell-dirstack)))
                                (shell-dirstack-message))
                              (message "Directory stack empty."))
-       (message "Couldn't cd."))
+       (error
+        (message "Couldn't cd.")))
 
       (let ((num (shell-extract-num arg)))
        (if num                         ; pushd +n