# HG changeset patch # User Chong Yidong # Date 1286067542 14400 # Node ID f07cd17d0a5ab673f96f67b722edfc3cdff41147 # Parent 4c31586ca1cae5b9cc2ad2c3c9666bc9e3eb8fe8 * keyboard.c (command_loop_1): Make sure the mark is really alive before using it (Bug#7044). diff -r 4c31586ca1ca -r f07cd17d0a5a src/ChangeLog --- a/src/ChangeLog Sun Oct 03 00:33:27 2010 +0000 +++ b/src/ChangeLog Sat Oct 02 20:59:02 2010 -0400 @@ -1,3 +1,8 @@ +2010-10-03 Chong Yidong + + * keyboard.c (command_loop_1): Make sure the mark is really alive + before using it (Bug#7044). + 2010-10-02 Juanma Barranquero * makefile.w32-in (tags): Rename target to full-tags. diff -r 4c31586ca1ca -r f07cd17d0a5a src/keyboard.c --- a/src/keyboard.c Sun Oct 03 00:33:27 2010 +0000 +++ b/src/keyboard.c Sat Oct 02 20:59:02 2010 -0400 @@ -1786,7 +1786,8 @@ this_single_command_key_start = 0; } - if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks)) + if (!NILP (current_buffer->mark_active) + && !NILP (Vrun_hooks)) { /* In Emacs 22, setting transient-mark-mode to `only' was a way of turning it on for just one command. This usage is @@ -1805,6 +1806,9 @@ /* Even if not deactivating the mark, set PRIMARY if `select-active-regions' is non-nil. */ if (!NILP (Fwindow_system (Qnil)) + /* Even if mark_active is non-nil, the actual buffer + marker may not have been set yet (Bug#7044). */ + && XMARKER (current_buffer->mark)->buffer && (EQ (Vselect_active_regions, Qonly) ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) : (!NILP (Vselect_active_regions)