comparison lisp/info.el @ 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 93757a9629cc
children 04f1cff889f4
comparison
equal deleted inserted replaced
3564:cecefb2ab758 3565:bd87ecca04f6
659 (if (eq default t) (setq default str)) 659 (if (eq default t) (setq default str))
660 (setq completions 660 (setq completions
661 (cons (cons str nil) 661 (cons (cons str nil)
662 completions)))) 662 completions))))
663 (if completions 663 (if completions
664 (list (completing-read (if default 664 (let ((input (completing-read (if default
665 (concat "Follow reference named: (" 665 (concat "Follow reference named: ("
666 default ") ") 666 default ") ")
667 "Follow reference named: ") 667 "Follow reference named: ")
668 completions default t)) 668 completions nil t)))
669 (list (if (equal input "")
670 default input)))
669 (error "No cross-references in this node")))) 671 (error "No cross-references in this node"))))
670 (let (target beg i (str (concat "\\*note " footnotename))) 672 (let (target beg i (str (concat "\\*note " footnotename)))
671 (while (setq i (string-match " " str i)) 673 (while (setq i (string-match " " str i))
672 (setq str (concat (substring str 0 i) "[ \t\n]+" (substring str (1+ i)))) 674 (setq str (concat (substring str 0 i) "[ \t\n]+" (substring str (1+ i))))
673 (setq i (+ i 6))) 675 (setq i (+ i 6)))