[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange Emacs crash

From: Kim F. Storm
Subject: Re: Strange Emacs crash
Date: Thu, 24 Feb 2005 14:46:32 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> 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?


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 <address@hidden> http://www.cua.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]