Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ca600722
Commit
ca600722
authored
Apr 11, 1994
by
Karl Heuer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(comint-dynamic-complete-as-filename): Save end of match before calling other
functions. Handle non-match too.
parent
5d831bed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
lisp/comint.el
lisp/comint.el
+9
-6
No files found.
lisp/comint.el
View file @
ca600722
...
...
@@ -1836,11 +1836,14 @@ See `comint-dynamic-complete-filename'. Returns t if successful."
(
let*
((
completion-ignore-case
nil
)
(
completion-ignored-extensions
comint-completion-fignore
)
(
success
t
)
(
filename
(
or
(
comint-match-partial-filename
)
""
))
(
pathdir
(
file-name-directory
filename
))
(
pathnondir
(
file-name-nondirectory
filename
))
(
directory
(
if
pathdir
(
comint-directory
pathdir
)
default-directory
))
(
completion
(
file-name-completion
pathnondir
directory
)))
(
filename
(
comint-match-partial-filename
))
endpos
pathdir
pathnondir
directory
completion
)
(
setq
endpos
(
if
filename
(
match-end
0
)
(
point
)))
(
or
filename
(
setq
filename
""
))
(
setq
pathdir
(
file-name-directory
filename
)
pathnondir
(
file-name-nondirectory
filename
)
directory
(
if
pathdir
(
comint-directory
pathdir
)
default-directory
)
completion
(
file-name-completion
pathnondir
directory
))
(
cond
((
null
completion
)
(
message
"No completions of %s"
filename
)
(
setq
success
nil
))
...
...
@@ -1851,7 +1854,7 @@ See `comint-dynamic-complete-filename'. Returns t if successful."
(
comint-dynamic-list-filename-completions
))
(
t
; Completion string returned.
(
let
((
file
(
concat
(
file-name-as-directory
directory
)
completion
)))
(
goto-char
(
match-end
0
)
)
(
goto-char
endpos
)
(
insert
(
substring
(
directory-file-name
completion
)
(
length
pathnondir
)))
(
cond
((
symbolp
(
file-name-completion
completion
directory
))
...
...
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