aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1998-09-04 19:50:26 +0000
committerKarl Heuer1998-09-04 19:50:26 +0000
commitc613e27e591f00692535ba70acb44d54ef59e288 (patch)
tree4c589940661464356afd6ebd8a645627aec65d25
parented218f733e8ca96b3ff003974e3d143e06fca929 (diff)
downloademacs-c613e27e591f00692535ba70acb44d54ef59e288.tar.gz
emacs-c613e27e591f00692535ba70acb44d54ef59e288.zip
(info): Don't add parens if FILE already has them.
-rw-r--r--lisp/info.el11
1 files 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."
299 (interactive (if current-prefix-arg 299 (interactive (if current-prefix-arg
300 (list (read-file-name "Info file name: " nil nil t)))) 300 (list (read-file-name "Info file name: " nil nil t))))
301 (if file 301 (if file
302 (progn (pop-to-buffer "*info*") 302 (progn
303 (Info-goto-node (concat "(" file ")"))) 303 (pop-to-buffer "*info*")
304 ;; If argument already contains parentheses, don't add another set
305 ;; since the argument will then be parsed improperly. This also
306 ;; has the added benefit of allowing node names to be included
307 ;; following the parenthesized filename.
308 (if (and (stringp file) (string-match "(.*)" file))
309 (Info-goto-node file)
310 (Info-goto-node (concat "(" file ")"))))
304 (if (get-buffer "*info*") 311 (if (get-buffer "*info*")
305 (pop-to-buffer "*info*") 312 (pop-to-buffer "*info*")
306 (Info-directory)))) 313 (Info-directory))))