Commit 410488d3 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/comint.el (comint-get-old-input-default): Fix use-prompt-regexp case.

Fixes: debbugs:9865
parent 958ad486
2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
* comint.el (comint-get-old-input-default): Fix use-prompt-regexp case
(bug#9865).
2011-10-24 Glenn Morris <rgm@gnu.org>
* emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. (Bug#9819)
......
......@@ -2151,8 +2151,10 @@ current line, if point is on an output field.
If `comint-use-prompt-regexp' is non-nil, then return
the current line with any initial string matching the regexp
`comint-prompt-regexp' removed."
(let ((bof (field-beginning)))
(if (null (get-char-property bof 'field)) ;Not `output'.
(let (bof)
(if (and comint-use-prompt-regexp
;; Make sure we're in an input rather than output field.
(null (get-char-property (setq bof (field-beginning)) 'field)))
(field-string-no-properties bof)
(comint-bol)
(buffer-substring-no-properties (point) (line-end-position)))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment