add emacs integration files for code formatting
Adds emacs integration lisp files to enable the use of LHCb's clang-format
and yapf
formatting tools in emacs. Adds three files, one for clang, one for yapf and a third that loads them both. Users only need to load this third one, with
(add-to-list 'load-path (getenv "EMACSDIR"))
(require 'lb-format)
where EMACSDIR
is then an environment variable set by the LbEnv
environment, to point to the directory containing the released lisp files.
Not everything is completely perfect.
I would like to use the emacs specific EMACSLOADPATH
env var, which potentially would mean the first line above would not be required in the user's ~/.emacs
file. But all my attempts to get this to work broke emacs, so for the moment I am using the above.
Also currently the emacs commands for formatting c/c++ and python are not the same lb-format-c
and lb-format-py
respectively. It would be nice to have a single command, which then does the right thing depending on the file mode, but my lisp skills have not been up to getting this working...