diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-03-06 05:12:07 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-03-06 05:12:07 +0000 |
commit | 249f7eebfd96d9c09cdedcd234d6702090f582d4 (patch) | |
tree | c5d3b3de52dfbe1eff2f83280c0c4ee8de0e988a /lisp/complete.el | |
parent | 0e7ff58fab9b7adac71acfa9cefb4453613aaf0c (diff) | |
download | emacs-249f7eebfd96d9c09cdedcd234d6702090f582d4.tar.gz |
(PC-completion-as-file-name-predicate):
Replace PC-do-completion-filename-completers.
(PC-do-completion): Use that.
Diffstat (limited to 'lisp/complete.el')
-rw-r--r-- | lisp/complete.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/complete.el b/lisp/complete.el index a41e29d134c..65d2fe07ce3 100644 --- a/lisp/complete.el +++ b/lisp/complete.el @@ -257,17 +257,21 @@ See `PC-complete' for details." (defvar PC-ndelims-regex nil) (defvar PC-delims-list nil) -(defvar PC-do-completion-filename-completers - '(read-file-name-internal read-directory-name-internal) - "Completion functions that do file-name style completion. -The elements are compared with the value of `minibuffer-completion-table'.") +(defvar PC-completion-as-file-name-predicate + (function + (lambda () + (memq minibuffer-completion-table + '(read-file-name-internal read-directory-name-internal)))) + "A function testing whether a minibuffer completion now will work filename-style. +The function takes no arguments, and typically looks at the value +of `minibuffer-completion-table' and the minibuffer contents.") (defun PC-do-completion (&optional mode beg end) (or beg (setq beg (point-min))) (or end (setq end (point-max))) (let* ((table minibuffer-completion-table) (pred minibuffer-completion-predicate) - (filename (memq table PC-do-completion-filename-completers)) + (filename (funcall PC-completion-as-file-name-predicate)) (dirname nil) dirlength (str (buffer-substring beg end)) |