From 8b78d5e38f1bac3348d1f53a0a3c2a0c1e5d5ebb Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 21 Oct 2010 13:27:32 -0400 Subject: [PATCH] * insdel.c (prepare_to_modify_buffer): Don't set saved-region-selection if modification hooks are disabled. --- src/ChangeLog | 5 +++++ src/insdel.c | 1 + 2 files changed, 6 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index d09fab7ca8..ecac971be1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-10-21 Chong Yidong + + * insdel.c (prepare_to_modify_buffer): Don't set + saved-region-selection if modification hooks are disabled. + 2010-10-19 Chong Yidong * cmds.c (Fdelete_char): Doc fix. diff --git a/src/insdel.c b/src/insdel.c index abe6f35058..ff380ada19 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -2051,6 +2051,7 @@ prepare_to_modify_buffer (EMACS_INT start, EMACS_INT end, /* If `select-active-regions' is non-nil, save the region text. */ if (!NILP (current_buffer->mark_active) + && !inhibit_modification_hooks && XMARKER (current_buffer->mark)->buffer && NILP (Vsaved_region_selection) && (EQ (Vselect_active_regions, Qonly) -- 2.20.1