Skip to content

Instantly share code, notes, and snippets.

@imarko
Created November 18, 2019 17:27
Show Gist options
  • Save imarko/afef0f796e6dd4cf1c88c79a695d6d88 to your computer and use it in GitHub Desktop.
Save imarko/afef0f796e6dd4cf1c88c79a695d6d88 to your computer and use it in GitHub Desktop.
(defun diff-last-two-kills ()
"Put the last two kills to temporary buffers and diff them."
(interactive)
(with-temp-buffer
(let ((old (current-buffer)))
(insert (current-kill 0 t))
(with-temp-buffer
(insert (current-kill 1 t))
(diff old (current-buffer))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment