comparison lisp/info.el @ 1425:74cb069b8417

[xemacs-hg @ 2003-04-23 15:42:44 by stephent] stale match data <87fzo99rje.fsf@tleepslib.sk.tsukuba.ac.jp> new split-string <87d6jd9qis.fsf@tleepslib.sk.tsukuba.ac.jp> support (info "(file)node") <87adeh9qa7.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Wed, 23 Apr 2003 15:42:52 +0000
parents c08a6fa181d1
children 375ec21c9374
comparison
equal deleted inserted replaced
1424:c35e2ad2f97d 1425:74cb069b8417
572 (defun info (&optional file) 572 (defun info (&optional file)
573 "Enter Info, the documentation browser. 573 "Enter Info, the documentation browser.
574 Optional argument FILE specifies the file to examine; 574 Optional argument FILE specifies the file to examine;
575 the default is the top-level directory of Info. 575 the default is the top-level directory of Info.
576 576
577 Called from a program, FILE may specify an Info node of the form
578 `(FILENAME)NODENAME'.
579
577 In interactive use, a prefix argument directs this command 580 In interactive use, a prefix argument directs this command
578 to read a file name from the minibuffer." 581 to read a file name from the minibuffer."
579 (interactive (if current-prefix-arg 582 (interactive (if current-prefix-arg
580 (list (read-file-name "Info file name: " nil nil t)))) 583 (list (read-file-name "Info file name: " nil nil t))))
581 (let ((p command-line-args)) 584 (let ((p command-line-args))
590 (setq command-line-args-left nil)) 593 (setq command-line-args-left nil))
591 (setq p (cdr p)))) 594 (setq p (cdr p))))
592 ; (Info-setup-x) ??? What was this going to be? Can anyone tell karlheg? 595 ; (Info-setup-x) ??? What was this going to be? Can anyone tell karlheg?
593 (if file 596 (if file
594 (unwind-protect 597 (unwind-protect
595 (Info-goto-node (concat "(" file ")")) 598 (progn
599 (pop-to-buffer "*info*")
600 ;; If argument already contains parentheses, don't add another set
601 ;; since the argument will then be parsed improperly. This also
602 ;; has the added benefit of allowing node names to be included
603 ;; following the parenthesized filename.
604 (if (and (stringp file) (string-match "(.*)" file))
605 (Info-goto-node file)
606 (Info-goto-node (concat "(" file ")"))))
596 (and Info-standalone (info))) 607 (and Info-standalone (info)))
597 (if (get-buffer "*info*") 608 (if (get-buffer "*info*")
598 (switch-to-buffer "*info*") 609 (switch-to-buffer "*info*")
599 (Info-directory)))) 610 (Info-directory))))
600 611