# HG changeset patch # User John W. Eaton # Date 1236624779 14400 # Node ID b8ed0262b11efd23f80c223b103db060fd4adb2a # Parent 6994961bf1f41e43e91f72f2240c642863d1fc4c lookfor.m: also match function names diff -r 6994961bf1f4 -r b8ed0262b11e scripts/ChangeLog --- a/scripts/ChangeLog Mon Mar 09 14:31:10 2009 -0400 +++ b/scripts/ChangeLog Mon Mar 09 14:52:59 2009 -0400 @@ -1,5 +1,7 @@ 2009-03-09 John W. Eaton + * 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. diff -r 6994961bf1f4 -r b8ed0262b11e scripts/help/lookfor.m --- a/scripts/help/lookfor.m Mon Mar 09 14:31:10 2009 -0400 +++ b/scripts/help/lookfor.m Mon Mar 09 14:52:59 2009 -0400 @@ -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 -