From: Karl Hasselström Date: Wed, 19 Dec 2007 18:00:08 +0000 (+0000) Subject: Emacs mode: show patches' short description X-Git-Tag: v0.15-rc1~353 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/2870f8b8d5544580dbab32b91c2de488dcc5e522?ds=sidebyside Emacs mode: show patches' short description Signed-off-by: Karl Hasselström Signed-off-by: David Kågedal --- diff --git a/contrib/stgit.el b/contrib/stgit.el index 78e9520..ed2fc37 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -62,7 +62,7 @@ (defun stgit-refresh () (erase-buffer) (insert "Branch: ") (stgit-run "branch") - (stgit-run "series") + (stgit-run "series" "--description") (if curpatch (stgit-goto-patch curpatch) (goto-line curline)))) @@ -97,13 +97,14 @@ (defun stgit-mode () goal-column 2) (use-local-map stgit-mode-map) (set (make-local-variable 'list-buffers-directory) default-directory) + (set-variable 'truncate-lines 't) (run-hooks 'stgit-mode-hook)) (defun stgit-patch-at-point () "Return the patch name on the current line" (save-excursion (beginning-of-line) - (if (looking-at "[>+-] \\(.*\\)") + (if (looking-at "[>+-] \\([^ ]*\\)") (match-string 1) nil))) @@ -111,7 +112,7 @@ (defun stgit-goto-patch (patch) "Move point to the line containing PATCH" (let ((p (point))) (goto-char (point-min)) - (if (re-search-forward (concat "[>+-] " (regexp-quote patch) "$") nil t) + (if (re-search-forward (concat "[>+-] " (regexp-quote patch) " ") nil t) (progn (move-to-column goal-column) t) (goto-char p)