]> git.eshelyaron.com Git - emacs.git/commitdiff
(PC-is-complete-p): delete.
authorLuc Teirlinck <teirllm@auburn.edu>
Tue, 23 Dec 2003 23:42:28 +0000 (23:42 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Tue, 23 Dec 2003 23:42:28 +0000 (23:42 +0000)
(PC-do-completion): Replace all calls to `PC-is-complete-p' with calls
to `test-completion'.

lisp/complete.el

index 130d0ecb31f541062b00f165f569b3aa32244f32..d3c5de459d5458d9e315d27b0a4c3b4a9a2b511f 100644 (file)
@@ -368,7 +368,7 @@ of `minibuffer-completion-table' and the minibuffer contents.")
 
     ;; Check if buffer contents can already be considered complete
     (if (and (eq mode 'exit)
-            (PC-is-complete-p str table pred))
+            (test-completion str table pred))
        'complete
 
       ;; Do substitutions in directory names
@@ -641,7 +641,7 @@ of `minibuffer-completion-table' and the minibuffer contents.")
                (if improved
 
                    ;; We changed it... would it be complete without the space?
-                   (if (PC-is-complete-p (buffer-substring 1 (1- end))
+                   (if (test-completion (buffer-substring 1 (1- end))
                                          table pred)
                        (delete-region (1- end) end)))
 
@@ -649,7 +649,7 @@ of `minibuffer-completion-table' and the minibuffer contents.")
 
                  ;; We changed it... enough to be complete?
                  (and (eq mode 'exit)
-                      (PC-is-complete-p (field-string) table pred))
+                      (test-completion (field-string) table pred))
 
                ;; If totally ambiguous, display a list of completions
                (if (or (eq completion-auto-help t)
@@ -680,20 +680,6 @@ of `minibuffer-completion-table' and the minibuffer contents.")
                            (car poss)))))
        t)))))
 
-
-(defun PC-is-complete-p (str table pred)
-  (let ((res (if (listp table)
-                (assoc str table)
-              (if (vectorp table)
-                  (or (equal str "nil")   ; heh, heh, heh
-                      (intern-soft str table))
-                (funcall table str pred 'lambda)))))
-    (and res
-        (or (not pred)
-            (and (not (listp table)) (not (vectorp table)))
-            (funcall pred res))
-        res)))
-
 (defun PC-chop-word (new old)
   (let ((i -1)
        (j -1))