emacs-devel
[Top][All Lists]
Advanced

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

Re: `inhibit-mark-movement'


From: Juri Linkov
Subject: Re: `inhibit-mark-movement'
Date: Fri, 17 Dec 2004 18:11:38 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

There is another issue related to active marks in Transient Mark mode,
which I believe is a bug: C-u C-SPC behaves differently when the
mark ring is empty and when it is not.  With the non-empty mark ring
C-u C-SPC deactivates the mark when the mark is active.  This is good.
But when the mark ring is empty C-u C-SPC doesn't deactivate the mark.
Such behaviour is unexpected since the state of the mark ring is
irrelevant to that operation.  I propose the following fix for `pop-mark'
which deactivates the active mark regardless of the state of the
mark ring:

Index: lisp/simple.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/simple.el,v
retrieving revision 1.672
diff -u -r1.672 simple.el
--- lisp/simple.el      14 Dec 2004 12:17:43 -0000      1.672
+++ lisp/simple.el      17 Dec 2004 15:50:29 -0000
@@ -2945,10 +3013,10 @@
   (when mark-ring
     (setq mark-ring (nconc mark-ring (list (copy-marker (mark-marker)))))
     (set-marker (mark-marker) (+ 0 (car mark-ring)) (current-buffer))
-    (deactivate-mark)
     (move-marker (car mark-ring) nil)
     (if (null (mark t)) (ding))
-    (setq mark-ring (cdr mark-ring))))
+    (setq mark-ring (cdr mark-ring)))
+  (deactivate-mark))
 
 (defalias 'exchange-dot-and-mark 'exchange-point-and-mark)
 (defun exchange-point-and-mark (&optional arg)

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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