     plugin.unsubscribe buffer
     if atom.config.get("atom-beautify.beautifyOnSave")
       events = "will-be-saved"
-      plugin.subscribe buffer, events, beautify.bind(@)
+      plugin.subscribe buffer, events, beautify.bind(@, {onSave:true})
     return
   return
 

  @messagePanel ?= new MessagePanelView title: 'Atom Beautify Error Messages'
  @loadingView ?= new LoadingView()
  @loadingView.show()
  forceEntireFile = atom.config.get("atom-beautify.beautifyEntireFileOnSave")
  # Show error
  showError = (e) =>
      @loadingView.hide()

  # console.log(options);
  options

beautify = ({onSave})->
  path ?= require("path")
  MessagePanelView ?= require('atom-message-panel').MessagePanelView
  PlainMessageView ?= require('atom-message-panel').PlainMessageView
