From: bojohan+news@dd.chalmers.se (Johan Bockgård)
To: emacs-devel@gnu.org
Subject: before-change-functions (was: 23.0.50; delete-seletion-mode and read-only text)
Date: Tue, 22 Jan 2008 14:12:53 +0100 [thread overview]
Message-ID: <yoijve5m57hm.fsf_-_@remote1.student.chalmers.se> (raw)
In-Reply-To: 4795169E.5060704@gmx.at
martin rudalics <rudalics@gmx.at> 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
http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg01002.html "Is
there some way for a before-change-function to prevent a change [without
signaling an error]?")
--
Johan Bockgård
next prev parent reply other threads:[~2008-01-22 13:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-21 10:48 23.0.50; delete-seletion-mode and read-only text Johan Bockgård
2008-01-21 22:03 ` martin rudalics
2008-01-22 13:12 ` Johan Bockgård [this message]
2008-01-23 9:32 ` before-change-functions martin rudalics
2008-01-22 13:20 ` read-only overlays (was: 23.0.50; delete-seletion-mode and read-only text) Johan Bockgård
2008-01-22 14:12 ` read-only overlays martin rudalics
2008-01-23 21:41 ` read-only overlays (was: 23.0.50; delete-seletion-mode and read-only text) Richard Stallman
2008-01-24 1:52 ` read-only overlays Stefan Monnier
2008-01-24 23:42 ` Richard Stallman
2008-01-22 22:29 ` 23.0.50; delete-seletion-mode and read-only text Richard Stallman
2008-01-23 9:19 ` martin rudalics
2008-01-23 16:20 ` Richard Stallman
2008-01-22 11:31 ` Richard Stallman
2008-01-22 13:02 ` Johan Bockgård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yoijve5m57hm.fsf_-_@remote1.student.chalmers.se \
--to=bojohan+news@dd.chalmers.se \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.