I have prepared a simple example to reproduce the problem. In the attachment is a small elisp file testfile.el. Save it and execute: emacs -q -l testfile.el In the started Emacs open some shell script and press TAB. Observe infinite loop running inside advice--called-interactively-skip. I have pressed TAB on an empty line, though probably any other will work as well.