Lisp_Object Qinhibit_modification_hooks;
+extern Lisp_Object Vselect_active_regions, Vsaved_region_selection, Qonly;
+
\f
/* Check all markers in the current buffer, looking for something invalid. */
base_buffer->filename);
#endif /* not CLASH_DETECTION */
+ /* If `select-active-regions' is non-nil, save the region text. */
+ if (!NILP (current_buffer->mark_active)
+ && NILP (Vsaved_region_selection)
+ && (EQ (Vselect_active_regions, Qonly)
+ ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly)
+ : (!NILP (Vselect_active_regions)
+ && !NILP (Vtransient_mark_mode))))
+ {
+ EMACS_INT b = XINT (Fmarker_position (current_buffer->mark));
+ EMACS_INT e = PT;
+ if (b < e)
+ Vsaved_region_selection = make_buffer_string (b, e, 0);
+ else if (b > e)
+ Vsaved_region_selection = make_buffer_string (e, b, 0);
+ }
+
signal_before_change (start, end, preserve_ptr);
if (current_buffer->newline_cache)