[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
before-change-functions (was: 23.0.50; delete-seletion-mode and read-onl
before-change-functions (was: 23.0.50; delete-seletion-mode and read-only text)
Tue, 22 Jan 2008 14:12:53 +0100
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)
martin rudalics <address@hidden> writes:
>> In delete-seletion-mode, trying to self insert in read-only text when
>> there is a selection signals an error that clears pre-command-hook.
> Does the attached patch fix it?
It should fix this case, but delete-region can fail for other reasons,
so rms's fix might be better.
E.g. Customize (Widget) uses before-change-functions to prevent edits.
What happens when you select a region in a customize buffer and press
C-y (in delete-seletion-mode) is that the yank succeeds, but deleting
the selection fails
Error in pre-command-hook: (text-read-only Attempt to change text
outside editable field)
before-change-functions signals an error inside pre-command-hook,
something which causes both hooks to be cleared. The yank then
proceeds uninhibited. (This is related to
there some way for a before-change-function to prevent a change [without
signaling an error]?")
Re: 23.0.50; delete-seletion-mode and read-only text, Richard Stallman, 2008/01/22