diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-03-03 14:37:43 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-03-03 14:37:43 -0800 |
commit | e2ae1c5a40e2802fcd9f5ee26b4906be97c8b878 (patch) | |
tree | b2d56b00e2ae8ba90167ede434561d4a3b1f273d /lisp/comint.el | |
parent | d8462361f2d087d6f7c745305c61a266843ee19c (diff) | |
parent | 4b0b27d0018f040bda6a2ec885fa54c666d9c083 (diff) | |
download | emacs-e2ae1c5a40e2802fcd9f5ee26b4906be97c8b878.tar.gz |
Merge from origin/emacs-24
4b0b27d Fix invocation of commands whose file name includes extension
87fc99f Better support for the case of typing RET on the prompt in comint.
a7b1c2f Don't lose frame's background color when setting foreground
20c817d Fix handling of frame color parameters in TTY sessions
eca7da1 Complete the remaining documentation updates for 24.5
Conflicts:
doc/lispref/ChangeLog
etc/NEWS
lisp/ChangeLog
nt/ChangeLog
src/ChangeLog
Diffstat (limited to 'lisp/comint.el')
-rw-r--r-- | lisp/comint.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index b14ab5bdf9f..722a42d6af2 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2222,7 +2222,10 @@ the current line with any initial string matching the regexp (null (get-char-property (setq bof (field-beginning)) 'field))) (field-string-no-properties bof) (comint-bol) - (buffer-substring-no-properties (point) (line-end-position))))) + (buffer-substring-no-properties (point) + (if comint-use-prompt-regexp + (line-end-position) + (field-end)))))) (defun comint-copy-old-input () "Insert after prompt old input at point as new input to be edited. @@ -2270,8 +2273,9 @@ a buffer local variable." (if comint-use-prompt-regexp ;; Use comint-prompt-regexp (save-excursion - (re-search-backward comint-prompt-regexp nil t) (beginning-of-line) + (unless (looking-at comint-prompt-regexp) + (re-search-backward comint-prompt-regexp nil t)) (comint-skip-prompt) (point)) ;; Use input fields. Note that, unlike the behavior of |