changeset 43530:aee3db99fcca

(comint-replace-by-expanded-filename): Do nothing if comint-match-partial-filename returns nil.
author Kim F. Storm <storm@cua.dk>
date Mon, 25 Feb 2002 21:06:03 +0000
parents 7f72a2792acc
children 4481706b64dd
files lisp/comint.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/comint.el	Mon Feb 25 21:04:00 2002 +0000
+++ b/lisp/comint.el	Mon Feb 25 21:06:03 2002 +0000
@@ -2756,8 +2756,10 @@
 see `expand-file-name' and `substitute-in-file-name'.  For completion see
 `comint-dynamic-complete-filename'."
   (interactive)
-  (replace-match (expand-file-name (comint-match-partial-filename)) t t)
-  (comint-dynamic-complete-filename))
+  (let ((filename (comint-match-partial-filename)))
+    (when filename
+      (replace-match (expand-file-name filename) t t)
+      (comint-dynamic-complete-filename))))
 
 
 (defun comint-dynamic-simple-complete (stub candidates)