diff options
| author | Luc Teirlinck | 2003-12-23 23:42:28 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2003-12-23 23:42:28 +0000 |
| commit | 1b368e312002e1863afa0c6fcf7075aea586eabd (patch) | |
| tree | 0e4f73c3852989dfbadb08e384d12566e60a9032 | |
| parent | 99b994179c14df2f40973381d914016af4aa3c97 (diff) | |
| download | emacs-1b368e312002e1863afa0c6fcf7075aea586eabd.tar.gz emacs-1b368e312002e1863afa0c6fcf7075aea586eabd.zip | |
(PC-is-complete-p): delete.
(PC-do-completion): Replace all calls to `PC-is-complete-p' with calls
to `test-completion'.
| -rw-r--r-- | lisp/complete.el | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/lisp/complete.el b/lisp/complete.el index 130d0ecb31f..d3c5de459d5 100644 --- a/lisp/complete.el +++ b/lisp/complete.el | |||
| @@ -368,7 +368,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") | |||
| 368 | 368 | ||
| 369 | ;; Check if buffer contents can already be considered complete | 369 | ;; Check if buffer contents can already be considered complete |
| 370 | (if (and (eq mode 'exit) | 370 | (if (and (eq mode 'exit) |
| 371 | (PC-is-complete-p str table pred)) | 371 | (test-completion str table pred)) |
| 372 | 'complete | 372 | 'complete |
| 373 | 373 | ||
| 374 | ;; Do substitutions in directory names | 374 | ;; Do substitutions in directory names |
| @@ -641,7 +641,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") | |||
| 641 | (if improved | 641 | (if improved |
| 642 | 642 | ||
| 643 | ;; We changed it... would it be complete without the space? | 643 | ;; We changed it... would it be complete without the space? |
| 644 | (if (PC-is-complete-p (buffer-substring 1 (1- end)) | 644 | (if (test-completion (buffer-substring 1 (1- end)) |
| 645 | table pred) | 645 | table pred) |
| 646 | (delete-region (1- end) end))) | 646 | (delete-region (1- end) end))) |
| 647 | 647 | ||
| @@ -649,7 +649,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") | |||
| 649 | 649 | ||
| 650 | ;; We changed it... enough to be complete? | 650 | ;; We changed it... enough to be complete? |
| 651 | (and (eq mode 'exit) | 651 | (and (eq mode 'exit) |
| 652 | (PC-is-complete-p (field-string) table pred)) | 652 | (test-completion (field-string) table pred)) |
| 653 | 653 | ||
| 654 | ;; If totally ambiguous, display a list of completions | 654 | ;; If totally ambiguous, display a list of completions |
| 655 | (if (or (eq completion-auto-help t) | 655 | (if (or (eq completion-auto-help t) |
| @@ -680,20 +680,6 @@ of `minibuffer-completion-table' and the minibuffer contents.") | |||
| 680 | (car poss))))) | 680 | (car poss))))) |
| 681 | t))))) | 681 | t))))) |
| 682 | 682 | ||
| 683 | |||
| 684 | (defun PC-is-complete-p (str table pred) | ||
| 685 | (let ((res (if (listp table) | ||
| 686 | (assoc str table) | ||
| 687 | (if (vectorp table) | ||
| 688 | (or (equal str "nil") ; heh, heh, heh | ||
| 689 | (intern-soft str table)) | ||
| 690 | (funcall table str pred 'lambda))))) | ||
| 691 | (and res | ||
| 692 | (or (not pred) | ||
| 693 | (and (not (listp table)) (not (vectorp table))) | ||
| 694 | (funcall pred res)) | ||
| 695 | res))) | ||
| 696 | |||
| 697 | (defun PC-chop-word (new old) | 683 | (defun PC-chop-word (new old) |
| 698 | (let ((i -1) | 684 | (let ((i -1) |
| 699 | (j -1)) | 685 | (j -1)) |