GNU bug report logs - #20260
24.4.1; Triple-clicking selects and deselects the line in weird situations

Previous Next

Package: emacs;

Reported by: Jorgen Schaefer <contact <at> jorgenschaefer.de>

Date: Sat, 4 Apr 2015 22:30:04 UTC

Severity: normal

Found in version 24.4.1

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jorgen Schaefer <contact <at> jorgenschaefer.de>
Cc: 20260 <at> debbugs.gnu.org
Subject: bug#20260: 24.4.1; Triple-clicking selects and deselects the line in weird situations
Date: Tue, 07 Apr 2015 14:53:42 -0400
> Triple-click on the "World" in the *Bug* buffer. Notice that Emacs
> selects the whole line only momentarily, and then deselects it again
> immediately.

Indeed.  I though I had fixed this in Emacs-25 by making deactivate-mark
buffer-local, but I actually failed to adjust the C code accordingly.

The patch below seems to fix your test case.  Can you confirm it also
fixes your real use case?


        Stefan


diff --git a/src/fileio.c b/src/fileio.c
index d4e12cb..a6e7fbb 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4165,7 +4165,7 @@ by calling `format-decode', which see.  */)
       Vdeactivate_mark = old_Vdeactivate_mark;
     }
   else
-    Vdeactivate_mark = Qt;
+    Fset (Qdeactivate_mark, Qt);
 
   emacs_close (fd);
   clear_unwind_protect (fd_index);
diff --git a/src/insdel.c b/src/insdel.c
index 80650be..22c2bcc 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1846,7 +1846,7 @@ prepare_to_modify_buffer_1 (ptrdiff_t start, ptrdiff_t end,
       = call1 (Fsymbol_value (Qregion_extract_function), Qnil);
 
   signal_before_change (start, end, preserve_ptr);
-  Vdeactivate_mark = Qt;
+  Fset (Qdeactivate_mark, Qt);
 }
 
 /* Like above, but called when we know that the buffer text




This bug report was last modified 10 years and 96 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.