equal
deleted
inserted
replaced
664 "Return information to help restore a user's editing context. |
664 "Return information to help restore a user's editing context. |
665 This is useful across reverts and merges, where a context is likely |
665 This is useful across reverts and merges, where a context is likely |
666 to have moved a little, but not really changed." |
666 to have moved a little, but not really changed." |
667 (let ((point-context (hg-position-context (point))) |
667 (let ((point-context (hg-position-context (point))) |
668 (mark-context (let ((mark (mark-marker))) |
668 (mark-context (let ((mark (mark-marker))) |
669 (and mark (hg-position-context mark))))) |
669 (and mark |
|
670 ;; make sure active mark |
|
671 (marker-buffer mark) |
|
672 (marker-position mark) |
|
673 (hg-position-context mark))))) |
670 (list point-context mark-context))) |
674 (list point-context mark-context))) |
671 |
675 |
672 (defun hg-find-context (ctx) |
676 (defun hg-find-context (ctx) |
673 "Attempt to find a context in the given buffer. |
677 "Attempt to find a context in the given buffer. |
674 Always returns a valid, hopefully sane, position." |
678 Always returns a valid, hopefully sane, position." |