diff options
| author | Eric S. Raymond | 2008-05-06 16:00:54 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 2008-05-06 16:00:54 +0000 |
| commit | c8d4f1a0a6472a109f6f66709b1a4555823b16d4 (patch) | |
| tree | 782f7304424b2b2fa52763499df2e0ad35199daa | |
| parent | 5509c6add4c2bf1430c1ed0eb5770e259e1afcf9 (diff) | |
| download | emacs-c8d4f1a0a6472a109f6f66709b1a4555823b16d4.tar.gz emacs-c8d4f1a0a6472a109f6f66709b1a4555823b16d4.zip | |
More decoupling of vc-dispatcher.el from vc.el.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/vc-dispatcher.el | 15 | ||||
| -rw-r--r-- | lisp/vc-hooks.el | 1 |
3 files changed, 17 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 67f9174a5bd..69ce6939018 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-05-06 Eric S. Raymond <esr@snark.thyrsus.com> | ||
| 2 | |||
| 3 | * vc-hooks.el (vc-find-file-hook), | ||
| 4 | vc-dispatcher.el (vc-resynch-window): Decouple vc-dispatcher | ||
| 5 | further from vc.el. | ||
| 6 | |||
| 1 | 2008-05-06 Wilson Snyder <wsnyder@wsnyder.org> | 7 | 2008-05-06 Wilson Snyder <wsnyder@wsnyder.org> |
| 2 | 8 | ||
| 3 | * verilog-mode.el (verilog-getopt-file): Cleanup warning message format. | 9 | * verilog-mode.el (verilog-getopt-file): Cleanup warning message format. |
diff --git a/lisp/vc-dispatcher.el b/lisp/vc-dispatcher.el index 76801e3abc2..3bfa65f915b 100644 --- a/lisp/vc-dispatcher.el +++ b/lisp/vc-dispatcher.el | |||
| @@ -102,7 +102,13 @@ | |||
| 102 | ;; (vc-dir) sets up a dispatcher browsing buffer; (vc-dispatcher-selection-set) | 102 | ;; (vc-dir) sets up a dispatcher browsing buffer; (vc-dispatcher-selection-set) |
| 103 | ;; returns a selection set of files, either the marked files in a browsing | 103 | ;; returns a selection set of files, either the marked files in a browsing |
| 104 | ;; buffer or the singleton set consisting of the file visited by the current | 104 | ;; buffer or the singleton set consisting of the file visited by the current |
| 105 | ;; buffer (when that is appropriate). | 105 | ;; buffer (when that is appropriate). It also does what is needed to ensure |
| 106 | ;; that on-disk files and the contents of their visiting Emacs buffers | ||
| 107 | ;; coincide. | ||
| 108 | ;; | ||
| 109 | ;; When the client mode adds a local mode-line-hook to a buffer, it | ||
| 110 | ;; will be called with the buffer file name as argument whenever the | ||
| 111 | ;; dispatcher resynchs the buffer. | ||
| 106 | 112 | ||
| 107 | ;; To do: | 113 | ;; To do: |
| 108 | ;; | 114 | ;; |
| @@ -550,8 +556,7 @@ editing!" | |||
| 550 | (and (not view-mode) | 556 | (and (not view-mode) |
| 551 | (not (eq (get major-mode 'mode-class) 'special)) | 557 | (not (eq (get major-mode 'mode-class) 'special)) |
| 552 | (view-mode-enter)))) | 558 | (view-mode-enter)))) |
| 553 | ;; FIXME: Call into vc.el | 559 | (run-hook-with-args 'modeline-hook buffer-file-name)) |
| 554 | (vc-mode-line buffer-file-name)) | ||
| 555 | (kill-buffer (current-buffer))))) | 560 | (kill-buffer (current-buffer))))) |
| 556 | 561 | ||
| 557 | (defun vc-resynch-buffer (file &optional keep noquery) | 562 | (defun vc-resynch-buffer (file &optional keep noquery) |
| @@ -1640,7 +1645,7 @@ NOT-URGENT means it is ok to continue if the user says not to save." | |||
| 1640 | (defun vc-dispatcher-selection-set (eligible | 1645 | (defun vc-dispatcher-selection-set (eligible |
| 1641 | &optional | 1646 | &optional |
| 1642 | allow-directory-wildcard | 1647 | allow-directory-wildcard |
| 1643 | allow-inegible | 1648 | allow-ineligible |
| 1644 | include-files-not-directories) | 1649 | include-files-not-directories) |
| 1645 | "Deduce a set of files to which to apply an operation. Return the fileset. | 1650 | "Deduce a set of files to which to apply an operation. Return the fileset. |
| 1646 | If we're in VC-dired mode, the fileset is the list of marked files. | 1651 | If we're in VC-dired mode, the fileset is the list of marked files. |
| @@ -1678,7 +1683,7 @@ Otherwise, throw an error." | |||
| 1678 | (vc-dispatcher-browsing)))) | 1683 | (vc-dispatcher-browsing)))) |
| 1679 | (progn | 1684 | (progn |
| 1680 | (set-buffer vc-parent-buffer) | 1685 | (set-buffer vc-parent-buffer) |
| 1681 | (vc-dispatcher-selection-set))) | 1686 | (vc-dispatcher-selection-set eligible))) |
| 1682 | ;; No parent buffer, we may want to select entire directory | 1687 | ;; No parent buffer, we may want to select entire directory |
| 1683 | ;; | 1688 | ;; |
| 1684 | ;; This is guarded by an enabling arg so users won't potentially | 1689 | ;; This is guarded by an enabling arg so users won't potentially |
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 74be3c36742..971c92ef775 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el | |||
| @@ -901,6 +901,7 @@ current, and kill the buffer that visits the link." | |||
| 901 | (setq vc-mode nil)) | 901 | (setq vc-mode nil)) |
| 902 | (when buffer-file-name | 902 | (when buffer-file-name |
| 903 | (vc-file-clearprops buffer-file-name) | 903 | (vc-file-clearprops buffer-file-name) |
| 904 | (add-hook 'mode-line-hook 'vc-mode-line nil t) | ||
| 904 | (cond | 905 | (cond |
| 905 | ((with-demoted-errors (vc-backend buffer-file-name)) | 906 | ((with-demoted-errors (vc-backend buffer-file-name)) |
| 906 | ;; Compute the state and put it in the modeline. | 907 | ;; Compute the state and put it in the modeline. |