Skip to content

Miscellaneous improvements

Ghost User requested to merge lunaryorn:misc-improvements into master

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 and call-process instead of shell-command-to-string.
  • Use real file name functions to manipulate file names. Notably, use file-relative-name instead of s-chop-prefix to obtain a relative file name, and file-name-as-directory instead of concat 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 into buffer-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?

Merge request reports