diff options
| author | Stefan Monnier | 2011-10-24 22:19:17 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-10-24 22:19:17 -0400 |
| commit | 410488d3aeae877ff13c005a9c4141d1d7ec9c91 (patch) | |
| tree | 18ed2738559152694f4b419622ee66c861e75d62 /lisp | |
| parent | 958ad48682256150c5cde455fe21752ab1ea3afb (diff) | |
| download | emacs-410488d3aeae877ff13c005a9c4141d1d7ec9c91.tar.gz emacs-410488d3aeae877ff13c005a9c4141d1d7ec9c91.zip | |
* lisp/comint.el (comint-get-old-input-default): Fix use-prompt-regexp case.
Fixes: debbugs:9865
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/comint.el | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 57b89b973f1..32e46b2c172 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * comint.el (comint-get-old-input-default): Fix use-prompt-regexp case | ||
| 4 | (bug#9865). | ||
| 5 | |||
| 1 | 2011-10-24 Glenn Morris <rgm@gnu.org> | 6 | 2011-10-24 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. (Bug#9819) | 8 | * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. (Bug#9819) |
diff --git a/lisp/comint.el b/lisp/comint.el index 591be5e2d9d..dc3cdd9fa7a 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -2151,8 +2151,10 @@ current line, if point is on an output field. | |||
| 2151 | If `comint-use-prompt-regexp' is non-nil, then return | 2151 | If `comint-use-prompt-regexp' is non-nil, then return |
| 2152 | the current line with any initial string matching the regexp | 2152 | the current line with any initial string matching the regexp |
| 2153 | `comint-prompt-regexp' removed." | 2153 | `comint-prompt-regexp' removed." |
| 2154 | (let ((bof (field-beginning))) | 2154 | (let (bof) |
| 2155 | (if (null (get-char-property bof 'field)) ;Not `output'. | 2155 | (if (and comint-use-prompt-regexp |
| 2156 | ;; Make sure we're in an input rather than output field. | ||
| 2157 | (null (get-char-property (setq bof (field-beginning)) 'field))) | ||
| 2156 | (field-string-no-properties bof) | 2158 | (field-string-no-properties bof) |
| 2157 | (comint-bol) | 2159 | (comint-bol) |
| 2158 | (buffer-substring-no-properties (point) (line-end-position))))) | 2160 | (buffer-substring-no-properties (point) (line-end-position))))) |