From: David Kågedal Date: Mon, 27 Jul 2009 15:26:47 +0000 (+0200) Subject: stgit.el: Get rid of the stgit-patchsym property X-Git-Tag: v0.15-rc2~11^2~64 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/f9b82d36fc1d00496e44c7f3db74f4693c778563?ds=inline stgit.el: Get rid of the stgit-patchsym property Signed-off-by: David Kågedal --- 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 ()