changeset 23175:ea4f70068321

(info): Don't add parens if FILE already has them.
author Karl Heuer <kwzh@gnu.org>
date Fri, 04 Sep 1998 19:50:26 +0000
parents eb56d7e8faa1
children 3852eb64cf0e
files lisp/info.el
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/info.el	Fri Sep 04 14:08:26 1998 +0000
+++ b/lisp/info.el	Fri Sep 04 19:50:26 1998 +0000
@@ -299,8 +299,15 @@
   (interactive (if current-prefix-arg
 		   (list (read-file-name "Info file name: " nil nil t))))
   (if file
-      (progn (pop-to-buffer "*info*")
-	     (Info-goto-node (concat "(" 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*")
       (Info-directory))))