A Small Git Improvement For Elisp Files

James Cherti has a quick tip on configuring Git to provide more meaningful diffs for Elisp files. The problem, he says, is that by default Git diffs simply provide a line-by-line difference with no added context such as what functions are involved. It turns out that it’s pretty easy to provide that context.

The process is pretty simple. First you have to provide a regular expression that recognizes the various def constructs such as defun and defmacro. Then you tell Git to associate that regex with Elisp files. After doing that, you get a bit more context in your Git diffs.

Take a look at Cherti’s post for the details. It’s a small thing but easy to do and it may make your change analysis a bit easier.

This entry was posted in General and tagged , . Bookmark the permalink.