# HG changeset patch # User Stefan Monnier # Date 1208810946 0 # Node ID 34110d646fc843d4f6b1b3130c5018e59bb11845 # Parent 28a10b30dfc6b95a17f7428bf24762e27f2c39b0 (vc-bzr-complete-with-prefix): Remove. (vc-bzr-revision-completion-table): Use completion-table-with-context instead. diff -r 28a10b30dfc6 -r 34110d646fc8 lisp/ChangeLog --- a/lisp/ChangeLog Mon Apr 21 20:48:10 2008 +0000 +++ b/lisp/ChangeLog Mon Apr 21 20:49:06 2008 +0000 @@ -1,5 +1,9 @@ 2008-04-21 Stefan Monnier + * vc-bzr.el (vc-bzr-complete-with-prefix): Remove. + (vc-bzr-revision-completion-table): Use completion-table-with-context + instead. + * simple.el (choose-completion-string): Use minibuffer-completion-table. 2008-04-21 Chong Yidong diff -r 28a10b30dfc6 -r 34110d646fc8 lisp/vc-bzr.el --- a/lisp/vc-bzr.el Mon Apr 21 20:48:10 2008 +0000 +++ b/lisp/vc-bzr.el Mon Apr 21 20:49:06 2008 +0000 @@ -706,12 +706,6 @@ ;;; Revision completion -(defun vc-bzr-complete-with-prefix (prefix action table string pred) - (let ((comp (complete-with-action action table string pred))) - (if (stringp comp) - (concat prefix comp) - comp))) - (defun vc-bzr-revision-completion-table (files) (lexical-let ((files files)) ;; What about using `files'?!? --Stef @@ -719,19 +713,20 @@ (cond ((string-match "\\`\\(ancestor\\|branch\\|\\(revno:\\)?[-0-9]+:\\):" string) - (vc-bzr-complete-with-prefix (substring string 0 (match-end 0)) - action - 'read-file-name-internal - (substring string (match-end 0)) - ;; Dropping `pred'. Maybe we should just - ;; stash it in `read-file-name-predicate'? - nil)) + (completion-table-with-context (substring string 0 (match-end 0)) + 'read-file-name-internal + (substring string (match-end 0)) + ;; Dropping `pred'. Maybe we should + ;; just stash it in + ;; `read-file-name-predicate'? + nil + action)) ((string-match "\\`\\(before\\):" string) - (vc-bzr-complete-with-prefix (substring string 0 (match-end 0)) - action - (vc-bzr-revision-completion-table files) - (substring string (match-end 0)) - pred)) + (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))) @@ -744,7 +739,7 @@ (goto-char (point-min)) (while (re-search-forward "^\\(.*[^ \n]\\) +[^ \n]*$" nil t) (push (match-string-no-properties 1) table))) - (vc-bzr-complete-with-prefix prefix action table tag pred))) + (completion-table-with-context prefix table tag pred action))) ((string-match "\\`\\(revid\\):" string) ;; FIXME: How can I get a list of revision ids?