Miscellaneous improvements
I made a bunch of changes in the source:
- Directly insert the output of
git show
into the target buffer, instead of obtaining the output as string and inserting it. - Directly call "git" instead of going through the shell. Notably, use
process-lines
andcall-process
instead ofshell-command-to-string
. - Use real file name functions to manipulate file names. Notably, use
file-relative-name
instead ofs-chop-prefix
to obtain a relative file name, andfile-name-as-directory
instead ofconcat
to append a trailing slash. As a side-effect, the dependency on s.el became redundant and is removed. - Follow the recommendation in the docstring of
buffer-file-name
to use absolute file names, and put an absolute file name intobuffer-file-name
of the git timemachine buffer.
While making these changes, I noticed that the indentation of the source code is rather odd. It seems to exlusively use a single space, which for some macros is quite different from the standard indentation. Is there a reason for this?