mercurial.el: mark-marker() returns non-nil with no active mark on GNU Emacs
authorNIIMI Satoshi <sa2c@sa2c.net>
Thu, 11 Oct 2007 06:10:45 +0900
changeset 5467 521284cdbcb4
parent 5466 87860c62e003
child 5468 24eb1bf8dd83
mercurial.el: mark-marker() returns non-nil with no active mark on GNU Emacs
contrib/mercurial.el
--- a/contrib/mercurial.el	Thu Oct 11 06:01:30 2007 +0900
+++ b/contrib/mercurial.el	Thu Oct 11 06:10:45 2007 +0900
@@ -666,7 +666,11 @@
 to have moved a little, but not really changed."
   (let ((point-context (hg-position-context (point)))
 	(mark-context (let ((mark (mark-marker)))
-			(and mark (hg-position-context mark)))))
+			(and mark
+			     ;; make sure active mark
+			     (marker-buffer mark)
+			     (marker-position mark)
+			     (hg-position-context mark)))))
     (list point-context mark-context)))
 
 (defun hg-find-context (ctx)