Commit 3985c790 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(PC-do-completion-filename-completers): New variable.

(PC-do-completion): Use it.
parent 5d6c2aa3
...@@ -257,13 +257,17 @@ See `PC-complete' for details." ...@@ -257,13 +257,17 @@ 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
'(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'.")
(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 '(read-file-name-internal (filename (memq table PC-do-completion-filename-completers))
(dirname nil) (dirname nil)
dirlength dirlength
(str (buffer-substring beg end)) (str (buffer-substring beg end))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment