From c613e27e591f00692535ba70acb44d54ef59e288 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Fri, 4 Sep 1998 19:50:26 +0000 Subject: [PATCH] (info): Don't add parens if FILE already has them. --- lisp/info.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index c96844a88fc..6149c570b14 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -299,8 +299,15 @@ in all the directories in that path." (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)))) -- 2.39.2