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
93f4fe7a
Commit
93f4fe7a
authored
Oct 20, 2003
by
Stefan Monnier
Browse files
(PC-do-completion): Do not forget to use `pred' as the default-directory
when completing file names.
parent
6c119ac0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
lisp/complete.el
lisp/complete.el
+6
-2
No files found.
lisp/complete.el
View file @
93f4fe7a
;;; complete.el --- partial completion mechanism plus other goodies
;; Copyright (C) 1990, 1991, 1992, 1993, 1999, 2000
;; Copyright (C) 1990, 1991, 1992, 1993, 1999, 2000
, 2003
;; Free Software Foundation, Inc.
;; Author: Dave Gillespie <daveg@synaptics.com>
...
...
@@ -394,7 +394,9 @@ of `minibuffer-completion-table' and the minibuffer contents.")
;; Add wildcards if necessary
(
and
filename
(
let
((
dir
(
file-name-directory
str
))
(
file
(
file-name-nondirectory
str
)))
(
file
(
file-name-nondirectory
str
))
;; The base dir for file-completion is passed in `predicate'.
(
default-directory
(
expand-file-name
pred
)))
(
while
(
and
(
stringp
dir
)
(
not
(
file-directory-p
dir
)))
(
setq
dir
(
directory-file-name
dir
))
(
setq
file
(
concat
(
replace-regexp-in-string
...
...
@@ -408,6 +410,8 @@ of `minibuffer-completion-table' and the minibuffer contents.")
(
and
filename
(
string-match
"\\*.*/"
str
)
(
let
((
pat
str
)
;; The base dir for file-completion is passed in `predicate'.
(
default-directory
(
expand-file-name
pred
))
files
)
(
setq
p
(
1+
(
string-match
"/[^/]*\\'"
pat
)))
(
while
(
setq
p
(
string-match
PC-delim-regex
pat
p
))
...
...
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