From 2ff55eb5efb4f1a4116d92ff25cd1d71831d1c33 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 14 Feb 2016 12:41:47 -0500 Subject: diff: Add command to lock buffer name --- lisp/km-diff.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lisp') diff --git a/lisp/km-diff.el b/lisp/km-diff.el index 371d1c9..05a8d0b 100644 --- a/lisp/km-diff.el +++ b/lisp/km-diff.el @@ -23,6 +23,15 @@ (require 'dash) (require 'ediff) +;;;###autoload +(defun km/diff-lock-buffer () + "Rename current diff buffer to include new file name." + (interactive) + (rename-buffer + (format "*Diff: %s*" + (abbreviate-file-name + (substring-no-properties (diff-find-file-name)))))) + ;;;###autoload (defun km/ediff-with-other-window () "Run `ediff' on current window's file and other window's file." -- cgit v1.2.3