mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-05 11:45:45 +00:00
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.
This commit is contained in:
parent
e6fe301afe
commit
d4767877ac
@ -1,5 +1,11 @@
|
||||
2014-12-02 Eric S. Raymond <esr@snark.thyrsus.com>
|
||||
|
||||
* 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.
|
||||
|
||||
* vc-hooks.el: Bind vc-delete-file to Ctrl-x v delete.
|
||||
|
||||
* vc.el (vc-expand-dirs): Now takes a second BACKEND argument,
|
||||
@ -21,7 +27,7 @@
|
||||
global.
|
||||
|
||||
* vc-bzr.el: Restore vc-bzr-state-heuristic as a private method.
|
||||
VC randomly/unpredictable fails without it; cause not yet established.
|
||||
VC randomly/unpredictably fails without it; cause not yet established.
|
||||
|
||||
2014-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
|
@ -981,7 +981,7 @@ stream. Standard error output is discarded."
|
||||
;; frob the results accordingly.
|
||||
(file-relative-name dir (vc-bzr-root dir)))))
|
||||
|
||||
(defun vc-bzr-dir-status-files (dir files _default-state update-function)
|
||||
(defun vc-bzr-dir-status-files (dir files update-function)
|
||||
"Return a list of conses (file . state) for DIR."
|
||||
(apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files)
|
||||
(vc-run-delayed
|
||||
|
@ -1084,7 +1084,7 @@ state."
|
||||
(vc-run-delayed
|
||||
(vc-cvs-after-dir-status update-function)))))
|
||||
|
||||
(defun vc-cvs-dir-status-files (dir files _default-state update-function)
|
||||
(defun vc-cvs-dir-status-files (dir files update-function)
|
||||
"Create a list of conses (file . state) for DIR."
|
||||
(apply 'vc-cvs-command (current-buffer) 'async dir "-f" "status" files)
|
||||
(vc-run-delayed
|
||||
|
@ -1014,8 +1014,8 @@ specific headers."
|
||||
(vc-call-backend backend 'dir-extra-headers dir)
|
||||
"\n"))
|
||||
|
||||
(defun vc-dir-refresh-files (files default-state)
|
||||
"Refresh some files in the *VC-dir* buffer."
|
||||
(defun vc-dir-refresh-files (files)
|
||||
"Refresh some fies in the *VC-dir* buffer."
|
||||
(let ((def-dir default-directory)
|
||||
(backend vc-dir-backend))
|
||||
(vc-set-mode-line-busy-indicator)
|
||||
@ -1032,7 +1032,7 @@ specific headers."
|
||||
(setq default-directory def-dir)
|
||||
(erase-buffer)
|
||||
(vc-call-backend
|
||||
backend 'dir-status-files def-dir files default-state
|
||||
backend 'dir-status-files def-dir files
|
||||
(lambda (entries &optional more-to-come)
|
||||
;; ENTRIES is a list of (FILE VC_STATE EXTRA) items.
|
||||
;; 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."
|
||||
vc-ewoc 'vc-dir-fileinfo->needs-update)))
|
||||
(if remaining
|
||||
(vc-dir-refresh-files
|
||||
(mapcar 'vc-dir-fileinfo->name remaining)
|
||||
'up-to-date)
|
||||
(mapcar 'vc-dir-fileinfo->name remaining))
|
||||
(setq mode-line-process nil))))))))))))
|
||||
|
||||
(defun vc-dir-show-fileentry (file)
|
||||
|
@ -51,7 +51,7 @@
|
||||
;; * registered (file) OK
|
||||
;; * state (file) OK
|
||||
;; * dir-status (dir update-function) OK
|
||||
;; - dir-status-files (dir files ds uf) NOT NEEDED
|
||||
;; - dir-status-files (dir files uf) NOT NEEDED
|
||||
;; * working-revision (file) OK
|
||||
;; - latest-on-branch-p (file) NOT NEEDED
|
||||
;; * checkout-model (files) OK
|
||||
@ -481,7 +481,7 @@ or an empty string if none."
|
||||
;; - how to support vc-dir on a subdir of the project tree
|
||||
(vc-git-dir-status-goto-stage 'update-index nil update-function))
|
||||
|
||||
(defun vc-git-dir-status-files (_dir files _default-state update-function)
|
||||
(defun vc-git-dir-status-files (_dir files update-function)
|
||||
"Return a list of (FILE STATE EXTRA) entries for FILES in DIR."
|
||||
(vc-git-dir-status-goto-stage 'update-index files update-function))
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
;; * registered (file) OK
|
||||
;; * state (file) OK
|
||||
;; - dir-status (dir update-function) OK
|
||||
;; - dir-status-files (dir files ds uf) OK
|
||||
;; - dir-status-files (dir files uf) OK
|
||||
;; - dir-extra-headers (dir) OK
|
||||
;; - dir-printer (fileinfo) OK
|
||||
;; * working-revision (file) OK
|
||||
@ -618,7 +618,7 @@ REV is the revision to check out into WORKFILE."
|
||||
(vc-run-delayed
|
||||
(vc-hg-after-dir-status update-function)))
|
||||
|
||||
(defun vc-hg-dir-status-files (dir files _default-state update-function)
|
||||
(defun vc-hg-dir-status-files (dir files update-function)
|
||||
(apply 'vc-hg-command (current-buffer) 'async dir "status" "-mardui" "-C" files)
|
||||
(vc-run-delayed
|
||||
(vc-hg-after-dir-status update-function)))
|
||||
|
@ -32,7 +32,7 @@
|
||||
;; * registered (file) OK
|
||||
;; * state (file) OK
|
||||
;; * dir-status (dir update-function) OK
|
||||
;; - dir-status-files (dir files ds uf) ??
|
||||
;; - dir-status-files (dir files uf) ??
|
||||
;; - dir-extra-headers (dir) NOT NEEDED
|
||||
;; - dir-printer (fileinfo) ??
|
||||
;; * working-revision (file) OK
|
||||
|
@ -206,7 +206,7 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
|
||||
(vc-svn-command (current-buffer) 'async nil "status" "-u")
|
||||
(vc-run-delayed (vc-svn-after-dir-status callback)))
|
||||
|
||||
(defun vc-svn-dir-status-files (_dir files _default-state callback)
|
||||
(defun vc-svn-dir-status-files (_dir files callback)
|
||||
(apply 'vc-svn-command (current-buffer) 'async nil "status" files)
|
||||
(vc-run-delayed
|
||||
(vc-svn-after-dir-status callback)))
|
||||
|
@ -148,13 +148,13 @@
|
||||
;; the following functions might be needed: `dir-extra-headers',
|
||||
;; `dir-printer', `extra-dir-menu' and `dir-status-files'.
|
||||
;;
|
||||
;; - dir-status-files (dir files default-state update-function)
|
||||
;; - dir-status-files (dir files update-function)
|
||||
;;
|
||||
;; This function is identical to dir-status except that it should
|
||||
;; only report status for the specified FILES. Also it needs to
|
||||
;; report on all requested files, including up-to-date or ignored
|
||||
;; files. If not provided, the default is to consider that the files
|
||||
;; are in DEFAULT-STATE.
|
||||
;; are in 'up-to-date state.
|
||||
;;
|
||||
;; - dir-extra-headers (dir)
|
||||
;;
|
||||
@ -577,6 +577,9 @@
|
||||
;; (This fixes a layer violation that produced bad behavior under
|
||||
;; SVN.)
|
||||
;;
|
||||
;; - INCOMPATIBLE CHANGE: The old fourth 'default-state' argument of
|
||||
;; vc-dir-status-files is gone; none of the back ends actually used it.
|
||||
;;
|
||||
;; - vc-state-heuristic is no longer a public method (the CVS backend
|
||||
;; retains it as a private one).
|
||||
;;
|
||||
@ -2884,9 +2887,9 @@ to provide the `find-revision' operation instead."
|
||||
(defalias 'vc-default-revision-completion-table 'ignore)
|
||||
(defalias 'vc-default-mark-resolved 'ignore)
|
||||
|
||||
(defun vc-default-dir-status-files (_backend _dir files default-state update-function)
|
||||
(defun vc-default-dir-status-files (_backend _dir files update-function)
|
||||
(funcall update-function
|
||||
(mapcar (lambda (file) (list file default-state)) files)))
|
||||
(mapcar (lambda (file) (list file 'up-to-date)) files)))
|
||||
|
||||
(defun vc-check-headers ()
|
||||
"Check if the current file has any headers in it."
|
||||
|
Loading…
Reference in New Issue
Block a user