Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
(defun stgit-rescan ()
"Rescan the status buffer."
(save-excursion
(defun stgit-rescan ()
"Rescan the status buffer."
(save-excursion
+ (let ((marked ())
+ found-any)
(goto-char (point-min))
(while (not (eobp))
(cond ((looking-at "Branch: \\(.*\\)")
(put-text-property (match-beginning 1) (match-end 1)
'face 'bold))
((looking-at "\\([>+-]\\)\\( \\)\\([^ ]+\\) *[|#] \\(.*\\)")
(goto-char (point-min))
(while (not (eobp))
(cond ((looking-at "Branch: \\(.*\\)")
(put-text-property (match-beginning 1) (match-end 1)
'face 'bold))
((looking-at "\\([>+-]\\)\\( \\)\\([^ ]+\\) *[|#] \\(.*\\)")
(let ((state (match-string 1))
(patchsym (intern (match-string 3))))
(put-text-property
(let ((state (match-string 1))
(patchsym (intern (match-string 3))))
(put-text-property
))
((or (looking-at "stg series: Branch \".*\" not initialised")
(looking-at "stg series: .*: branch not initialized"))
))
((or (looking-at "stg series: Branch \".*\" not initialised")
(looking-at "stg series: .*: branch not initialized"))
(forward-line 1)
(insert "Run M-x stgit-init to initialise")))
(forward-line 1))
(forward-line 1)
(insert "Run M-x stgit-init to initialise")))
(forward-line 1))
- (setq stgit-marked-patches (nreverse marked)))))
+ (setq stgit-marked-patches (nreverse marked))
+ (unless found-any
+ (insert "\n "
+ (propertize "no patches in series"
+ 'face 'stgit-description-face))))))
(defun stgit-select ()
"Expand or collapse the current entry"
(defun stgit-select ()
"Expand or collapse the current entry"