From f9b82d36fc1d00496e44c7f3db74f4693c778563 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Mon, 27 Jul 2009 17:26:47 +0200 Subject: [PATCH] stgit.el: Get rid of the stgit-patchsym property MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Organization: Straylight/Edgeware From: David KÃ¥gedal Signed-off-by: David KÃ¥gedal --- contrib/stgit.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/contrib/stgit.el b/contrib/stgit.el index 0201098..99f13e4 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -77,8 +77,7 @@ (defun stgit-patch-pp (patch) (if (stgit-patch-empty patch) "(empty) " "") (propertize (or (stgit-patch-desc patch) "") 'face 'stgit-description-face)) - (add-text-properties start (point) (list 'entry-type 'patch - 'stgit-patchsym name)) + (put-text-property start (point) 'entry-type 'patch) (when (memq name stgit-expanded-patches) (stgit-insert-patch-files name)) (put-text-property start (point) 'patch-data patch))) @@ -624,11 +623,13 @@ (defun stgit-patches-marked-or-at-point () (defun stgit-goto-patch (patchsym) "Move point to the line containing patch PATCHSYM. -If that patch cannot be found, return nil." - (let ((p (text-property-any (point-min) (point-max) - 'stgit-patchsym patchsym))) - (when p - (goto-char p) +If that patch cannot be found, do nothing." + (let ((node (ewoc-nth stgit-ewoc 0))) + (while (and node (not (eq (stgit-patch-name (ewoc-data node)) + patchsym))) + (setq node (ewoc-next stgit-ewoc node))) + (when node + (ewoc-goto-node stgit-ewoc node) (move-to-column goal-column)))) (defun stgit-init () -- [mdw]