# HG changeset patch # User Miles Bader # Date 965659908 0 # Node ID 297909766badb314a84c6da87fe82344b37c5ffe # Parent 6f943008c543a9c755d2fd0e8c514709893498e1 (shell-prompt-pattern): Doc change. (shell-backward-command): Use line-beginning-position. diff -r 6f943008c543 -r 297909766bad lisp/shell.el --- 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)