purescript-emacs / psc-ide-emacs

Emacs integration for PureScript's psc-ide tool.
GNU General Public License v3.0
132 stars 31 forks source link

Handle rebuild-on-save more conventionally #159

Closed purcell closed 5 years ago

purcell commented 5 years ago

Don't make a single global decision about whether to do this based on the value of psc-ide-rebuild-on-save at the time the library is loaded.

Instead, add after-save-hook handlers locally to each buffer in which psc-ide-mode is enabled, and then check psc-ide-rebuild-on-save each time.

This way, psc-ide-rebuild-on-save can be set on a per-file or per-directory basis, and no check for the current major mode is necessary.

See #151 and #152

kritzcreek commented 5 years ago

Much better!