comparison contrib/mq.el @ 4428:fa51e66117b4

mq.el: don't fill half the screen with a single line of output.
author Bryan O'Sullivan <bos@serpentine.com>
date Tue, 08 May 2007 11:54:39 -0700
parents b59611e9dd64
children 3b0f73edee57
comparison
equal deleted inserted replaced
4427:b59611e9dd64 4428:fa51e66117b4
145 (message "Pushing...") 145 (message "Pushing...")
146 (setq ok (= 0 (apply 'call-process (hg-binary) nil t t "qpush" 146 (setq ok (= 0 (apply 'call-process (hg-binary) nil t t "qpush"
147 (if patch (list patch)))) 147 (if patch (list patch))))
148 last-line (mq-last-line)) 148 last-line (mq-last-line))
149 (let ((lines (count-lines (point-min) (point-max)))) 149 (let ((lines (count-lines (point-min) (point-max))))
150 (if (and (equal lines 2) (string-match "Now at:" last-line)) 150 (if (or (<= lines 1)
151 (and (equal lines 2) (string-match "Now at:" last-line)))
151 (progn 152 (progn
152 (kill-buffer (current-buffer)) 153 (kill-buffer (current-buffer))
153 (delete-window)) 154 (delete-window))
154 (hg-view-mode prev-buf)))) 155 (hg-view-mode prev-buf))))
155 (mq-refresh-buffers root) 156 (mq-refresh-buffers root)