From: Miles Bader Date: Mon, 7 Aug 2000 14:51:48 +0000 (+0000) Subject: (shell-prompt-pattern): Doc change. X-Git-Tag: emacs-pretest-21.0.90~2452 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=28bc09d6f8878e00e9251417795a0273d729883a;p=emacs.git (shell-prompt-pattern): Doc change. (shell-backward-command): Use line-beginning-position. --- diff --git a/lisp/shell.el b/lisp/shell.el index 13d1d9adb6f..b93fe57402f 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -127,6 +127,9 @@ Defaults to \"^[^#$%>\\n]*[#$%>] *\", which works pretty well. 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'." 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)