changeset 3565:bd87ecca04f6

(Info-follow-reference): Fix completion defaulting.
author Richard M. Stallman <rms@gnu.org>
date Tue, 08 Jun 1993 04:41:00 +0000
parents cecefb2ab758
children dc2b64ef30dc
files lisp/info.el
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/info.el	Tue Jun 08 04:27:18 1993 +0000
+++ b/lisp/info.el	Tue Jun 08 04:41:00 1993 +0000
@@ -661,11 +661,13 @@
 	       (cons (cons str nil)
 		     completions))))
      (if completions
-	 (list (completing-read (if default
-				    (concat "Follow reference named: ("
-					    default ") ")
-				  "Follow reference named: ")
-				completions default t))
+	 (let ((input (completing-read (if default
+					   (concat "Follow reference named: ("
+						   default ") ")
+					 "Follow reference named: ")
+				       completions nil t)))
+	   (list (if (equal input "")
+		     default input)))
        (error "No cross-references in this node"))))
   (let (target beg i (str (concat "\\*note " footnotename)))
     (while (setq i (string-match " " str i))