lor, 24 01 2009 kl. 09:40 +0100, skrev Soren Hauberg:
fre, 23 01 2009 kl. 12:50 -0500, skrev John W. Eaton:
2008-08-19 David Bateman <address@hidden>
* load-path.cc (load-path::do_find_dir (const std:string&) const)):
Method to find a directory on the load-path corresponding to the
argument.
* load-path.h (load-path::do_find_dir (const std:string&) const),
load-path::find_dir (const std::string&) const): New methods.
* utils.cc (std::string contents_file_in_path (const std::string&)):
New function.
* utils.h (std::string contents_file_in_path (const std::string&)):
Declare it.
* help.cc (static bool raw_help_from_file (const std::string&,
std::string&, std::string&, bool&)): Also check is requested
argument is a directory and contains the file Contents.m.
It seems that these changes mostly work as-is. However, I think it would
be better to move this code directly into 'help.m'. That would IMHO make
the code simpler. I'm currently spending all my time on grading exams,
so I don't think I'll have any time to look at this till next week.
Did this feature actually work before? I've tried to
mkdir delme
echo "## some text" > delme/Contents.m
in the shell and then
addpath ("delme")
help delme
from Octave, and it didn't work for me with a checkout from before you
checked in my changes. Anyway, the attached changeset allows for this
behaviour. I've implemented this in 'help.m', so the I removed some more
code from C++.
Soren