Mercurial > hg > octave-jordi
changeset 8941:b8ed0262b11e
lookfor.m: also match function names
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 09 Mar 2009 14:52:59 -0400 |
parents | 6994961bf1f4 |
children | c4383701e10d |
files | scripts/ChangeLog scripts/help/lookfor.m |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,7 @@ 2009-03-09 John W. Eaton <jwe@octave.org> + * help/lookfor.m (search_cache): Also match function names. + * help/gen_doc_cache.m, help/lookfor.m: Use doc-cache instead of DOC for doc cache file.
--- a/scripts/help/lookfor.m +++ b/scripts/help/lookfor.m @@ -173,13 +173,13 @@ function [funs, help_texts] = search_cache (str, cache_file, search_type) load (cache_file); - if (! isempty(cache)) - tmp = strfind (cache (search_type, :), str); - cache_idx = find (!cellfun ("isempty", tmp)); + if (! isempty (cache)) + t1 = strfind (cache (1, :), str); + t2 = strfind (cache (search_type, :), str); + cache_idx = find (! (cellfun ("isempty", t1) & cellfun ("isempty", t2))); funs = cache (1, cache_idx); help_texts = cache (3, cache_idx); else funs = help_texts = {}; endif endfunction -