[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9865: 24.0.90; recent change in comint.el broke the comint-use-promp
From: |
Stefan Monnier |
Subject: |
bug#9865: 24.0.90; recent change in comint.el broke the comint-use-prompt-regexp functionality |
Date: |
Mon, 24 Oct 2011 22:19:45 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) |
> I set comint-use-prompt-regexp to t and comint-prompt-regexp to
> "^[^#$%>\n]*[#$%>] *"
> (the shell: regexp from the documentation of this variable).
> In 24.0.90, this is broken: (comint-get-old-input-default) returns much
> (if not all) of the previous input and output as well: chaos ensues when
> the shell tries to execute every line.
Thank you.
I installed the patch below which should fix this problem. Please keep
your eyes open for any odd behaviors in comint since I may have a missed
a few more such cases.
Stefan
=== modified file 'lisp/comint.el'
--- lisp/comint.el 2011-10-18 03:57:12 +0000
+++ lisp/comint.el 2011-10-25 02:10:32 +0000
@@ -2153,7 +2166,8 @@
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'.
+ (if (and comint-use-prompt-regexp
+ (null (get-char-property bof 'field))) ;Not `output'.
(field-string-no-properties bof)
(comint-bol)
(buffer-substring-no-properties (point) (line-end-position)))))