aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/info.el
diff options
context:
space:
mode:
authorKarl Heuer <[email protected]>1998-09-04 19:50:26 +0000
committerKarl Heuer <[email protected]>1998-09-04 19:50:26 +0000
commitc613e27e591f00692535ba70acb44d54ef59e288 (patch)
tree4c589940661464356afd6ebd8a645627aec65d25 /lisp/info.el
parented218f733e8ca96b3ff003974e3d143e06fca929 (diff)
(info): Don't add parens if FILE already has them.
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el11
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))))