(Please excuse the lack of inline comments on the patch – the original patch email is so old that I had deleted it from my archives!) progn...set-buffer should be with-current-buffer or...eq...eq... would be cleaner as (memq major-mode '(foo bar baz)) Otherwise, LGTM -- Aaron Ecay