diff options
| author | Eric S. Raymond | 2014-12-02 08:01:46 -0500 |
|---|---|---|
| committer | Eric S. Raymond | 2014-12-02 08:01:46 -0500 |
| commit | d4767877aca091ee1a04608e2b50b346745661d4 (patch) | |
| tree | 189170facf63e6c9b640cdd1cb657a2afe880ad5 | |
| parent | e6fe301afe4bbc707d2fde44a5250b84418d2b1b (diff) | |
| download | emacs-d4767877aca091ee1a04608e2b50b346745661d4.tar.gz emacs-d4767877aca091ee1a04608e2b50b346745661d4.zip | |
Eliminate an unuted function argument.
* vc.el, all backends: API simplification: Remove 4th 'default-state'
argument from vc-dir-status files and its backend methods - no backend
method ever set it. It was used only in the fallback method to to set
a default of 'up-to-date, though a convoluted call chain obscured
this.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/vc/vc-bzr.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-cvs.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-dir.el | 9 | ||||
| -rw-r--r-- | lisp/vc/vc-git.el | 4 | ||||
| -rw-r--r-- | lisp/vc/vc-hg.el | 4 | ||||
| -rw-r--r-- | lisp/vc/vc-src.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-svn.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 11 |
9 files changed, 26 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6ffdd0adc06..8226b3d3c36 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2014-12-02 Eric S. Raymond <esr@snark.thyrsus.com> | 1 | 2014-12-02 Eric S. Raymond <esr@snark.thyrsus.com> |
| 2 | 2 | ||
| 3 | * vc.el, all backends: API simplification: Remove 4th | ||
| 4 | 'default-state' argument from vc-dir-status files and its backend | ||
| 5 | methods - no backend method ever set it. It was used only in the | ||
| 6 | fallback method to to set a default of 'up-to-date, though a | ||
| 7 | convoluted call chain obscured this. | ||
| 8 | |||
| 3 | * vc-hooks.el: Bind vc-delete-file to Ctrl-x v delete. | 9 | * vc-hooks.el: Bind vc-delete-file to Ctrl-x v delete. |
| 4 | 10 | ||
| 5 | * vc.el (vc-expand-dirs): Now takes a second BACKEND argument, | 11 | * vc.el (vc-expand-dirs): Now takes a second BACKEND argument, |
| @@ -21,7 +27,7 @@ | |||
| 21 | global. | 27 | global. |
| 22 | 28 | ||
| 23 | * vc-bzr.el: Restore vc-bzr-state-heuristic as a private method. | 29 | * vc-bzr.el: Restore vc-bzr-state-heuristic as a private method. |
| 24 | VC randomly/unpredictable fails without it; cause not yet established. | 30 | VC randomly/unpredictably fails without it; cause not yet established. |
| 25 | 31 | ||
| 26 | 2014-12-01 Stefan Monnier <monnier@iro.umontreal.ca> | 32 | 2014-12-01 Stefan Monnier <monnier@iro.umontreal.ca> |
| 27 | 33 | ||
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index de6ae21dbfe..a534a1ced3f 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el | |||
| @@ -981,7 +981,7 @@ stream. Standard error output is discarded." | |||
| 981 | ;; frob the results accordingly. | 981 | ;; frob the results accordingly. |
| 982 | (file-relative-name dir (vc-bzr-root dir))))) | 982 | (file-relative-name dir (vc-bzr-root dir))))) |
| 983 | 983 | ||
| 984 | (defun vc-bzr-dir-status-files (dir files _default-state update-function) | 984 | (defun vc-bzr-dir-status-files (dir files update-function) |
| 985 | "Return a list of conses (file . state) for DIR." | 985 | "Return a list of conses (file . state) for DIR." |
| 986 | (apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files) | 986 | (apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files) |
| 987 | (vc-run-delayed | 987 | (vc-run-delayed |
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 41c53261464..b07a05c6586 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el | |||
| @@ -1084,7 +1084,7 @@ state." | |||
| 1084 | (vc-run-delayed | 1084 | (vc-run-delayed |
| 1085 | (vc-cvs-after-dir-status update-function))))) | 1085 | (vc-cvs-after-dir-status update-function))))) |
| 1086 | 1086 | ||
| 1087 | (defun vc-cvs-dir-status-files (dir files _default-state update-function) | 1087 | (defun vc-cvs-dir-status-files (dir files update-function) |
| 1088 | "Create a list of conses (file . state) for DIR." | 1088 | "Create a list of conses (file . state) for DIR." |
| 1089 | (apply 'vc-cvs-command (current-buffer) 'async dir "-f" "status" files) | 1089 | (apply 'vc-cvs-command (current-buffer) 'async dir "-f" "status" files) |
| 1090 | (vc-run-delayed | 1090 | (vc-run-delayed |
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index a26287aa0f7..d97b9cd6a64 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el | |||
| @@ -1014,8 +1014,8 @@ specific headers." | |||
| 1014 | (vc-call-backend backend 'dir-extra-headers dir) | 1014 | (vc-call-backend backend 'dir-extra-headers dir) |
| 1015 | "\n")) | 1015 | "\n")) |
| 1016 | 1016 | ||
| 1017 | (defun vc-dir-refresh-files (files default-state) | 1017 | (defun vc-dir-refresh-files (files) |
| 1018 | "Refresh some files in the *VC-dir* buffer." | 1018 | "Refresh some fies in the *VC-dir* buffer." |
| 1019 | (let ((def-dir default-directory) | 1019 | (let ((def-dir default-directory) |
| 1020 | (backend vc-dir-backend)) | 1020 | (backend vc-dir-backend)) |
| 1021 | (vc-set-mode-line-busy-indicator) | 1021 | (vc-set-mode-line-busy-indicator) |
| @@ -1032,7 +1032,7 @@ specific headers." | |||
| 1032 | (setq default-directory def-dir) | 1032 | (setq default-directory def-dir) |
| 1033 | (erase-buffer) | 1033 | (erase-buffer) |
| 1034 | (vc-call-backend | 1034 | (vc-call-backend |
| 1035 | backend 'dir-status-files def-dir files default-state | 1035 | backend 'dir-status-files def-dir files |
| 1036 | (lambda (entries &optional more-to-come) | 1036 | (lambda (entries &optional more-to-come) |
| 1037 | ;; ENTRIES is a list of (FILE VC_STATE EXTRA) items. | 1037 | ;; ENTRIES is a list of (FILE VC_STATE EXTRA) items. |
| 1038 | ;; If MORE-TO-COME is true, then more updates will come from | 1038 | ;; If MORE-TO-COME is true, then more updates will come from |
| @@ -1110,8 +1110,7 @@ Throw an error if another update process is in progress." | |||
| 1110 | vc-ewoc 'vc-dir-fileinfo->needs-update))) | 1110 | vc-ewoc 'vc-dir-fileinfo->needs-update))) |
| 1111 | (if remaining | 1111 | (if remaining |
| 1112 | (vc-dir-refresh-files | 1112 | (vc-dir-refresh-files |
| 1113 | (mapcar 'vc-dir-fileinfo->name remaining) | 1113 | (mapcar 'vc-dir-fileinfo->name remaining)) |
| 1114 | 'up-to-date) | ||
| 1115 | (setq mode-line-process nil)))))))))))) | 1114 | (setq mode-line-process nil)))))))))))) |
| 1116 | 1115 | ||
| 1117 | (defun vc-dir-show-fileentry (file) | 1116 | (defun vc-dir-show-fileentry (file) |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 3538f2c3828..fad834bcee8 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | ;; * registered (file) OK | 51 | ;; * registered (file) OK |
| 52 | ;; * state (file) OK | 52 | ;; * state (file) OK |
| 53 | ;; * dir-status (dir update-function) OK | 53 | ;; * dir-status (dir update-function) OK |
| 54 | ;; - dir-status-files (dir files ds uf) NOT NEEDED | 54 | ;; - dir-status-files (dir files uf) NOT NEEDED |
| 55 | ;; * working-revision (file) OK | 55 | ;; * working-revision (file) OK |
| 56 | ;; - latest-on-branch-p (file) NOT NEEDED | 56 | ;; - latest-on-branch-p (file) NOT NEEDED |
| 57 | ;; * checkout-model (files) OK | 57 | ;; * checkout-model (files) OK |
| @@ -481,7 +481,7 @@ or an empty string if none." | |||
| 481 | ;; - how to support vc-dir on a subdir of the project tree | 481 | ;; - how to support vc-dir on a subdir of the project tree |
| 482 | (vc-git-dir-status-goto-stage 'update-index nil update-function)) | 482 | (vc-git-dir-status-goto-stage 'update-index nil update-function)) |
| 483 | 483 | ||
| 484 | (defun vc-git-dir-status-files (_dir files _default-state update-function) | 484 | (defun vc-git-dir-status-files (_dir files update-function) |
| 485 | "Return a list of (FILE STATE EXTRA) entries for FILES in DIR." | 485 | "Return a list of (FILE STATE EXTRA) entries for FILES in DIR." |
| 486 | (vc-git-dir-status-goto-stage 'update-index files update-function)) | 486 | (vc-git-dir-status-goto-stage 'update-index files update-function)) |
| 487 | 487 | ||
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 35f5354da65..bfd1447aa31 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | ;; * registered (file) OK | 44 | ;; * registered (file) OK |
| 45 | ;; * state (file) OK | 45 | ;; * state (file) OK |
| 46 | ;; - dir-status (dir update-function) OK | 46 | ;; - dir-status (dir update-function) OK |
| 47 | ;; - dir-status-files (dir files ds uf) OK | 47 | ;; - dir-status-files (dir files uf) OK |
| 48 | ;; - dir-extra-headers (dir) OK | 48 | ;; - dir-extra-headers (dir) OK |
| 49 | ;; - dir-printer (fileinfo) OK | 49 | ;; - dir-printer (fileinfo) OK |
| 50 | ;; * working-revision (file) OK | 50 | ;; * working-revision (file) OK |
| @@ -618,7 +618,7 @@ REV is the revision to check out into WORKFILE." | |||
| 618 | (vc-run-delayed | 618 | (vc-run-delayed |
| 619 | (vc-hg-after-dir-status update-function))) | 619 | (vc-hg-after-dir-status update-function))) |
| 620 | 620 | ||
| 621 | (defun vc-hg-dir-status-files (dir files _default-state update-function) | 621 | (defun vc-hg-dir-status-files (dir files update-function) |
| 622 | (apply 'vc-hg-command (current-buffer) 'async dir "status" "-mardui" "-C" files) | 622 | (apply 'vc-hg-command (current-buffer) 'async dir "status" "-mardui" "-C" files) |
| 623 | (vc-run-delayed | 623 | (vc-run-delayed |
| 624 | (vc-hg-after-dir-status update-function))) | 624 | (vc-hg-after-dir-status update-function))) |
diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el index 9e17d058a91..a2ebeef22b9 100644 --- a/lisp/vc/vc-src.el +++ b/lisp/vc/vc-src.el | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | ;; * registered (file) OK | 32 | ;; * registered (file) OK |
| 33 | ;; * state (file) OK | 33 | ;; * state (file) OK |
| 34 | ;; * dir-status (dir update-function) OK | 34 | ;; * dir-status (dir update-function) OK |
| 35 | ;; - dir-status-files (dir files ds uf) ?? | 35 | ;; - dir-status-files (dir files uf) ?? |
| 36 | ;; - dir-extra-headers (dir) NOT NEEDED | 36 | ;; - dir-extra-headers (dir) NOT NEEDED |
| 37 | ;; - dir-printer (fileinfo) ?? | 37 | ;; - dir-printer (fileinfo) ?? |
| 38 | ;; * working-revision (file) OK | 38 | ;; * working-revision (file) OK |
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 55b8f111e01..8ca8a0978e3 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el | |||
| @@ -206,7 +206,7 @@ RESULT is a list of conses (FILE . STATE) for directory DIR." | |||
| 206 | (vc-svn-command (current-buffer) 'async nil "status" "-u") | 206 | (vc-svn-command (current-buffer) 'async nil "status" "-u") |
| 207 | (vc-run-delayed (vc-svn-after-dir-status callback))) | 207 | (vc-run-delayed (vc-svn-after-dir-status callback))) |
| 208 | 208 | ||
| 209 | (defun vc-svn-dir-status-files (_dir files _default-state callback) | 209 | (defun vc-svn-dir-status-files (_dir files callback) |
| 210 | (apply 'vc-svn-command (current-buffer) 'async nil "status" files) | 210 | (apply 'vc-svn-command (current-buffer) 'async nil "status" files) |
| 211 | (vc-run-delayed | 211 | (vc-run-delayed |
| 212 | (vc-svn-after-dir-status callback))) | 212 | (vc-svn-after-dir-status callback))) |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 1b82bfd939d..c4810cf8b8b 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -148,13 +148,13 @@ | |||
| 148 | ;; the following functions might be needed: `dir-extra-headers', | 148 | ;; the following functions might be needed: `dir-extra-headers', |
| 149 | ;; `dir-printer', `extra-dir-menu' and `dir-status-files'. | 149 | ;; `dir-printer', `extra-dir-menu' and `dir-status-files'. |
| 150 | ;; | 150 | ;; |
| 151 | ;; - dir-status-files (dir files default-state update-function) | 151 | ;; - dir-status-files (dir files update-function) |
| 152 | ;; | 152 | ;; |
| 153 | ;; This function is identical to dir-status except that it should | 153 | ;; This function is identical to dir-status except that it should |
| 154 | ;; only report status for the specified FILES. Also it needs to | 154 | ;; only report status for the specified FILES. Also it needs to |
| 155 | ;; report on all requested files, including up-to-date or ignored | 155 | ;; report on all requested files, including up-to-date or ignored |
| 156 | ;; files. If not provided, the default is to consider that the files | 156 | ;; files. If not provided, the default is to consider that the files |
| 157 | ;; are in DEFAULT-STATE. | 157 | ;; are in 'up-to-date state. |
| 158 | ;; | 158 | ;; |
| 159 | ;; - dir-extra-headers (dir) | 159 | ;; - dir-extra-headers (dir) |
| 160 | ;; | 160 | ;; |
| @@ -577,6 +577,9 @@ | |||
| 577 | ;; (This fixes a layer violation that produced bad behavior under | 577 | ;; (This fixes a layer violation that produced bad behavior under |
| 578 | ;; SVN.) | 578 | ;; SVN.) |
| 579 | ;; | 579 | ;; |
| 580 | ;; - INCOMPATIBLE CHANGE: The old fourth 'default-state' argument of | ||
| 581 | ;; vc-dir-status-files is gone; none of the back ends actually used it. | ||
| 582 | ;; | ||
| 580 | ;; - vc-state-heuristic is no longer a public method (the CVS backend | 583 | ;; - vc-state-heuristic is no longer a public method (the CVS backend |
| 581 | ;; retains it as a private one). | 584 | ;; retains it as a private one). |
| 582 | ;; | 585 | ;; |
| @@ -2884,9 +2887,9 @@ to provide the `find-revision' operation instead." | |||
| 2884 | (defalias 'vc-default-revision-completion-table 'ignore) | 2887 | (defalias 'vc-default-revision-completion-table 'ignore) |
| 2885 | (defalias 'vc-default-mark-resolved 'ignore) | 2888 | (defalias 'vc-default-mark-resolved 'ignore) |
| 2886 | 2889 | ||
| 2887 | (defun vc-default-dir-status-files (_backend _dir files default-state update-function) | 2890 | (defun vc-default-dir-status-files (_backend _dir files update-function) |
| 2888 | (funcall update-function | 2891 | (funcall update-function |
| 2889 | (mapcar (lambda (file) (list file default-state)) files))) | 2892 | (mapcar (lambda (file) (list file 'up-to-date)) files))) |
| 2890 | 2893 | ||
| 2891 | (defun vc-check-headers () | 2894 | (defun vc-check-headers () |
| 2892 | "Check if the current file has any headers in it." | 2895 | "Check if the current file has any headers in it." |