Quickly diff the changes made in the current buffer with its file
Update (23rd Jan 2010): Separated the key-assignment and function definition. A simple function to quickly do a diff of the current buffer contents with its underlying file. Very useful if the file has been changed outside (e.g., a log file). ;; Diff the current buffer with the file contents (defun my-diff-current-buffer-with-disk () "Compare the current buffer with it's disk file." (interactive) (diff-buffer-with-file (current-buffer))) (global-set-key (kbd "C-c w") 'my-diff-current-buffer-with-disk)