pkryger / difftastic.el

Wrapper for difftastic
GNU General Public License v3.0
45 stars 4 forks source link

Smarter temporary buffer creation - i.e., with extensions based on a buffer major-mode #5

Open pkryger opened 6 months ago

pkryger commented 6 months ago

Temporary buffers are now created without extension. That doesn't allow difft to guess what language should be used (i.e., when the content of a temporary buffer is second).

A major-mode of a temporary buffer can be check and extension guessed (i.e., extracted from auto-mode-alist). Such a temporary buffer will let difft to make better guesses about a language. At the first look the --language difft's argument should be reserved to carry language-override function arguments (i.e., to make it easier to reason what will happen), and still allowing user to override the detection mechanism.