Mercurial > hg > octave-nkf
comparison scripts/help/lookfor.m @ 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 | 57649dcecb55 |
comparison
equal
deleted
inserted
replaced
8940:6994961bf1f4 | 8941:b8ed0262b11e |
---|---|
171 endif | 171 endif |
172 endfunction | 172 endfunction |
173 | 173 |
174 function [funs, help_texts] = search_cache (str, cache_file, search_type) | 174 function [funs, help_texts] = search_cache (str, cache_file, search_type) |
175 load (cache_file); | 175 load (cache_file); |
176 if (! isempty(cache)) | 176 if (! isempty (cache)) |
177 tmp = strfind (cache (search_type, :), str); | 177 t1 = strfind (cache (1, :), str); |
178 cache_idx = find (!cellfun ("isempty", tmp)); | 178 t2 = strfind (cache (search_type, :), str); |
179 cache_idx = find (! (cellfun ("isempty", t1) & cellfun ("isempty", t2))); | |
179 funs = cache (1, cache_idx); | 180 funs = cache (1, cache_idx); |
180 help_texts = cache (3, cache_idx); | 181 help_texts = cache (3, cache_idx); |
181 else | 182 else |
182 funs = help_texts = {}; | 183 funs = help_texts = {}; |
183 endif | 184 endif |
184 endfunction | 185 endfunction |
185 |