1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-28 10:56:36 +00:00

(PC-completion-as-file-name-predicate):

Replace PC-do-completion-filename-completers.
(PC-do-completion): Use that.
This commit is contained in:
Richard M. Stallman 1996-03-06 05:12:07 +00:00
parent 0e7ff58fab
commit 249f7eebfd

View File

@ -257,17 +257,21 @@ See `PC-complete' for details."
(defvar PC-ndelims-regex nil) (defvar PC-ndelims-regex nil)
(defvar PC-delims-list nil) (defvar PC-delims-list nil)
(defvar PC-do-completion-filename-completers (defvar PC-completion-as-file-name-predicate
'(read-file-name-internal read-directory-name-internal) (function
"Completion functions that do file-name style completion. (lambda ()
The elements are compared with the value of `minibuffer-completion-table'.") (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) (defun PC-do-completion (&optional mode beg end)
(or beg (setq beg (point-min))) (or beg (setq beg (point-min)))
(or end (setq end (point-max))) (or end (setq end (point-max)))
(let* ((table minibuffer-completion-table) (let* ((table minibuffer-completion-table)
(pred minibuffer-completion-predicate) (pred minibuffer-completion-predicate)
(filename (memq table PC-do-completion-filename-completers)) (filename (funcall PC-completion-as-file-name-predicate))
(dirname nil) (dirname nil)
dirlength dirlength
(str (buffer-substring beg end)) (str (buffer-substring beg end))