Mercurial > emacs
changeset 6847:9481abcaa7de
(comint-dynamic-complete-as-filename): Simplify.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 13 Apr 1994 16:18:35 +0000 |
parents | a6803ff29cca |
children | df94ce8c363c |
files | lisp/comint.el |
diffstat | 1 files changed, 5 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/comint.el Wed Apr 13 06:24:06 1994 +0000 +++ b/lisp/comint.el Wed Apr 13 16:18:35 1994 +0000 @@ -1836,14 +1836,11 @@ (let* ((completion-ignore-case nil) (completion-ignored-extensions comint-completion-fignore) (success t) - (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)) + (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))) (cond ((null completion) (message "No completions of %s" filename) (setq success nil)) @@ -1854,7 +1851,6 @@ (comint-dynamic-list-filename-completions)) (t ; Completion string returned. (let ((file (concat (file-name-as-directory directory) completion))) - (goto-char endpos) (insert (substring (directory-file-name completion) (length pathnondir))) (cond ((symbolp (file-name-completion completion directory))