Hey, dude- > I too would prefer to use nitems, to be consistent with the rest of the > code. Also reduces the number of gratuitous changes, and of course the > size of the diff.
I chose the guard element approach because it leads to the smallest diff, but I can move the definition of name_to_kbfunc[] from conf.c to a header if you prefer. > > > + if ((mi = menu_filter(sc, &menuq, "function", NULL, 0, > > > + search_match_text, NULL)) != NULL) { > > > + func = (struct func *)mi->ctx; > > > + (*func->handler)(cc, &func->argument); > > Likewise, as mentioned, consistency with the rest is best. I wrote the above specifically to be consistent with other parts of cwm; see: xevents.c:261 and xevents.c:314. Thanks for the feedback! Best, Kent