mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-27 10:54:40 +00:00
Prevent some compilaation warnings.
This commit is contained in:
parent
6ea3f62c7c
commit
dab6808215
@ -1,4 +1,4 @@
|
||||
;;; vc-dispatcher.el -- generic command-dispatcher facility.
|
||||
7;;; vc-dispatcher.el -- generic command-dispatcher facility.
|
||||
|
||||
;; Copyright (C) 2008
|
||||
;; Free Software Foundation, Inc.
|
||||
@ -83,7 +83,7 @@
|
||||
;; treat all entries with the same state as the currently selected one as
|
||||
;; a unit.
|
||||
|
||||
;; The interface
|
||||
;; The interface:
|
||||
;;
|
||||
;; The main interface to the lower level is vc-do-command. This launches a
|
||||
;; comand, synchronously or asynchronously, making the output available
|
||||
@ -125,9 +125,6 @@
|
||||
(eval-when-compile
|
||||
(require 'cl))
|
||||
|
||||
(declare-function vc-log-edit "vc" (fileset))
|
||||
(declare-function vc-buffer-sync "vc" (&optional not-urgent))
|
||||
|
||||
;; General customization
|
||||
|
||||
(defcustom vc-logentry-check-hook nil
|
||||
@ -161,6 +158,7 @@ preserve the setting."
|
||||
(defvar vc-log-after-operation-hook nil)
|
||||
(defvar vc-log-fileset)
|
||||
(defvar vc-log-extra)
|
||||
(defvar vc-client-mode
|
||||
|
||||
;; In a log entry buffer, this is a local variable
|
||||
;; that points to the buffer for which it was made
|
||||
@ -508,8 +506,33 @@ editing!"
|
||||
(vc-resynch-window file keep noquery)))))
|
||||
(vc-directory-resynch-file file))
|
||||
|
||||
(defun vc-buffer-sync (&optional not-urgent)
|
||||
"Make sure the current buffer and its working file are in sync.
|
||||
NOT-URGENT means it is ok to continue if the user says not to save."
|
||||
(when (buffer-modified-p)
|
||||
(if (or vc-suppress-confirm
|
||||
(y-or-n-p (format "Buffer %s modified; save it? " (buffer-name))))
|
||||
(save-buffer)
|
||||
(unless not-urgent
|
||||
(error "Aborted")))))
|
||||
|
||||
;; Command closures
|
||||
|
||||
;; Set up key bindings for use while editing log messages
|
||||
|
||||
(defun vc-log-edit (fileset)
|
||||
"Set up `log-edit' for use with VC on FILE."
|
||||
(setq default-directory
|
||||
(with-current-buffer vc-parent-buffer default-directory))
|
||||
(log-edit 'vc-finish-logentry
|
||||
nil
|
||||
`((log-edit-listfun . (lambda () ',fileset))
|
||||
(log-edit-diff-function . (lambda () (vc-diff nil)))))
|
||||
(set (make-local-variable 'vc-log-fileset) fileset)
|
||||
(make-local-variable 'vc-log-extra)
|
||||
(set-buffer-modified-p nil)
|
||||
(setq buffer-file-name nil))
|
||||
|
||||
(defun vc-start-logentry (files extra comment initial-contents msg action &optional after-hook)
|
||||
"Accept a comment for an operation on FILES with extra data EXTRA.
|
||||
If COMMENT is nil, pop up a VC-log buffer, emit MSG, and set the
|
||||
|
25
lisp/vc.el
25
lisp/vc.el
@ -1029,16 +1029,6 @@ the common state of the fileset. Return (BACKEND . FILESET)."
|
||||
(unless (vc-backend buffer-file-name)
|
||||
(error "File %s is not under version control" buffer-file-name))))))
|
||||
|
||||
(defun vc-buffer-sync (&optional not-urgent)
|
||||
"Make sure the current buffer and its working file are in sync.
|
||||
NOT-URGENT means it is ok to continue if the user says not to save."
|
||||
(when (buffer-modified-p)
|
||||
(if (or vc-suppress-confirm
|
||||
(y-or-n-p (format "Buffer %s modified; save it? " (buffer-name))))
|
||||
(save-buffer)
|
||||
(unless not-urgent
|
||||
(error "Aborted")))))
|
||||
|
||||
;;; Support for the C-x v v command.
|
||||
;; This is where all the single-file-oriented code from before the fileset
|
||||
;; rewrite lives.
|
||||
@ -3270,21 +3260,6 @@ The annotations are relative to the current time, unless overridden by OFFSET."
|
||||
nil)
|
||||
|
||||
|
||||
;; Set up key bindings for use while editing log messages
|
||||
|
||||
(defun vc-log-edit (fileset)
|
||||
"Set up `log-edit' for use with VC on FILE."
|
||||
(setq default-directory
|
||||
(with-current-buffer vc-parent-buffer default-directory))
|
||||
(log-edit 'vc-finish-logentry
|
||||
nil
|
||||
`((log-edit-listfun . (lambda () ',fileset))
|
||||
(log-edit-diff-function . (lambda () (vc-diff nil)))))
|
||||
(set (make-local-variable 'vc-log-fileset) fileset)
|
||||
(make-local-variable 'vc-log-revision)
|
||||
(set-buffer-modified-p nil)
|
||||
(setq buffer-file-name nil))
|
||||
|
||||
;; These things should probably be generally available
|
||||
|
||||
(defun vc-file-tree-walk (dirname func &rest args)
|
||||
|
Loading…
Reference in New Issue
Block a user