diff options
| author | Thien-Thi Nguyen | 2008-01-20 20:23:04 +0000 |
|---|---|---|
| committer | Thien-Thi Nguyen | 2008-01-20 20:23:04 +0000 |
| commit | d048f3bf74f10a336e5a7bc8fb270415e1816fed (patch) | |
| tree | 1bc7c390c3a586b88cd9ca8355d79dc9d8252308 | |
| parent | f1e22adaab1610a6b4805ab69aebfb98c29d1916 (diff) | |
| download | emacs-d048f3bf74f10a336e5a7bc8fb270415e1816fed.tar.gz emacs-d048f3bf74f10a336e5a7bc8fb270415e1816fed.zip | |
(vc-process-sentinel): Set mode-line-process.
(vc-exec-after): Likewise, for the `run' process status.
| -rw-r--r-- | lisp/vc.el | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index a0f8ce1702c..26cf32999b6 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -959,6 +959,12 @@ BUF defaults to \"*vc*\", can be a string and will be created if necessary." | |||
| 959 | 959 | ||
| 960 | (defun vc-process-sentinel (p s) | 960 | (defun vc-process-sentinel (p s) |
| 961 | (let ((previous (process-get p 'vc-previous-sentinel))) | 961 | (let ((previous (process-get p 'vc-previous-sentinel))) |
| 962 | (setq mode-line-process | ||
| 963 | (let ((status (process-status p))) | ||
| 964 | ;; Leave mode-line uncluttered, normally. | ||
| 965 | ;; (Let known any weirdness in-form-ally. ;-) --ttn | ||
| 966 | (unless (eq 'exit status) | ||
| 967 | (format " (%s)" status)))) | ||
| 962 | (if previous (funcall previous p s)) | 968 | (if previous (funcall previous p s)) |
| 963 | (with-current-buffer (process-buffer p) | 969 | (with-current-buffer (process-buffer p) |
| 964 | (let (vc-sentinel-movepoint) | 970 | (let (vc-sentinel-movepoint) |
| @@ -999,6 +1005,11 @@ Else, add CODE to the process' sentinel." | |||
| 999 | (eval code)) | 1005 | (eval code)) |
| 1000 | ;; If a process is running, add CODE to the sentinel | 1006 | ;; If a process is running, add CODE to the sentinel |
| 1001 | ((eq (process-status proc) 'run) | 1007 | ((eq (process-status proc) 'run) |
| 1008 | (setq mode-line-process | ||
| 1009 | ;; Deliberate overstatement, but power law respected. | ||
| 1010 | ;; (The message is ephemeral, so we make it loud.) --ttn | ||
| 1011 | (propertize " (incomplete / in progress)" | ||
| 1012 | 'face 'compilation-warning)) | ||
| 1002 | (let ((previous (process-sentinel proc))) | 1013 | (let ((previous (process-sentinel proc))) |
| 1003 | (unless (eq previous 'vc-process-sentinel) | 1014 | (unless (eq previous 'vc-process-sentinel) |
| 1004 | (process-put proc 'vc-previous-sentinel previous)) | 1015 | (process-put proc 'vc-previous-sentinel previous)) |
| @@ -2572,7 +2583,7 @@ With prefix arg READ-SWITCHES, specify a value to override | |||
| 2572 | (cd dir) | 2583 | (cd dir) |
| 2573 | (vc-status-mode)) | 2584 | (vc-status-mode)) |
| 2574 | 2585 | ||
| 2575 | (defvar vc-status-mode-map | 2586 | (defvar vc-status-mode-map |
| 2576 | (let ((map (make-keymap))) | 2587 | (let ((map (make-keymap))) |
| 2577 | (suppress-keymap map) | 2588 | (suppress-keymap map) |
| 2578 | ;; Marking. | 2589 | ;; Marking. |
| @@ -2637,8 +2648,8 @@ With prefix arg READ-SWITCHES, specify a value to override | |||
| 2637 | ;; be asynchronous. It should compute the results and call the | 2648 | ;; be asynchronous. It should compute the results and call the |
| 2638 | ;; function passed as a an arg to update the vc-status buffer with | 2649 | ;; function passed as a an arg to update the vc-status buffer with |
| 2639 | ;; the results. | 2650 | ;; the results. |
| 2640 | (vc-call-backend | 2651 | (vc-call-backend |
| 2641 | backend 'dir-status default-directory | 2652 | backend 'dir-status default-directory |
| 2642 | #'vc-update-vc-status-buffer (current-buffer)))) | 2653 | #'vc-update-vc-status-buffer (current-buffer)))) |
| 2643 | 2654 | ||
| 2644 | (defun vc-status-next-line (arg) | 2655 | (defun vc-status-next-line (arg) |
| @@ -2731,11 +2742,11 @@ If a prefix argument is given, move by that many lines." | |||
| 2731 | 2742 | ||
| 2732 | (defun vc-status-marked-files () | 2743 | (defun vc-status-marked-files () |
| 2733 | "Return the list of marked files" | 2744 | "Return the list of marked files" |
| 2734 | (mapcar | 2745 | (mapcar |
| 2735 | (lambda (elem) | 2746 | (lambda (elem) |
| 2736 | (expand-file-name (vc-status-fileinfo->name elem))) | 2747 | (expand-file-name (vc-status-fileinfo->name elem))) |
| 2737 | (ewoc-collect | 2748 | (ewoc-collect |
| 2738 | vc-status | 2749 | vc-status |
| 2739 | (lambda (crt) (vc-status-fileinfo->marked crt))))) | 2750 | (lambda (crt) (vc-status-fileinfo->marked crt))))) |
| 2740 | 2751 | ||
| 2741 | ;;; End experimental code. | 2752 | ;;; End experimental code. |