Stefan Monnier <[EMAIL PROTECTED]> writes:
>>> I must say I don't understand why the call to `delete-region' doesn't itself
>>> clear the accurate state of the window's display matrix.
>
>> Neither do I (or I would have fixed _that_ problem).
>
>> But commands which modifies buffers don't generally have any direct
>> effect on whether WINDOW showing the buffer are accurate or not;
>> instead they simply update MODIFF on the buffer and redisplay
>> notices that the buffer has been modified, and DTRT...
>
>> My best guess is that delete-region does change the buffer MODIFF, but
>> that this is cached/restored somewhere along the read key sequence
>> path (or due to the recursion into read-event....)
>
> What happens if you remove the read-event recursive call? My guess is that
> it will crash just the same.
It doesn't.
I tried with this code:
(prog1 ?u ; (read-event)
(delete-region (1- (point)) (point))
;; Display is no longer up-to-date.
;(force-window-update (selected-window))
)))
>
>> Since this is really a rare case, my fix at the lisp level is ok
>> for the case at hand, so unless I hear objects, I'll install it.
>
> Could it be a problem with the special casing of forward-char,
> backward-char, and self-insert-command in command_loop_1?
No.
Typing e.g. C-u x instead of just x also causes the crash.
(a prefix arg inhibits the special casing).
It is a problem of a function called from key-translation-map
doing read-event followed by modifying the buffer.
--
Kim F. Storm <[EMAIL PROTECTED]> http://www.cua.dk
_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug