Michael Wolf 915f99afe0 Update deps
2021-01-13 10:59:21 -06:00
2020-05-22 10:44:52 -05:00
2020-08-12 14:01:45 -05:00
2020-08-12 18:48:24 +00:00
2021-01-13 10:59:16 -06:00
2021-01-13 10:59:21 -06:00

would-reformat - automatic reformatting for emacs without being annoying

Motivation

Installation

  • Change to the directory where you would want to use would-reformat: $ cd ~/devel/my-project
  • From that directory, call the script install.sh in the directory where you have would-reformat checked out: you@host:~/devel/my-project $ ~/src/would-reformat/install.sh

This will do the following:

  • create the directory ~/devel/my-project/bin if it does not exist
  • create ~/devel/my-project/_reformat-common.sh, ~/devel/my-project/do-reformat.sh, and ~/devel/my-project/bin/would-reformat.sh as symlinks to files with the same names in ~/src/would-reformat.
  • create ~/devel/my-project/.dir-locals.el as a symlink to the file with the same name in ~/src/would-reformat.

This should work from a checkout wherever you happen to have it. It doesn't need to be in ~/src. However, if you remove the checkout, then the symlinks will break, so don't do that. If you rename the checkout, the symlinks will break.

The directory bin with respect to my-project however is hardcoded (enhancements here are welcome).

The script install.sh favors conservatism over being clever: for example, if it finds the file ~/devel/my-project/bin/do-reformat.sh then it checks whether it is a symlink to ~/src/would-reformat/do-reformat.sh. If it is not, then it just prints a warning rather than attempting to correct the situation.

Development

Description
No description provided
Readme 95 KiB
Languages
Shell 57.4%
Emacs Lisp 42.6%