Commit ec50e665 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(vc-bzr-complete-with-prefix): Remove.

(vc-bzr-revision-completion-table): Use completion-table-with-context instead.
parent d23734dc
2008-04-21 Stefan Monnier <monnier@iro.umontreal.ca> 2008-04-21 Stefan Monnier <monnier@iro.umontreal.ca>
   
* 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. * simple.el (choose-completion-string): Use minibuffer-completion-table.
   
2008-04-21 Chong Yidong <cyd@stupidchicken.com> 2008-04-21 Chong Yidong <cyd@stupidchicken.com>
......
...@@ -706,12 +706,6 @@ Optional argument LOCALP is always ignored." ...@@ -706,12 +706,6 @@ Optional argument LOCALP is always ignored."
;;; Revision completion ;;; 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) (defun vc-bzr-revision-completion-table (files)
(lexical-let ((files files)) (lexical-let ((files files))
;; What about using `files'?!? --Stef ;; What about using `files'?!? --Stef
...@@ -719,19 +713,20 @@ Optional argument LOCALP is always ignored." ...@@ -719,19 +713,20 @@ Optional argument LOCALP is always ignored."
(cond (cond
((string-match "\\`\\(ancestor\\|branch\\|\\(revno:\\)?[-0-9]+:\\):" ((string-match "\\`\\(ancestor\\|branch\\|\\(revno:\\)?[-0-9]+:\\):"
string) string)
(vc-bzr-complete-with-prefix (substring string 0 (match-end 0)) (completion-table-with-context (substring string 0 (match-end 0))
action 'read-file-name-internal
'read-file-name-internal (substring string (match-end 0))
(substring string (match-end 0)) ;; Dropping `pred'. Maybe we should
;; Dropping `pred'. Maybe we should just ;; just stash it in
;; stash it in `read-file-name-predicate'? ;; `read-file-name-predicate'?
nil)) nil
action))
((string-match "\\`\\(before\\):" string) ((string-match "\\`\\(before\\):" string)
(vc-bzr-complete-with-prefix (substring string 0 (match-end 0)) (completion-table-with-context (substring string 0 (match-end 0))
action (vc-bzr-revision-completion-table files)
(vc-bzr-revision-completion-table files) (substring string (match-end 0))
(substring string (match-end 0)) pred
pred)) action))
((string-match "\\`\\(tag\\):" string) ((string-match "\\`\\(tag\\):" string)
(let ((prefix (substring string 0 (match-end 0))) (let ((prefix (substring string 0 (match-end 0)))
(tag (substring string (match-end 0))) (tag (substring string (match-end 0)))
...@@ -744,7 +739,7 @@ Optional argument LOCALP is always ignored." ...@@ -744,7 +739,7 @@ Optional argument LOCALP is always ignored."
(goto-char (point-min)) (goto-char (point-min))
(while (re-search-forward "^\\(.*[^ \n]\\) +[^ \n]*$" nil t) (while (re-search-forward "^\\(.*[^ \n]\\) +[^ \n]*$" nil t)
(push (match-string-no-properties 1) table))) (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) ((string-match "\\`\\(revid\\):" string)
;; FIXME: How can I get a list of revision ids? ;; FIXME: How can I get a list of revision ids?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment