emacs: refactor smart mode line patterns