diff options
| author | Eric S. Raymond | 2008-05-11 14:49:39 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 2008-05-11 14:49:39 +0000 |
| commit | dab68082150453add8e80c1bfbe91475b3e37657 (patch) | |
| tree | 0a460f95f4883be1871ad0c2d232bc1e9a2dcd64 | |
| parent | 6ea3f62c7c63163679f29deb688fccac2045a15c (diff) | |
| download | emacs-dab68082150453add8e80c1bfbe91475b3e37657.tar.gz emacs-dab68082150453add8e80c1bfbe91475b3e37657.zip | |
Prevent some compilaation warnings.
| -rw-r--r-- | lisp/vc-dispatcher.el | 33 | ||||
| -rw-r--r-- | lisp/vc.el | 25 |
2 files changed, 28 insertions, 30 deletions
diff --git a/lisp/vc-dispatcher.el b/lisp/vc-dispatcher.el index 6bb9b873f64..9fa592c86e7 100644 --- a/lisp/vc-dispatcher.el +++ b/lisp/vc-dispatcher.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; vc-dispatcher.el -- generic command-dispatcher facility. | 1 | 7;;; vc-dispatcher.el -- generic command-dispatcher facility. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2008 | 3 | ;; Copyright (C) 2008 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| @@ -83,7 +83,7 @@ | |||
| 83 | ;; treat all entries with the same state as the currently selected one as | 83 | ;; treat all entries with the same state as the currently selected one as |
| 84 | ;; a unit. | 84 | ;; a unit. |
| 85 | 85 | ||
| 86 | ;; The interface | 86 | ;; The interface: |
| 87 | ;; | 87 | ;; |
| 88 | ;; The main interface to the lower level is vc-do-command. This launches a | 88 | ;; The main interface to the lower level is vc-do-command. This launches a |
| 89 | ;; comand, synchronously or asynchronously, making the output available | 89 | ;; comand, synchronously or asynchronously, making the output available |
| @@ -125,9 +125,6 @@ | |||
| 125 | (eval-when-compile | 125 | (eval-when-compile |
| 126 | (require 'cl)) | 126 | (require 'cl)) |
| 127 | 127 | ||
| 128 | (declare-function vc-log-edit "vc" (fileset)) | ||
| 129 | (declare-function vc-buffer-sync "vc" (&optional not-urgent)) | ||
| 130 | |||
| 131 | ;; General customization | 128 | ;; General customization |
| 132 | 129 | ||
| 133 | (defcustom vc-logentry-check-hook nil | 130 | (defcustom vc-logentry-check-hook nil |
| @@ -161,6 +158,7 @@ preserve the setting." | |||
| 161 | (defvar vc-log-after-operation-hook nil) | 158 | (defvar vc-log-after-operation-hook nil) |
| 162 | (defvar vc-log-fileset) | 159 | (defvar vc-log-fileset) |
| 163 | (defvar vc-log-extra) | 160 | (defvar vc-log-extra) |
| 161 | (defvar vc-client-mode | ||
| 164 | 162 | ||
| 165 | ;; In a log entry buffer, this is a local variable | 163 | ;; In a log entry buffer, this is a local variable |
| 166 | ;; that points to the buffer for which it was made | 164 | ;; that points to the buffer for which it was made |
| @@ -508,8 +506,33 @@ editing!" | |||
| 508 | (vc-resynch-window file keep noquery))))) | 506 | (vc-resynch-window file keep noquery))))) |
| 509 | (vc-directory-resynch-file file)) | 507 | (vc-directory-resynch-file file)) |
| 510 | 508 | ||
| 509 | (defun vc-buffer-sync (&optional not-urgent) | ||
| 510 | "Make sure the current buffer and its working file are in sync. | ||
| 511 | NOT-URGENT means it is ok to continue if the user says not to save." | ||
| 512 | (when (buffer-modified-p) | ||
| 513 | (if (or vc-suppress-confirm | ||
| 514 | (y-or-n-p (format "Buffer %s modified; save it? " (buffer-name)))) | ||
| 515 | (save-buffer) | ||
| 516 | (unless not-urgent | ||
| 517 | (error "Aborted"))))) | ||
| 518 | |||
| 511 | ;; Command closures | 519 | ;; Command closures |
| 512 | 520 | ||
| 521 | ;; Set up key bindings for use while editing log messages | ||
| 522 | |||
| 523 | (defun vc-log-edit (fileset) | ||
| 524 | "Set up `log-edit' for use with VC on FILE." | ||
| 525 | (setq default-directory | ||
| 526 | (with-current-buffer vc-parent-buffer default-directory)) | ||
| 527 | (log-edit 'vc-finish-logentry | ||
| 528 | nil | ||
| 529 | `((log-edit-listfun . (lambda () ',fileset)) | ||
| 530 | (log-edit-diff-function . (lambda () (vc-diff nil))))) | ||
| 531 | (set (make-local-variable 'vc-log-fileset) fileset) | ||
| 532 | (make-local-variable 'vc-log-extra) | ||
| 533 | (set-buffer-modified-p nil) | ||
| 534 | (setq buffer-file-name nil)) | ||
| 535 | |||
| 513 | (defun vc-start-logentry (files extra comment initial-contents msg action &optional after-hook) | 536 | (defun vc-start-logentry (files extra comment initial-contents msg action &optional after-hook) |
| 514 | "Accept a comment for an operation on FILES with extra data EXTRA. | 537 | "Accept a comment for an operation on FILES with extra data EXTRA. |
| 515 | If COMMENT is nil, pop up a VC-log buffer, emit MSG, and set the | 538 | If COMMENT is nil, pop up a VC-log buffer, emit MSG, and set the |
diff --git a/lisp/vc.el b/lisp/vc.el index b221baffef4..fa2de3bbfd1 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -1029,16 +1029,6 @@ the common state of the fileset. Return (BACKEND . FILESET)." | |||
| 1029 | (unless (vc-backend buffer-file-name) | 1029 | (unless (vc-backend buffer-file-name) |
| 1030 | (error "File %s is not under version control" buffer-file-name)))))) | 1030 | (error "File %s is not under version control" buffer-file-name)))))) |
| 1031 | 1031 | ||
| 1032 | (defun vc-buffer-sync (&optional not-urgent) | ||
| 1033 | "Make sure the current buffer and its working file are in sync. | ||
| 1034 | NOT-URGENT means it is ok to continue if the user says not to save." | ||
| 1035 | (when (buffer-modified-p) | ||
| 1036 | (if (or vc-suppress-confirm | ||
| 1037 | (y-or-n-p (format "Buffer %s modified; save it? " (buffer-name)))) | ||
| 1038 | (save-buffer) | ||
| 1039 | (unless not-urgent | ||
| 1040 | (error "Aborted"))))) | ||
| 1041 | |||
| 1042 | ;;; Support for the C-x v v command. | 1032 | ;;; Support for the C-x v v command. |
| 1043 | ;; This is where all the single-file-oriented code from before the fileset | 1033 | ;; This is where all the single-file-oriented code from before the fileset |
| 1044 | ;; rewrite lives. | 1034 | ;; rewrite lives. |
| @@ -3270,21 +3260,6 @@ The annotations are relative to the current time, unless overridden by OFFSET." | |||
| 3270 | nil) | 3260 | nil) |
| 3271 | 3261 | ||
| 3272 | 3262 | ||
| 3273 | ;; Set up key bindings for use while editing log messages | ||
| 3274 | |||
| 3275 | (defun vc-log-edit (fileset) | ||
| 3276 | "Set up `log-edit' for use with VC on FILE." | ||
| 3277 | (setq default-directory | ||
| 3278 | (with-current-buffer vc-parent-buffer default-directory)) | ||
| 3279 | (log-edit 'vc-finish-logentry | ||
| 3280 | nil | ||
| 3281 | `((log-edit-listfun . (lambda () ',fileset)) | ||
| 3282 | (log-edit-diff-function . (lambda () (vc-diff nil))))) | ||
| 3283 | (set (make-local-variable 'vc-log-fileset) fileset) | ||
| 3284 | (make-local-variable 'vc-log-revision) | ||
| 3285 | (set-buffer-modified-p nil) | ||
| 3286 | (setq buffer-file-name nil)) | ||
| 3287 | |||
| 3288 | ;; These things should probably be generally available | 3263 | ;; These things should probably be generally available |
| 3289 | 3264 | ||
| 3290 | (defun vc-file-tree-walk (dirname func &rest args) | 3265 | (defun vc-file-tree-walk (dirname func &rest args) |