[PATCH 3 of 4] mercurial.el: mark-marker() returns non-nil with no active mark on GNU Emacs

NIIMI Satoshi sa2c at sa2c.net
Wed Oct 10 21:24:00 UTC 2007


# HG changeset patch
# User NIIMI Satoshi <sa2c at sa2c.net>
# Date 1192050645 -32400
# Node ID e055c2d5e13b76ad371823b024f30ab05e562a53
# Parent  ba8d8b0c4a6fc0e2410d41bdc1ec25428bcfd4eb
mercurial.el: mark-marker() returns non-nil with no active mark on GNU Emacs

diff --git a/contrib/mercurial.el b/contrib/mercurial.el
--- a/contrib/mercurial.el
+++ b/contrib/mercurial.el
@@ -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)



More information about the Mercurial-devel mailing list