diff options
author | Karl Heuer <[email protected]> | 1998-09-04 19:50:26 +0000 |
---|---|---|
committer | Karl Heuer <[email protected]> | 1998-09-04 19:50:26 +0000 |
commit | c613e27e591f00692535ba70acb44d54ef59e288 (patch) | |
tree | 4c589940661464356afd6ebd8a645627aec65d25 | |
parent | ed218f733e8ca96b3ff003974e3d143e06fca929 (diff) |
(info): Don't add parens if FILE already has them.
-rw-r--r-- | lisp/info.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/info.el b/lisp/info.el index c96844a88f..6149c570b1 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)))) |