Sample Header Ad - 728x90

How do I skip special buffers when killing the current buffer?

2 votes
1 answer
207 views
I have some code in my .emacs that prevents it from showing some pre-defined special buffers when I'm using previous-buffer and next-buffer: (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?
Asked by Stefano Palazzo (598 rep)
Aug 16, 2013, 12:44 PM
Last activity: Aug 16, 2013, 03:29 PM