Commit 0d42eb3e authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* 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 ((λ ...) ...).
parent f08ae1c9
2012-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
* vc/vc-mtn.el:
* vc/vc-hg.el:
* vc/vc-git.el:
* vc/vc-dir.el:
* vc/vc-cvs.el:
* vc/vc-bzr.el:
* vc/vc-arch.el:
* vc/vc.el: Replace lexical-let by lexical-binding.
* minibuffer.el (lazy-completion-table): Avoid ((λ ...) ...).
* emacs-lisp/cl-macs.el (lexical-let): Fix use in lexical-binding.
* emacs-lisp/cconv.el (cconv-analyse-form): Warn use of ((λ ...) ...).
2012-04-26 Chong Yidong <cyd@gnu.org>
* vc/ediff-wind.el (ediff-setup-windows-default): New function.
......
......@@ -639,7 +639,9 @@ and updates the data stored in ENV."
(cconv-analyse-form (cadr forms) env)
(setq forms (cddr forms))))
(`((lambda . ,_) . ,_) ; first element is lambda expression
(`((lambda . ,_) . ,_) ; First element is lambda expression.
(byte-compile-log-warning
"Use of deprecated ((lambda ...) ...) form" t :warning)
(dolist (exp `((function ,(car form)) . ,(cdr form)))
(cconv-analyse-form exp env)))
......
......@@ -286,7 +286,7 @@ This also does some trivial optimizations to make the form prettier.
;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist
;;;;;; do* do loop return-from return block etypecase typecase ecase
;;;;;; case load-time-value eval-when destructuring-bind function*
;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "91b45885535a73dd8015973cb8c988e1")
;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "abb2e33c6f61539d69ddbe7c4046261b")
;;; Generated autoloads from cl-macs.el
(autoload 'gensym "cl-macs" "\
......
......@@ -1483,18 +1483,24 @@ lexical closures as in Common Lisp.
(cons 'progn body)
(nconc (mapcar (function (lambda (x)
(list (symbol-name (car x))
(list 'symbol-value (caddr x))
(list 'symbol-value (caddr x))
t))) vars)
(list '(defun . cl-defun-expander))
cl-macro-environment))))
(if (not (get (car (last cl-closure-vars)) 'used))
(list 'let (mapcar (function (lambda (x)
(list (caddr x) (cadr x)))) vars)
(sublis (mapcar (function (lambda (x)
(cons (caddr x)
(list 'quote (caddr x)))))
vars)
ebody))
;; Turn (let ((foo (gensym))) (set foo <val>) ...(symbol-value foo)...)
;; into (let ((foo <val>)) ...(symbol-value 'foo)...).
;; This is good because it's more efficient but it only works with
;; dynamic scoping, since with lexical scoping we'd need
;; (let ((foo <val>)) ...foo...).
`(progn
,@(mapcar (lambda (x) `(defvar ,(caddr x))) vars)
(let ,(mapcar (lambda (x) (list (caddr x) (cadr x))) vars)
,(sublis (mapcar (lambda (x)
(cons (caddr x)
(list 'quote (caddr x))))
vars)
ebody)))
(list 'let (mapcar (function (lambda (x)
(list (caddr x)
(list 'make-symbol
......
......@@ -3642,7 +3642,8 @@ and `file-local-variables-alist', without applying them."
(when (and enable-local-variables
(not (file-remote-p (or (buffer-file-name) default-directory))))
;; Find the variables file.
(let ((variables-file (dir-locals-find-file (or (buffer-file-name) default-directory)))
(let ((variables-file (dir-locals-find-file
(or (buffer-file-name) default-directory)))
(class nil)
(dir-name nil))
(cond
......
......@@ -199,7 +199,7 @@ You should give VAR a non-nil `risky-local-variable' property."
`(completion-table-dynamic
(lambda (,str)
(when (functionp ,var)
(setq ,var (,fun)))
(setq ,var (funcall #',fun)))
,var))))
(defun completion-table-case-fold (table &optional dont-fold)
......
;;; 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-2012 Free Software Foundation, Inc.
......@@ -59,7 +59,7 @@
;;; 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
......@@ -227,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)))
......@@ -258,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)
......@@ -508,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.
......@@ -547,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)
......@@ -572,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)))
......
;;; vc-bzr.el --- VC backend for the bzr revision control system
;;; vc-bzr.el --- VC backend for the bzr revision control system -*- lexical-binding: t -*-
;; Copyright (C) 2006-2012 Free Software Foundation, Inc.
......@@ -41,7 +41,7 @@
;;; Properties of the backend
(defun vc-bzr-revision-granularity () 'repository)
(defun vc-bzr-checkout-model (files) 'implicit)
(defun vc-bzr-checkout-model (_files) 'implicit)
;;; Code:
......@@ -208,9 +208,9 @@ in the repository root directory of FILE."
;; + working ( = packed_stat )
;; parent = common ( as above ) + history ( = rev_id )
;; kinds = (r)elocated, (a)bsent, (d)irectory, (f)ile, (l)ink
(lexical-let ((root (vc-bzr-root file)))
(let ((root (vc-bzr-root file)))
(when root ; Short cut.
(lexical-let ((dirstate (expand-file-name vc-bzr-admin-dirstate root)))
(let ((dirstate (expand-file-name vc-bzr-admin-dirstate root)))
(condition-case nil
(with-temp-buffer
(insert-file-contents dirstate)
......@@ -303,9 +303,8 @@ in the repository root directory of FILE."
(defun vc-bzr-file-name-relative (filename)
"Return file name FILENAME stripped of the initial Bzr repository path."
(lexical-let*
((filename* (expand-file-name filename))
(rootdir (vc-bzr-root filename*)))
(let* ((filename* (expand-file-name filename))
(rootdir (vc-bzr-root filename*)))
(when rootdir
(file-relative-name filename* rootdir))))
......@@ -412,9 +411,8 @@ in the branch repository (or whose status not be determined)."
(with-temp-buffer
;; This is with-demoted-errors without the condition-case-unless-debug
;; annoyance, which makes it fail during ert testing.
(let (err)
(condition-case err (vc-bzr-command "status" t 0 file)
(error (message "Error: %S" err) nil)))
(condition-case err (vc-bzr-command "status" t 0 file)
(error (message "Error: %S" err) nil))
(let ((status 'unchanged))
;; the only secure status indication in `bzr status' output
;; is a couple of lines following the pattern::
......@@ -433,7 +431,7 @@ in the branch repository (or whose status not be determined)."
(if (file-directory-p file) "/?" "\\*?")
"[ \t\n]*$")
nil t)
(lexical-let ((statusword (match-string 1)))
(let ((statusword (match-string 1)))
;; Erase the status text that matched.
(delete-region (match-beginning 0) (match-end 0))
(setq status
......@@ -452,7 +450,7 @@ in the branch repository (or whose status not be determined)."
(unless (eobp) (buffer-substring (point) (point-max))))))))
(defun vc-bzr-state (file)
(lexical-let ((result (vc-bzr-status file)))
(let ((result (vc-bzr-status file)))
(when (consp result)
(let ((warnings (cdr result)))
(when warnings
......@@ -504,16 +502,15 @@ in the branch repository (or whose status not be determined)."
(defun vc-bzr-working-revision (file)
;; Together with the code in vc-state-heuristic, this makes it possible
;; to get the initial VC state of a Bzr file even if Bzr is not installed.
(lexical-let*
((rootdir (vc-bzr-root file))
(branch-format-file (expand-file-name vc-bzr-admin-branch-format-file
rootdir))
(revhistory-file (expand-file-name vc-bzr-admin-revhistory rootdir))
(lastrev-file (expand-file-name vc-bzr-admin-lastrev rootdir)))
(let* ((rootdir (vc-bzr-root file))
(branch-format-file (expand-file-name vc-bzr-admin-branch-format-file
rootdir))
(revhistory-file (expand-file-name vc-bzr-admin-revhistory rootdir))
(lastrev-file (expand-file-name vc-bzr-admin-lastrev rootdir)))
;; This looks at internal files to avoid forking a bzr process.
;; May break if they change their format.
(if (and (file-exists-p branch-format-file)
;; For lightweight checkouts (obtained with bzr checkout --lightweight)
;; For lightweight checkouts (obtained with bzr co --lightweight)
;; the branch-format-file does not contain the revision
;; information, we need to look up the branch-format-file
;; in the place where the lightweight checkout comes
......@@ -532,17 +529,21 @@ in the branch repository (or whose status not be determined)."
(when (re-search-forward "file://\\(.+\\)" nil t)
(let ((l-c-parent-dir (match-string 1)))
(when (and (memq system-type '(ms-dos windows-nt))
(string-match-p "^/[[:alpha:]]:" l-c-parent-dir))
;;; The non-Windows code takes a shortcut by using the host/path
;;; separator slash as the start of the absolute path. That
;;; does not work on Windows, so we must remove it (bug#5345)
(string-match-p "^/[[:alpha:]]:"
l-c-parent-dir))
;;; The non-Windows code takes a shortcut by using
;;; the host/path separator slash as the start of
;;; the absolute path. That does not work on
;;; Windows, so we must remove it (bug#5345)
(setq l-c-parent-dir (substring l-c-parent-dir 1)))
(setq branch-format-file
(expand-file-name vc-bzr-admin-branch-format-file
l-c-parent-dir))
(setq lastrev-file
(expand-file-name vc-bzr-admin-lastrev l-c-parent-dir))
;; FIXME: maybe it's overkill to check if both these files exist.
(expand-file-name vc-bzr-admin-lastrev
l-c-parent-dir))
;; FIXME: maybe it's overkill to check if both these
;; files exist.
(and (file-exists-p branch-format-file)
(file-exists-p lastrev-file)))))
t)))
......@@ -564,11 +565,10 @@ in the branch repository (or whose status not be determined)."
(when (re-search-forward "[0-9]+" nil t)
(buffer-substring (match-beginning 0) (match-end 0))))))
;; fallback to calling "bzr revno"
(lexical-let*
((result (vc-bzr-command-discarding-stderr
vc-bzr-program "revno" (file-relative-name file)))
(exitcode (car result))
(output (cdr result)))
(let* ((result (vc-bzr-command-discarding-stderr
vc-bzr-program "revno" (file-relative-name file)))
(exitcode (car result))
(output (cdr result)))
(cond
((eq exitcode 0) (substring output 0 -1))
(t nil))))))
......@@ -577,21 +577,21 @@ in the branch repository (or whose status not be determined)."
"Create a new Bzr repository."
(vc-bzr-command "init" nil 0 nil))
(defun vc-bzr-init-revision (&optional file)
(defun vc-bzr-init-revision (&optional _file)
"Always return nil, as Bzr cannot register explicit versions."
nil)
(defun vc-bzr-previous-revision (file rev)
(defun vc-bzr-previous-revision (_file rev)
(if (string-match "\\`[0-9]+\\'" rev)
(number-to-string (1- (string-to-number rev)))
(concat "before:" rev)))
(defun vc-bzr-next-revision (file rev)
(defun vc-bzr-next-revision (_file rev)
(if (string-match "\\`[0-9]+\\'" rev)
(number-to-string (1+ (string-to-number rev)))
(error "Don't know how to compute the next revision of %s" rev)))
(defun vc-bzr-register (files &optional rev comment)
(defun vc-bzr-register (files &optional rev _comment)
"Register FILES under bzr.
Signal an error unless REV is nil.
COMMENT is ignored."
......@@ -640,7 +640,7 @@ REV non-nil gets an error."
(vc-bzr-command "cat" t 0 file "-r" rev)
(vc-bzr-command "cat" t 0 file))))
(defun vc-bzr-checkout (file &optional editable rev)
(defun vc-bzr-checkout (_file &optional _editable rev)
(if rev (error "Operation not supported")
;; Else, there's nothing to do.
nil))
......@@ -791,7 +791,7 @@ Each line is tagged with the revision number, which has a `help-echo'
property containing author and date information."
(apply #'vc-bzr-command "annotate" buffer 'async file "--long" "--all"
(if revision (list "-r" revision)))
(lexical-let ((table (make-hash-table :test 'equal)))
(let ((table (make-hash-table :test 'equal)))
(set-process-filter
(get-buffer-process buffer)
(lambda (proc string)
......@@ -956,7 +956,7 @@ stream. Standard error output is discarded."
;; frob the results accordingly.
(file-relative-name ,dir (vc-bzr-root ,dir)))))
(defun vc-bzr-dir-status-files (dir files default-state update-function)
(defun vc-bzr-dir-status-files (dir files _default-state update-function)
"Return a list of conses (file . state) for DIR."
(apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files)
(vc-exec-after
......@@ -1193,74 +1193,73 @@ stream. Standard error output is discarded."
"revno" "submit" "tag")))
(defun vc-bzr-revision-completion-table (files)
(lexical-let ((files files))
;; What about using `files'?!? --Stef
(lambda (string pred action)
(cond
((string-match "\\`\\(ancestor\\|branch\\|\\(revno:\\)?[-0-9]+:\\):"
string)
(completion-table-with-context (substring string 0 (match-end 0))
(apply-partially
'completion-table-with-predicate
'completion-file-name-table
'file-directory-p t)
(substring string (match-end 0))
pred
action))
((string-match "\\`\\(before\\):" string)
(completion-table-with-context (substring string 0 (match-end 0))
(vc-bzr-revision-completion-table files)
(substring string (match-end 0))
pred
action))
((string-match "\\`\\(tag\\):" string)
(let ((prefix (substring string 0 (match-end 0)))
(tag (substring string (match-end 0)))
(table nil)
process-file-side-effects)
(with-temp-buffer
;; "bzr-1.2 tags" is much faster with --show-ids.
(process-file vc-bzr-program nil '(t) nil "tags" "--show-ids")
;; The output is ambiguous, unless we assume that revids do not
;; contain spaces.
(goto-char (point-min))
(while (re-search-forward "^\\(.*[^ \n]\\) +[^ \n]*$" nil t)
(push (match-string-no-properties 1) table)))
(completion-table-with-context prefix table tag pred action)))
((string-match "\\`annotate:" string)
(completion-table-with-context
(substring string 0 (match-end 0))
(apply-partially #'completion-table-with-terminator '(":" . "\\`a\\`")
#'completion-file-name-table)
(substring string (match-end 0)) pred action))
((string-match "\\`date:" string)
(completion-table-with-context
(substring string 0 (match-end 0))
'("yesterday" "today" "tomorrow")
(substring string (match-end 0)) pred action))
((string-match "\\`\\([a-z]+\\):" string)
;; no actual completion for the remaining keywords.
(completion-table-with-context (substring string 0 (match-end 0))
(if (member (match-string 1 string)
vc-bzr-revision-keywords)
;; If it's a valid keyword,
;; use a non-empty table to
;; indicate it.
'("") nil)
(substring string (match-end 0))
pred
action))
(t
;; Could use completion-table-with-terminator, except that it
;; currently doesn't work right w.r.t pcm and doesn't give
;; the *Completions* output we want.
(complete-with-action action (eval-when-compile
(mapcar (lambda (s) (concat s ":"))
vc-bzr-revision-keywords))
string pred))))))
;; What about using `files'?!? --Stef
(lambda (string pred action)
(cond
((string-match "\\`\\(ancestor\\|branch\\|\\(revno:\\)?[-0-9]+:\\):"
string)
(completion-table-with-context (substring string 0 (match-end 0))
(apply-partially
'completion-table-with-predicate
'completion-file-name-table
'file-directory-p t)
(substring string (match-end 0))
pred
action))
((string-match "\\`\\(before\\):" string)
(completion-table-with-context (substring string 0 (match-end 0))
(vc-bzr-revision-completion-table files)
(substring string (match-end 0))
pred
action))
((string-match "\\`\\(tag\\):" string)
(let ((prefix (substring string 0 (match-end 0)))
(tag (substring string (match-end 0)))
(table nil)
process-file-side-effects)
(with-temp-buffer
;; "bzr-1.2 tags" is much faster with --show-ids.
(process-file vc-bzr-program nil '(t) nil "tags" "--show-ids")
;; The output is ambiguous, unless we assume that revids do not
;; contain spaces.
(goto-char (point-min))
(while (re-search-forward "^\\(.*[^ \n]\\) +[^ \n]*$" nil t)
(push (match-string-no-properties 1) table)))
(completion-table-with-context prefix table tag pred action)))
((string-match "\\`annotate:" string)
(completion-table-with-context
(substring string 0 (match-end 0))
(apply-partially #'completion-table-with-terminator '(":" . "\\`a\\`")
#'completion-file-name-table)
(substring string (match-end 0)) pred action))
((string-match "\\`date:" string)
(completion-table-with-context
(substring string 0 (match-end 0))
'("yesterday" "today" "tomorrow")
(substring string (match-end 0)) pred action))
((string-match "\\`\\([a-z]+\\):" string)
;; no actual completion for the remaining keywords.
(completion-table-with-context (substring string 0 (match-end 0))
(if (member (match-string 1 string)
vc-bzr-revision-keywords)
;; If it's a valid keyword,
;; use a non-empty table to
;; indicate it.
'("") nil)
(substring string (match-end 0))
pred
action))
(t
;; Could use completion-table-with-terminator, except that it
;; currently doesn't work right w.r.t pcm and doesn't give
;; the *Completions* output we want.
(complete-with-action action (eval-when-compile
(mapcar (lambda (s) (concat s ":"))
vc-bzr-revision-keywords))
string pred)))))
(provide 'vc-bzr)
......
;;; vc-cvs.el --- non-resident support for CVS version-control
;;; vc-cvs.el --- non-resident support for CVS version-control -*- lexical-binding: t -*-
;; Copyright (C) 1995, 1998-2012 Free Software Foundation, Inc.
......@@ -280,7 +280,7 @@ committed and support display of sticky tags."
;;; State-changing functions
;;;
(defun vc-cvs-register (files &optional rev comment)
(defun vc-cvs-register (files &optional _rev comment)
"Register FILES into the CVS version-control system.
COMMENT can be used to provide an initial description of FILES.
Passes either `vc-cvs-register-switches' or `vc-register-switches'
......@@ -502,7 +502,7 @@ Will fail unless you have administrative privileges on the repo."
(declare-function vc-rcs-print-log-cleanup "vc-rcs" ())
(defun vc-cvs-print-log (files buffer &optional shortlog start-revision-ignored limit)
(defun vc-cvs-print-log (files buffer &optional _shortlog _start-revision limit)
"Get change logs associated with FILES."
(require 'vc-rcs)
;; It's just the catenation of the individual logs.
......@@ -1006,7 +1006,7 @@ state."
(vc-exec-after
`(vc-cvs-after-dir-status (quote ,update-function))))))
(defun vc-cvs-dir-status-files (dir files default-state update-function)
(defun vc-cvs-dir-status-files (dir files _default-state update-function)
"Create a list of conses (file . state) for DIR."
(apply 'vc-cvs-command (current-buffer) 'async dir "-f" "status" files)
(vc-exec-after
......@@ -1021,7 +1021,7 @@ state."
(buffer-substring (point) (point-max)))
(file-error nil)))
(defun vc-cvs-dir-extra-headers (dir)
(defun vc-cvs-dir-extra-headers (_dir)
"Extract and represent per-directory properties of a CVS working copy."
(let ((repo
(condition-case nil
......@@ -1206,10 +1206,8 @@ is non-nil."
res)))
(defun vc-cvs-revision-completion-table (files)
(lexical-let ((files files)
table)
(setq table (lazy-completion-table
table (lambda () (vc-cvs-revision-table (car files)))))
(letrec ((table (lazy-completion-table
table (lambda () (vc-cvs-revision-table (car files))))))
table))
......
;;; vc-dir.el --- Directory status display under VC
;;; vc-dir.el --- Directory status display under VC -*- lexical-binding: t -*-
;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
......@@ -529,7 +529,7 @@ If a prefix argument is given, move by that many lines."
(defun vc-dir-mark-unmark (mark-unmark-function)
(if (use-region-p)
(let ((firstl (line-number-at-pos (region-beginning)))
(let (;; (firstl (line-number-at-pos (region-beginning)))
(lastl (line-number-at-pos (region-end))))
(save-excursion
(goto-char (region-beginning))
......@@ -546,7 +546,7 @@ If a prefix argument is given, move by that many lines."
;; Non-nil iff a parent directory of arg is marked.
;; Return value, if non-nil is the `ewoc-data' for the marked parent.
(let* ((argdir (vc-dir-node-directory arg))
(arglen (length argdir))
;; (arglen (length argdir))
(crt arg)
(found nil))
;; Go through the predecessors, checking if any directory that is
......@@ -814,7 +814,7 @@ child files."
;; FIXME: use vc-dir-child-files-and-states here instead of duplicating it.
(if (vc-dir-fileinfo->directory crt-data)
(let* ((dir (vc-dir-fileinfo->directory crt-data))
(dirlen (length dir))
;; (dirlen (length dir))
data)
(while
(and (setq crt (ewoc-next vc-ewoc crt))
......@@ -842,7 +842,7 @@ If it is a file, return the corresponding cons for the file itself."
result)
(if (vc-dir-fileinfo->directory crt-data)
(let* ((dir (vc-dir-fileinfo->directory crt-data))
(dirlen (length dir))
;; (dirlen (length dir))
data)
(while
(and (setq crt (ewoc-next vc-ewoc crt))
......@@ -861,7 +861,7 @@ If it is a file, return the corresponding cons for the file itself."
(defun vc-dir-recompute-file-state (fname def-dir)
(let* ((file-short (file-relative-name fname def-dir))
(remove-me-when-CVS-works
(_remove-me-when-CVS-works
(when (eq vc-dir-backend 'CVS)
;; FIXME: Warning: UGLY HACK. The CVS backend caches the state
;; info, this forces the backend to update it.
......@@ -875,15 +875,14 @@ If it is a file, return the corresponding cons for the file itself."
;; Give a DIRNAME string return the list of all child files shown in
;; the current *vc-dir* buffer.
(let ((crt (ewoc-nth vc-ewoc 0))
children
dname)
children)
;; Find DIR
(while (and crt (not (string-prefix-p
dirname (vc-dir-node-directory crt))))
(setq crt (ewoc-next vc-ewoc crt)))
(while (and crt (string-prefix-p
dirname
(setq dname (vc-dir-node-directory crt))))
(vc-dir-node-directory crt)))
(let ((data (ewoc-data crt)))
(unless (vc-dir-fileinfo->directory data)
(push (expand-file-name (vc-dir-fileinfo->name data)) children)))
......@@ -1014,7 +1013,7 @@ specific headers."
(unless (buffer-live-p vc-dir-process-buffer)
(setq vc-dir-process-buffer
(generate-new-buffer (format " *VC-%s* tmp status" backend))))
(lexical-let ((buffer (current-buffer)))
(let ((buffer (current-buffer)))
(with-current-buffer vc-dir-process-buffer
(setq default-directory def-dir)
(erase-buffer)
......@@ -1045,7 +1044,7 @@ specific headers."
(not (vc-dir-fileinfo->needs-update info))))))))))))
(defun vc-dir-revert-buffer-function (&optional ignore-auto noconfirm)
(defun vc-dir-revert-buffer-function (&optional _ignore-auto _noconfirm)
(vc-dir-refresh))