From 414a17c9a5fabe70cacfd2c25925dcb09f838dff Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 21 Mar 2007 19:23:12 +0000 Subject: [PATCH] (read-file-name-internal): Don't add the final > if the completion is not finished (re-application of this patch, which was accidentally undone by Eli). --- lisp/ChangeLog | 6 ++++++ lisp/complete.el | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e24c331ab22..052c64bc5c3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-03-21 Stefan Monnier + + * complete.el (read-file-name-internal): Don't add the final > if the + completion is not finished (re-application of this patch, which was + accidentally undone by Eli). + 2007-03-21 Chong Yidong * emulation/viper.el (viper-non-hook-settings): Handle mouse diff --git a/lisp/complete.el b/lisp/complete.el index ce5094d1aef..e86d71c16be 100644 --- a/lisp/complete.el +++ b/lisp/complete.el @@ -1026,10 +1026,11 @@ absolute rather than relative to some directory on the SEARCH-PATH." (if (string-match "<\\([^\"<>]*\\)>?\\'" (ad-get-arg 0)) (let* ((string (ad-get-arg 0)) (action (ad-get-arg 2)) - (name (substring string (match-beginning 1) (match-end 1))) + (name (match-string 1 string)) (str2 (substring string (match-beginning 0))) (completion-table - (mapcar (lambda (x) (format "<%s>" x)) + (mapcar (lambda (x) + (format (if (string-match "/\\'" x) "<%s" "<%s>") x)) (PC-include-file-all-completions name (PC-include-file-path))))) (setq ad-return-value -- 2.39.5