From bill at insightful.com  Mon Sep 17 19:45:17 2007
From: bill at insightful.com (bill at insightful.com)
Date: Mon, 17 Sep 2007 19:45:17 +0200 (CEST)
Subject: [Rd] *.Rd file: space after topic in "\alias{topic }" should be
	ignored (PR#9914)
Message-ID: <20070917174517.1941D4C99E@slim.kubism.ku.dk>

Full_Name: Bill Dunlap
Version: R version 2.6.0 Under development (unstable) (2007-07-26 r42329)
OS: Linux
Submission from: (NULL) (24.16.101.199)


If a *.Rd file has an \alias{topic } with a space
between 'topic' and the closing '}' then the space
is copied to the help/AnIndex file and help(topic)
fails to find the help file.

E.g., if the help file starts with
   \name{test1}
   \alias{test1 }
   \alias{test2}
   \alias{test3 }
   \alias{test4}
then help(test1) and help(test4) work, but not
help(test1) or help(test3).

A possible fix is
--- share/perl/R/Rdlists.pm     (revision 42846)
+++ share/perl/R/Rdlists.pm     (working copy)
@@ -329,7 +329,7 @@
                $main::title2file{$rdtitle} = $manfilebase;
            }

-           while($text =~ s/\\alias\{\s*(.*)\s*\}//){
+           while($text =~ s/\\alias\{\s*([^\s]*)\s*\}//){
                $alias = $1;
                $alias =~ s/\\%/%/g;
                if ($internal){



[Rd] *.Rd file: space after topic in "\alias{topic }" should be ignored (PR#9914)
bill at insightful.com