From: Karl Heuer Date: Fri, 4 Sep 1998 19:50:26 +0000 (+0000) Subject: (info): Don't add parens if FILE already has them. X-Git-Tag: emacs-20.4~1774 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c613e27e591f00692535ba70acb44d54ef59e288;p=emacs.git (info): Don't add parens if FILE already has them. --- 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))))