From 712b9732db5ff6e38ac3f3960d69cb9a484add37 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 28 May 2013 00:47:11 -0700 Subject: [PATCH] Silence the rest of vc compilation * vc/vc-cvs.el (vc-exec-after, vc-coding-system-for-diff, vc-resynch-buffer): Declare. (vc-switches, vc-default-revert, vc-version-backup-file): Autoload. * vc/vc-git.el (vc-exec-after, vc-set-async-update, grep-read-regexp) (grep-read-files, grep-expand-template, vc-dir-refresh): Declare. (vc-setup-buffer, vc-switches, vc-resynch-buffer): Autoload. * vc/vc-hg.el (vc-exec-after, vc-set-async-update): Declare. (vc-setup-buffer, vc-switches, vc-do-async-command): Autoload. * vc/vc-sccs.el (vc-file-tree-walk): Declare. (vc-expand-dirs, vc-switches, vc-setup-buffer, vc-delistify) (vc-tag-precondition, vc-rename-master): Autoload. --- lisp/ChangeLog | 12 ++++++++++++ lisp/vc/vc-cvs.el | 13 +++++++++++++ lisp/vc/vc-git.el | 23 +++++++++++++++++++++++ lisp/vc/vc-hg.el | 12 ++++++++++++ lisp/vc/vc-sccs.el | 12 ++++++++++++ 5 files changed, 72 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index abb250ecc65..0a502543ef3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -6,12 +6,24 @@ (vc-exec-after, vc-set-async-update, vc-default-dir-printer) (vc-resynch-buffer, vc-dir-refresh): Declare. (vc-setup-buffer, vc-switches): Autoload. + * vc/vc-cvs.el (vc-exec-after, vc-coding-system-for-diff) + (vc-resynch-buffer): Declare. + (vc-switches, vc-default-revert, vc-version-backup-file): Autoload. * vc/vc-dir.el (desktop-missing-file-warning): Declare. + * vc/vc-git.el (vc-exec-after, vc-set-async-update) + (grep-read-regexp, grep-read-files, grep-expand-template) + (vc-dir-refresh): Declare. + (vc-setup-buffer, vc-switches, vc-resynch-buffer): Autoload. + * vc/vc-hg.el (vc-exec-after, vc-set-async-update): Declare. + (vc-setup-buffer, vc-switches, vc-do-async-command): Autoload. * vc/vc-mtn.el (vc-exec-after): Declare. (vc-switches): Autoload. * vc/vc-rcs.el (vc-expand-dirs, vc-switches) (vc-tag-precondition, vc-buffer-sync, vc-rename-master): Autoload. (vc-file-tree-walk): Declare. + * vc/vc-sccs.el (vc-file-tree-walk): Declare. + (vc-expand-dirs, vc-switches, vc-setup-buffer, vc-delistify) + (vc-tag-precondition, vc-rename-master): Autoload. * vc/vc-svn.el (vc-exec-after): Declare. (vc-switches, vc-setup-buffer): Autoload. * obsolete/vc-mcvs.el (vc-checkout, vc-switches, vc-default-revert): diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 7a8f8107509..eee896056c6 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -280,6 +280,8 @@ committed and support display of sticky tags." ;;; State-changing functions ;;; +(autoload 'vc-switches "vc") + (defun vc-cvs-register (files &optional _rev comment) "Register FILES into the CVS version-control system. COMMENT can be used to provide an initial description of FILES. @@ -415,6 +417,8 @@ REV is the revision to check out." (defun vc-cvs-delete-file (file) (vc-cvs-command nil 0 file "remove" "-f")) +(autoload 'vc-default-revert "vc") + (defun vc-cvs-revert (file &optional contents-done) "Revert FILE to the working revision on which it was based." (vc-default-revert 'CVS file contents-done) @@ -501,6 +505,8 @@ Will fail unless you have administrative privileges on the repo." ;;; (declare-function vc-rcs-print-log-cleanup "vc-rcs" ()) +;; Follows vc-cvs-command, which uses vc-do-command from vc-dispatcher. +(declare-function vc-exec-after "vc-dispatcher" (code)) (defun vc-cvs-print-log (files buffer &optional _shortlog _start-revision limit) "Print commit log associated with FILES into specified BUFFER. @@ -519,6 +525,9 @@ Remaining arguments are ignored." "Get comment history of a file." (vc-call-backend 'RCS 'comment-history file)) +(autoload 'vc-version-backup-file "vc") +(declare-function vc-coding-system-for-diff "vc" (file)) + (defun vc-cvs-diff (files &optional oldvers newvers buffer) "Get a difference report using CVS between two revisions of FILE." (let* (process-file-side-effects @@ -665,6 +674,10 @@ workspace is immediately moved to that new branch)." (vc-cvs-command nil 0 dir "tag" "-c" (if branchp "-b") name) (when branchp (vc-cvs-command nil 0 dir "update" "-r" name))) +;; Follows vc-cvs-command, which uses vc-do-command from vc-dispatcher. +(declare-function vc-resynch-buffer "vc-dispatcher" + (file &optional keep noquery reset-vc-info)) + (defun vc-cvs-retrieve-tag (dir name update) "Retrieve a tag at and below DIR. NAME is the name of the tag; if it is empty, do a `cvs update'. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index caece2ec277..af5be361047 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -443,6 +443,12 @@ or an empty string if none." (when next-stage (vc-git-dir-status-goto-stage next-stage files update-function)))) +;; Follows vc-git-command (or vc-do-async-command), which uses vc-do-command +;; from vc-dispatcher. +(declare-function vc-exec-after "vc-dispatcher" (code)) +;; Follows vc-exec-after. +(declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) + (defun vc-git-dir-status-goto-stage (stage files update-function) (erase-buffer) (pcase stage @@ -731,6 +737,8 @@ This prompts for a branch to merge from." ;;; HISTORY FUNCTIONS +(autoload 'vc-setup-buffer "vc-dispatcher") + (defun vc-git-print-log (files buffer &optional shortlog start-revision limit) "Print commit log associated with FILES into specified BUFFER. If SHORTLOG is non-nil, use a short format based on `vc-git-root-log-format'. @@ -857,6 +865,8 @@ or BRANCH^ (where \"^\" can be repeated)." (indent-region (point-min) (point-max) 2) (buffer-string)))) +(autoload 'vc-switches "vc") + (defun vc-git-diff (files &optional rev1 rev2 buffer) "Get a difference report using Git between two revisions of FILES." (let (process-file-side-effects) @@ -1010,6 +1020,12 @@ or BRANCH^ (where \"^\" can be repeated)." (or (vc-file-getprop file 'git-root) (vc-file-setprop file 'git-root (vc-find-root file ".git")))) +;; grep-compute-defaults autoloads grep. +(declare-function grep-read-regexp "grep" ()) +(declare-function grep-read-files "grep" (regexp)) +(declare-function grep-expand-template "grep" + (template &optional regexp files dir excl)) + ;; Derived from `lgrep'. (defun vc-git-grep (regexp &optional files dir) "Run git grep, searching for REGEXP in FILES in directory DIR. @@ -1065,6 +1081,10 @@ This command shares argument histories with \\[rgrep] and \\[grep]." (if (eq next-error-last-buffer (current-buffer)) (setq default-directory dir)))))) +;; Everywhere but here, follows vc-git-command, which uses vc-do-command +;; from vc-dispatcher. +(autoload 'vc-resynch-buffer "vc-dispatcher") + (defun vc-git-stash (name) "Create a stash." (interactive "sStash name: ") @@ -1122,6 +1142,9 @@ This command shares argument histories with \\[rgrep] and \\[grep]." (match-string 1) (error "Cannot find stash at point")))) +;; vc-git-stash-delete-at-point must be called from a vc-dir buffer. +(declare-function vc-dir-refresh "vc-dir" ()) + (defun vc-git-stash-delete-at-point () (interactive) (let ((stash (vc-git-stash-get-at-point (point)))) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index feec015e52a..a80a103c675 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -245,6 +245,8 @@ highlighting the Log View buffer." (repeat :tag "Argument List" :value ("") string)) :group 'vc-hg) +(autoload 'vc-setup-buffer "vc-dispatcher") + (defun vc-hg-print-log (files buffer &optional shortlog start-revision limit) "Print commit log associated with FILES into specified BUFFER. If SHORTLOG is non-nil, use a short format based on `vc-hg-root-log-format'. @@ -306,6 +308,8 @@ If LIMIT is non-nil, show no more than this many entries." ("^tag: +\\([^ ]+\\)$" (1 'highlight)) ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message))))))) +(autoload 'vc-switches "vc") + (defun vc-hg-diff (files &optional oldvers newvers buffer) "Get a difference report using hg between two revisions of FILES." (let* ((firstfile (car files)) @@ -591,6 +595,12 @@ REV is the revision to check out into WORKFILE." (forward-line)) (funcall update-function result))) +;; Follows vc-hg-command (or vc-do-async-command), which uses vc-do-command +;; from vc-dispatcher. +(declare-function vc-exec-after "vc-dispatcher" (code)) +;; Follows vc-exec-after. +(declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) + (defun vc-hg-dir-status (dir update-function) (vc-hg-command (current-buffer) 'async dir "status" "-C") (vc-exec-after @@ -651,6 +661,8 @@ REV is the revision to check out into WORKFILE." ;; modified files "Value of `compilation-error-regexp-alist' in *vc-hg* buffers.") +(autoload 'vc-do-async-command "vc-dispatcher") + (defun vc-hg-pull (prompt) "Issue a Mercurial pull command. If called interactively with a set of marked Log View buffers, diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el index d3cf650ddf9..7bce1ea3ba6 100644 --- a/lisp/vc/vc-sccs.el +++ b/lisp/vc/vc-sccs.el @@ -155,6 +155,8 @@ For a description of possible values, see `vc-check-master-templates'." (vc-sccs-state file)))) (vc-sccs-state file))) +(autoload 'vc-expand-dirs "vc") + (defun vc-sccs-dir-status (dir update-function) ;; FIXME: this function should be rewritten, using `vc-expand-dirs' ;; is not TRTD because it returns files from multiple backends. @@ -216,6 +218,8 @@ Optional string REV is a revision." ;; SCCS is totally file-oriented, so all we have to do is make the directory (make-directory "SCCS")) +(autoload 'vc-switches "vc") + (defun vc-sccs-register (files &optional rev comment) "Register FILES into the SCCS version-control system. REV is the optional revision number for the file. COMMENT can be used @@ -356,6 +360,9 @@ Remaining arguments are ignored." (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files)) (when limit 'limit-unsupported)) +(autoload 'vc-setup-buffer "vc-dispatcher") +(autoload 'vc-delistify "vc-dispatcher") + ;; FIXME use sccsdiff if present? (defun vc-sccs-diff (files &optional oldvers newvers buffer) "Get a difference report using SCCS between two filesets." @@ -432,6 +439,9 @@ Remaining arguments are ignored." ;;; our own set of name-to-revision mappings. ;;; +(autoload 'vc-tag-precondition "vc") +(declare-function vc-file-tree-walk "vc" (dirname func &rest args)) + (defun vc-sccs-create-tag (dir name branchp) (when branchp (error "SCCS backend does not support module branches")) @@ -460,6 +470,8 @@ Remaining arguments are ignored." (goto-char (point-min)) (re-search-forward "%[A-Z]%" nil t))) +(autoload 'vc-rename-master "vc") + (defun vc-sccs-rename-file (old new) ;; Move the master file (using vc-rcs-master-templates). (vc-rename-master (vc-name old) new vc-sccs-master-templates) -- 2.39.2