changeset 30641:297909766bad

(shell-prompt-pattern): Doc change. (shell-backward-command): Use line-beginning-position.
author Miles Bader <miles@gnu.org>
date Mon, 07 Aug 2000 14:51:48 +0000
parents 6f943008c543
children ae938744b6b1
files lisp/shell.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/shell.el	Mon Aug 07 14:50:09 2000 +0000
+++ b/lisp/shell.el	Mon Aug 07 14:51:48 2000 +0000
@@ -127,6 +127,9 @@
 This variable is used to initialise `comint-prompt-regexp' in the 
 shell buffer.
 
+This variable is only used if the variable
+`comint-use-prompt-regexp-instead-of-fields' is non-nil.
+
 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.
@@ -814,8 +817,8 @@
 See `shell-command-regexp'."
   (interactive "p")
   (let ((limit (save-excursion (comint-bol nil) (point))))
-    (if (> limit (point))
-	(save-excursion (beginning-of-line) (setq limit (point))))
+    (when (> limit (point))
+      (setq limit (line-beginning-position)))
     (skip-syntax-backward " " limit)
     (if (re-search-backward
 	 (format "[;&|]+[\t ]*\\(%s\\)" shell-command-regexp) limit 'move arg)