diff options
author | Miles Bader <miles@gnu.org> | 2000-08-07 14:51:48 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2000-08-07 14:51:48 +0000 |
commit | 28bc09d6f8878e00e9251417795a0273d729883a (patch) | |
tree | 3dd9889331c51a4d5c6ef893c0500fc0ca0f03ab /lisp/shell.el | |
parent | 29533923201ac8cf449a41f88fe4264c1d3e0778 (diff) | |
download | emacs-28bc09d6f8878e00e9251417795a0273d729883a.tar.gz |
(shell-prompt-pattern): Doc change.
(shell-backward-command): Use line-beginning-position.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r-- | lisp/shell.el | 7 |
1 files changed, 5 insertions, 2 deletions
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) |