+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)
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)))))