comparison lisp/vc.el @ 94857:7f0ec5dfb100

Prevent some compilaation warnings.
author Eric S. Raymond <esr@snark.thyrsus.com>
date Sun, 11 May 2008 14:49:39 +0000
parents 3cb546529dde
children 142a56989604
comparison
equal deleted inserted replaced
94856:56ae400b4d14 94857:7f0ec5dfb100
1026 (set-buffer vc-parent-buffer)) 1026 (set-buffer vc-parent-buffer))
1027 (if (not buffer-file-name) 1027 (if (not buffer-file-name)
1028 (error "Buffer %s is not associated with a file" (buffer-name)) 1028 (error "Buffer %s is not associated with a file" (buffer-name))
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
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 1031
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.
1045 1035
3268 (put-text-property start end 'face face))))) 3258 (put-text-property start end 'face face)))))
3269 ;; Pretend to font-lock there were no matches. 3259 ;; Pretend to font-lock there were no matches.
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)
3291 "Walk recursively through DIRNAME. 3266 "Walk recursively through DIRNAME.
3292 Invoke FUNC f ARGS on each VC-managed file f underneath it." 3267 Invoke FUNC f ARGS on each VC-managed file f underneath it."