X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/b0126eac41487b9bca5af5cbb2212ff5b2c58b80..efc00ab16e2890b75d7224434ac43fe944ade4dd:/lisp/vc/vc-arch.el diff --git a/lisp/vc/vc-arch.el b/lisp/vc/vc-arch.el index a723f98b8a..18dfbe1f5f 100644 --- a/lisp/vc/vc-arch.el +++ b/lisp/vc/vc-arch.el @@ -1,10 +1,10 @@ -;;; vc-arch.el --- VC backend for the Arch version-control system +;;; vc-arch.el --- VC backend for the Arch version-control system -*- lexical-binding: t -*- -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Stefan Monnier +;; Package: vc ;; This file is part of GNU Emacs. @@ -39,7 +39,7 @@ ;; Bugs: -;; - *VC-log*'s initial content lacks the `Summary:' lines. +;; - *vc-log*'s initial content lacks the `Summary:' lines. ;; - All files under the tree are considered as "under Arch's control" ;; without regards to =tagging-method and such. ;; - Files are always considered as `edited'. @@ -59,12 +59,17 @@ ;;; Properties of the backend (defun vc-arch-revision-granularity () 'repository) -(defun vc-arch-checkout-model (files) 'implicit) +(defun vc-arch-checkout-model (_files) 'implicit) ;;; ;;; Customization options ;;; +(defgroup vc-arch nil + "VC Arch backend." + :version "24.1" + :group 'vc) + ;; It seems Arch diff does not accept many options, so this is not ;; very useful. It exists mainly so that the VC backends are all ;; consistent with regards to their treatment of diff switches. @@ -76,7 +81,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (string :tag "Argument String") (repeat :tag "Argument List" :value ("") string)) :version "23.1" - :group 'vc) + :group 'vc-arch) (define-obsolete-variable-alias 'vc-arch-command 'vc-arch-program "23.1") @@ -87,7 +92,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (or (car candidates) "tla")) "Name of the Arch executable." :type 'string - :group 'vc) + :group 'vc-arch) ;; Clear up the cache to force vc-call to check again and discover ;; new functions when we reload this file. @@ -222,7 +227,7 @@ Only the value `maybe' can be trusted :-(." (vc-file-setprop file 'arch-root root))))) -(defun vc-arch-register (files &optional rev comment) +(defun vc-arch-register (files &optional rev _comment) (if rev (error "Explicit initial revision not supported for Arch")) (dolist (file files) (let ((tagmet (vc-arch-tagging-method file))) @@ -253,7 +258,7 @@ Only the value `maybe' can be trusted :-(." ;; Strip the terminating newline. (buffer-substring (point-min) (1- (point-max))))))))) -(defun vc-arch-workfile-unchanged-p (file) +(defun vc-arch-workfile-unchanged-p (_file) "Stub: arch workfiles are always considered to be in a changed state," nil) @@ -377,7 +382,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see '(("\\`.*--\\(.*--.*\\)--\\(v?\\).*-\\([0-9]+\\)\\'" . "\\2\\3[\\1]")) "Rewrite rules to shorten Arch's revision names on the mode-line." :type '(repeat (cons regexp string)) - :group 'vc) + :group 'vc-arch) (defun vc-arch-mode-line-string (file) "Return string for placement in modeline by `vc-mode-line' for FILE." @@ -398,7 +403,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see (with-temp-buffer (insert-file-contents rej) (goto-char (point-min)) - (looking-at "Conflicts occured, diff3 conflict markers left in file\\."))))) + (looking-at "Conflicts occurred, diff3 conflict markers left in file\\."))))) (defun vc-arch-delete-rej-if-obsolete () "For use in `after-save-hook'." @@ -427,7 +432,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see (message "There are unresolved conflicts in %s" (file-name-nondirectory rej)))))) -(defun vc-arch-checkin (files rev comment &optional extra-args-ignored) +(defun vc-arch-checkin (files rev comment) (if rev (error "Committing to a specific revision is unsupported")) ;; FIXME: This implementation probably only works for singleton filesets (let ((summary (file-relative-name (car files) (vc-arch-root (car files))))) @@ -503,12 +508,11 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see "*")))))) (defun vc-arch-revision-completion-table (files) - (lexical-let ((files files)) - (lambda (string pred action) - ;; FIXME: complete revision patches as well. - (let* ((root (expand-file-name "{arch}" (vc-arch-root (car files)))) - (table (vc-arch--version-completion-table root string))) - (complete-with-action action table string pred))))) + (lambda (string pred action) + ;; FIXME: complete revision patches as well. + (let* ((root (expand-file-name "{arch}" (vc-arch-root (car files)))) + (table (vc-arch--version-completion-table root string))) + (complete-with-action action table string pred)))) ;;; Trimming revision libraries. @@ -542,13 +546,12 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see minrev)) (defun vc-arch-trim-make-sentinel (revs) - (if (null revs) (lambda (proc msg) (message "VC-Arch trimming ... done")) - (lexical-let ((revs revs)) - (lambda (proc msg) - (message "VC-Arch trimming %s..." (file-name-nondirectory (car revs))) - (rename-file (car revs) (concat (car revs) "*rm*")) - (setq proc (start-process "vc-arch-trim" nil - "rm" "-rf" (concat (car revs) "*rm*"))) + (if (null revs) (lambda (_proc _msg) (message "VC-Arch trimming ... done")) + (lambda (_proc _msg) + (message "VC-Arch trimming %s..." (file-name-nondirectory (car revs))) + (rename-file (car revs) (concat (car revs) "*rm*")) + (let ((proc (start-process "vc-arch-trim" nil + "rm" "-rf" (concat (car revs) "*rm*")))) (set-process-sentinel proc (vc-arch-trim-make-sentinel (cdr revs))))))) (defun vc-arch-trim-one-revlib (dir) @@ -567,7 +570,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see 'car-less-than-car)) (subdirs nil)) (when (cddr revs) - (dotimes (i (/ (length revs) 2)) + (dotimes (_i (/ (length revs) 2)) (let ((minrev (vc-arch-trim-find-least-useful-rev revs))) (setq revs (delq minrev revs)) (push minrev subdirs))) @@ -637,5 +640,4 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see (provide 'vc-arch) -;; arch-tag: a35c7c1c-5237-429d-88ef-3d718fd2e704 ;;; vc-arch.el ends here