From: Stefan Monnier Date: Sat, 20 Oct 2007 01:11:18 +0000 (+0000) Subject: (vc-hg-revision-completion-table, vc-hg-revision-table): Make it work when the X-Git-Tag: emacs-pretest-23.0.90~10208 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=87d1a48e20b4121c467548984f5a76457d09cf62;p=emacs.git (vc-hg-revision-completion-table, vc-hg-revision-table): Make it work when the arg is a list of files. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eb6859e2fe7..eeec0e278ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,6 @@ 2007-10-20 Stefan Monnier + * vc-hg.el (vc-hg-revision-completion-table, vc-hg-revision-table): * vc-git.el (vc-git-revision-completion-table, vc-git-revision-table): * vc-cvs.el (vc-cvs-revision-completion-table): * vc-arch.el (vc-arch-revision-completion-table): Make it work when the diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 2e90d06fbc5..8e9cf15688b 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -294,19 +294,19 @@ (list "-r" oldvers)) (list "")))))) -(defun vc-hg-revision-table (file) - (let ((default-directory (file-name-directory file))) +(defun vc-hg-revision-table (files) + (let ((default-directory (file-name-directory (car files)))) (with-temp-buffer (vc-hg-command t nil file "log" "--template" "{rev} ") (split-string (buffer-substring-no-properties (point-min) (point-max)))))) ;; Modelled after the similar function in vc-cvs.el -(defun vc-hg-revision-completion-table (file) - (lexical-let ((file file) +(defun vc-hg-revision-completion-table (files) + (lexical-let ((files files) table) (setq table (lazy-completion-table - table (lambda () (vc-hg-revision-table file)))) + table (lambda () (vc-hg-revision-table files)))) table)) (defun vc-hg-diff-tree (file &optional oldvers newvers buffer)