From 6070505443d4d95f5d376c6c4cdbedbf19a2b879 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 14 Apr 2004 18:39:52 +0000 Subject: [PATCH] (info): Always jump to *info*. --- lisp/info.el | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) 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 -- 2.39.5