The command stack should be local to kbd.c. It is now only used in
incremental searches, so it doesn't need to be high performance.
Remove some obsolete code.