]> code.delx.au - gnu-emacs/commitdiff
(vc-arch-complete): Remove.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 10 Jul 2007 19:55:12 +0000 (19:55 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 10 Jul 2007 19:55:12 +0000 (19:55 +0000)
(vc-arch-revision-completion-table): Use complete-with-action.

lisp/ChangeLog
lisp/vc-arch.el

index 2c0e79bb75f115045f8e87d603e1a64746644a82..2123e07d76629c15cc9ded2ee19fa628ed8a8bbe 100644 (file)
@@ -1,3 +1,12 @@
+2007-07-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * vc-arch.el (vc-arch-complete): Remove.
+       (vc-arch-revision-completion-table): Use complete-with-action.
+
+       * subr.el (condition-case-no-debug, with-demoted-errors): New macros.
+       (complete-with-action): New function.
+       (dynamic-completion-table): Use it.
+
 2007-07-10  Michael Albinus  <michael.albinus@gmx.de>
 
        * comint.el (make-comint, make-comint-in-buffer)
index e4c13d3039a9b99034ba23c23044bc8611cd77ae..c6aaa6c8c0b2592e9bc2af0c302094cb1a846ca3 100644 (file)
@@ -424,13 +424,6 @@ Return non-nil if FILE is unchanged."
 
 ;;; Completion of versions and revisions.
 
-(defun vc-arch-complete (table string pred action)
-  (assert (not (functionp table)))
-  (cond
-   ((null action) (try-completion string table pred))
-   ((eq action t) (all-completions string table pred))
-   (t (test-completion string table pred))))
-
 (defun vc-arch--version-completion-table (root string)
   (delq nil
        (mapcar
@@ -450,10 +443,9 @@ Return non-nil if FILE is unchanged."
   (lexical-let ((file file))
     (lambda (string pred action)
       ;; FIXME: complete revision patches as well.
-      (let ((root (expand-file-name "{arch}" (vc-arch-root file))))
-       (vc-arch-complete
-        (vc-arch--version-completion-table root string)
-        string pred action)))))
+      (let* ((root (expand-file-name "{arch}" (vc-arch-root file)))
+             (table (vc-arch--version-completion-table root string)))
+       (complete-with-action action table string pred)))))
 
 ;;; Trimming revision libraries.