emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101737: * keyboard.c (command_loop_1


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101737: * keyboard.c (command_loop_1): Make sure the mark is really alive
Date: Sat, 02 Oct 2010 20:59:02 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101737
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2010-10-02 20:59:02 -0400
message:
  * keyboard.c (command_loop_1): Make sure the mark is really alive
  before using it (Bug#7044).
modified:
  src/ChangeLog
  src/keyboard.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-10-02 12:12:17 +0000
+++ b/src/ChangeLog     2010-10-03 00:59:02 +0000
@@ -1,3 +1,8 @@
+2010-10-03  Chong Yidong  <address@hidden>
+
+       * keyboard.c (command_loop_1): Make sure the mark is really alive
+       before using it (Bug#7044).
+
 2010-10-02  Juanma Barranquero  <address@hidden>
 
        * makefile.w32-in (tags): Rename target to full-tags.

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2010-09-26 16:20:01 +0000
+++ b/src/keyboard.c    2010-10-03 00:59:02 +0000
@@ -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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]