[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: comint-insert-input
From: |
Stefan Monnier |
Subject: |
Re: comint-insert-input |
Date: |
Sun, 23 Jan 2005 10:38:39 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
>> Using today's CVS:
>> emacs -q
>>
>> M-x shell
>>
>> If I type "pwd RET", the command gets executed okay.
>>
>> If I then move point back up to the line with "$ pwd" and press
>> C-c RET I get:
>>
>> Debugger entered--Lisp error: (error "comint-insert-input must be
>> bound to an event with parameters")
>>
>> call-interactively(comint-insert-input)
>>
>> Does C-c RET still work in recent shells? (I see that the interactive
>> definition for this defun was changed recently.)
>>
>> Does it only work for mouse events now?
> It would appear so.
> From the Changelog, I see that I created two functions
> comint-insert-input, comint-mouse-insert-input based on an earlier one
> (comint-insert-clicked-input) and removed comint-copy-old-input
> (2004-06-23).
> On 2004-10-10, Stefan Monnier deleted comint-mouse-insert-input and made
> comint-insert-input work for mouse bindings. I don't know why. I see that
> the description that I wrote for comint-insert-input and its binding, C-c RET,
> is still present in the manual.
I think the problem was introduced by the changes below:
revision 1.304
date: 2004/11/02 14:16:30; author: rms; state: Exp; lines: +1 -1
(comint-insert-input): Fix previous change.
----------------------------
revision 1.303
date: 2004/10/19 16:51:14; author: rms; state: Exp; lines: +4 -4
(comint-insert-input): Use @ in `interactive'.
(comint-input-filter-functions): Doc fix.
(comint-kill-whole-line, comint-get-source): Doc fix.
@@ -788,7 +788,7 @@
(defun comint-insert-input (&optional event)
"In a Comint buffer, set the current input to the previous input at point."
- (interactive (list last-input-event))
+ (interactive "e")
(if event (mouse-set-point event))
(let ((pos (point)))
(if (not (eq (get-char-property pos 'field) 'input))
I think the best way to fix this, is to change the behavior of "e" so that
it doesn't complain when it's bound to a non-mouse event.
Stefan