diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-04-25 23:18:47 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-04-25 23:18:47 -0400 |
commit | 0d42eb3e961e612b1b04e32e99c2998dd4d5d3be (patch) | |
tree | ba3f4b82f97ff86ca4c5773f43b2d8a50a23e123 /lisp/vc/vc-mtn.el | |
parent | f08ae1c9b5ee79aef764f4ef35ae4c84009333e6 (diff) | |
download | emacs-0d42eb3e961e612b1b04e32e99c2998dd4d5d3be.tar.gz |
* lisp/vc/vc-mtn.el:
* lisp/vc/vc-hg.el:
* lisp/vc/vc-git.el:
* lisp/vc/vc-dir.el:
* lisp/vc/vc-cvs.el:
* lisp/vc/vc-bzr.el:
* lisp/vc/vc-arch.el:
* lisp/vc/vc.el: Replace lexical-let by lexical-binding.
* lisp/minibuffer.el (lazy-completion-table): Avoid ((λ ...) ...).
* lisp/emacs-lisp/cl-macs.el (lexical-let): Fix use in lexical-binding.
* lisp/emacs-lisp/cconv.el (cconv-analyse-form): Warn use of ((λ ...) ...).
Diffstat (limited to 'lisp/vc/vc-mtn.el')
-rw-r--r-- | lisp/vc/vc-mtn.el | 81 |
1 files changed, 40 insertions, 41 deletions
diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el index 122743c3747..bd3a6207b73 100644 --- a/lisp/vc/vc-mtn.el +++ b/lisp/vc/vc-mtn.el @@ -1,4 +1,4 @@ -;;; vc-mtn.el --- VC backend for Monotone +;;; vc-mtn.el --- VC backend for Monotone -*- lexical-binding: t -*- ;; Copyright (C) 2007-2012 Free Software Foundation, Inc. @@ -76,7 +76,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." ;;;###autoload (vc-mtn-registered file)))) (defun vc-mtn-revision-granularity () 'repository) -(defun vc-mtn-checkout-model (files) 'implicit) +(defun vc-mtn-checkout-model (_files) 'implicit) (defun vc-mtn-root (file) (setq file (if (file-directory-p file) @@ -173,7 +173,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (t ?:)) branch))) -(defun vc-mtn-register (files &optional rev comment) +(defun vc-mtn-register (files &optional _rev _comment) (vc-mtn-command nil 0 files "add")) (defun vc-mtn-responsible-p (file) (vc-mtn-root file)) @@ -181,7 +181,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (declare-function log-edit-extract-headers "log-edit" (headers string)) -(defun vc-mtn-checkin (files rev comment) +(defun vc-mtn-checkin (files _rev comment) (apply 'vc-mtn-command nil 0 files (nconc (list "commit" "-m") (log-edit-extract-headers '(("Author" . "--author") @@ -201,7 +201,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." ;; (defun vc-mtn-rollback (files) ;; ) -(defun vc-mtn-print-log (files buffer &optional shortlog start-revision limit) +(defun vc-mtn-print-log (files buffer &optional _shortlog start-revision limit) (apply 'vc-mtn-command buffer 0 files "log" (append (when start-revision (list "--from" (format "%s" start-revision))) @@ -304,44 +304,43 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (push (match-string 0) ids)) ids))) -(defun vc-mtn-revision-completion-table (files) +(defun vc-mtn-revision-completion-table (_files) ;; TODO: Implement completion for selectors ;; TODO: Implement completion for composite selectors. - (lexical-let ((files files)) - ;; What about using `files'?!? --Stef - (lambda (string pred action) - (cond - ;; "Tag" selectors. - ((string-match "\\`t:" string) - (complete-with-action action - (mapcar (lambda (tag) (concat "t:" tag)) - (vc-mtn-list-tags)) - string pred)) - ;; "Branch" selectors. - ((string-match "\\`b:" string) - (complete-with-action action - (mapcar (lambda (tag) (concat "b:" tag)) - (vc-mtn-list-branches)) - string pred)) - ;; "Head" selectors. Not sure how they differ from "branch" selectors. - ((string-match "\\`h:" string) - (complete-with-action action - (mapcar (lambda (tag) (concat "h:" tag)) - (vc-mtn-list-branches)) - string pred)) - ;; "ID" selectors. - ((string-match "\\`i:" string) - (complete-with-action action - (mapcar (lambda (tag) (concat "i:" tag)) - (vc-mtn-list-revision-ids - (substring string (match-end 0)))) - string pred)) - (t - (complete-with-action action - '("t:" "b:" "h:" "i:" - ;; Completion not implemented for these. - "a:" "c:" "d:" "e:" "l:") - string pred)))))) + ;; What about using `files'?!? --Stef + (lambda (string pred action) + (cond + ;; "Tag" selectors. + ((string-match "\\`t:" string) + (complete-with-action action + (mapcar (lambda (tag) (concat "t:" tag)) + (vc-mtn-list-tags)) + string pred)) + ;; "Branch" selectors. + ((string-match "\\`b:" string) + (complete-with-action action + (mapcar (lambda (tag) (concat "b:" tag)) + (vc-mtn-list-branches)) + string pred)) + ;; "Head" selectors. Not sure how they differ from "branch" selectors. + ((string-match "\\`h:" string) + (complete-with-action action + (mapcar (lambda (tag) (concat "h:" tag)) + (vc-mtn-list-branches)) + string pred)) + ;; "ID" selectors. + ((string-match "\\`i:" string) + (complete-with-action action + (mapcar (lambda (tag) (concat "i:" tag)) + (vc-mtn-list-revision-ids + (substring string (match-end 0)))) + string pred)) + (t + (complete-with-action action + '("t:" "b:" "h:" "i:" + ;; Completion not implemented for these. + "a:" "c:" "d:" "e:" "l:") + string pred))))) |