The align-regexp command enters infinite loop when it is used with the default regexp and with REPEAT argument. It's seems to be because the regexp \s-* matches also zero-length strings. Steps to reproduce: 1. Put the following line to the *scratch* buffer: foo bar 2. Put the line inside a region 3. Type command: C-u M-x align-regexp RET \(\s-*\) RET 1 RET 1 RET y 4. Loop infinitely. I suggest changing the default regexp to \(\s-+\), like the attached patch illustrates.