I have a buffer of a directory using the dired command. I have some marked files in that buffer and I want emacs to prompt me before I kill the buffer. I understand I have to write a hook but don't know Lisp nor the emacs functions to use. How do I write a hook or can someone provide a hook?
I have looked at other hooks but unable to figure out what the hook would be to make kill-current-buffer prompt me before killing the buffer.
With no prompting:
With prompting: