[xyzzy:00507] Re: info
- Subject: [xyzzy:00507] Re: info
- From: "Seiya Suda" <EZU11330@xxxxxxxxxxxxxxxx>
- X-mailer: Microsoft Outlook Express 4.72.3110.5
亀井さん、こんにちは。
completing read はlisp としてはどこにもないようです。
次を修正してください。。m(. .)m
須田誠也 <EZU11330@xxxxxxxxxxx>
-----------------------------------------
(defun Info-follow-reference (footnotename)
"Follow cross reference named NAME to the node it refers to.
NAME may be an abbreviation of the reference name."
(interactive
(let ((completion-ignore-case t)
completions str i)
(save-excursion
(goto-char (point-min))
(while (scan-buffer "\\*note[ \n\t]*\\([^:]*\\):" :regexp t :tail t)
(setq str (buffer-substring
(match-beginning 1)
(1- (point))))
(setq i 0)
(while (setq i (string-match "[ \n\t]+" str i))
(setq str (concat (substring str 0 i) " "
(substring str (match-end 0))))
(setq i (1+ i)))
(setq completions
(cons (cons str nil)
completions))))
(if completions
(list (completing-read "Follow reference named: " completions
:default str
:must-match completions))
(error "No cross-references in this node"))))
(let (target beg i (str (concat "\\*note " footnotename)))
(while (setq i (string-match " " str i))
(setq str (concat (substring str 0 i) "[ \t\n]+" (substring str (1+
i))))
(setq i (+ i 6)))
(save-excursion
(goto-char (point-min))
(or (scan-buffer str :regexp t :tail t)
(error "No cross-reference named ~A" footnotename))
(goto-char (+ (match-beginning 0) 5))
(setq target
(Info-extract-menu-node-name "Bad format cross reference" t)))
(while (setq i (string-match "[ \t\n]+" target i))
(setq target (concat (substring target 0 i) " "
(substring target (match-end 0))))
(setq i (+ i 1)))
(Info-goto-node target)))