Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
c2801b50
Commit
c2801b50
authored
Nov 08, 2002
by
Stefan Monnier
Browse files
(PC-do-completion): Make partial-completion work
with incomplete directory names.
parent
dc0868e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
lisp/complete.el
lisp/complete.el
+12
-5
No files found.
lisp/complete.el
View file @
c2801b50
...
...
@@ -78,11 +78,6 @@
;; The regular M-TAB (lisp-complete-symbol) command also supports
;; partial completion in this package.
;; File name completion does not do partial completion of directories
;; on the path, e.g., "/u/b/f" will not complete to "/usr/bin/foo",
;; but you can put *'s in the path to accomplish this: "/u*/b*/f".
;; Stars are required for performance reasons.
;; In addition, this package includes a feature for accessing include
;; files. For example, `C-x C-f <sys/time.h> RET' reads the file
;; /usr/include/sys/time.h. The variable PC-include-file-path is a
...
...
@@ -396,6 +391,18 @@ of `minibuffer-completion-table' and the minibuffer contents.")
PC-ndelims-regex
(
concat
"[^"
PC-delims
"]*"
)
PC-delims-list
(
append
PC-delims
nil
)))
;; Add wildcards if necessary
(
let
((
dir
(
file-name-directory
str
))
(
file
(
file-name-nondirectory
str
)))
(
while
(
and
(
stringp
dir
)
(
not
(
file-directory-p
dir
)))
(
setq
dir
(
directory-file-name
dir
))
(
setq
file
(
concat
(
replace-regexp-in-string
PC-delim-regex
"*\\&"
(
file-name-nondirectory
dir
))
"*/"
file
))
(
setq
dir
(
file-name-directory
dir
)))
(
setq
str
(
concat
dir
file
)))
;; Look for wildcard expansions in directory name
(
and
filename
(
string-match
"\\*.*/"
str
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment