From: Stefan Monnier Date: Wed, 14 Apr 2004 18:39:52 +0000 (+0000) Subject: (info): Always jump to *info*. X-Git-Tag: ttn-vms-21-2-B4~6827 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6070505443d4d95f5d376c6c4cdbedbf19a2b879;p=emacs.git (info): Always jump to *info*. --- diff --git a/lisp/info.el b/lisp/info.el index 96445a18e28..c67a1a5f0c7 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -470,18 +470,16 @@ The top-level Info directory is made by combining all the files named `dir' in all the directories in that path." (interactive (if current-prefix-arg (list (read-file-name "Info file name: " nil nil t)))) + (pop-to-buffer "*info*") (if file - (progn - (pop-to-buffer "*info*") - ;; If argument already contains parentheses, don't add another set - ;; since the argument will then be parsed improperly. This also - ;; has the added benefit of allowing node names to be included - ;; following the parenthesized filename. - (if (and (stringp file) (string-match "(.*)" file)) - (Info-goto-node file) - (Info-goto-node (concat "(" file ")")))) - (if (get-buffer "*info*") - (pop-to-buffer "*info*") + ;; If argument already contains parentheses, don't add another set + ;; since the argument will then be parsed improperly. This also + ;; has the added benefit of allowing node names to be included + ;; following the parenthesized filename. + (if (and (stringp file) (string-match "(.*)" file)) + (Info-goto-node file) + (Info-goto-node (concat "(" file ")"))) + (if (zerop (buffer-size)) (Info-directory)))) ;;;###autoload