I have some code in my
.emacs that prevents it from showing some pre-defined special buffers when I'm using
(defadvice next-buffer (after avoid-messages-buffer-in-next-buffer) (when (string= "*Messages*" (buffer-name)) (next-buffer)) (when (string= "*Completions*" (buffer-name)) (next-buffer)) (when (string-match "\*tramp.*\*" (buffer-name)) (previous-buffer)) ... and so on)
This works great, but I'd like to have the same functionality for C-x k. So far, I've tried writing the same kind of function
(defadvice (after kill-buffer) ...), but that doesn't seem to work.
How do I go about doing this?