Skip to content

Instantly share code, notes, and snippets.

@reactormonk
Created May 2, 2016 13:42
Show Gist options
  • Save reactormonk/f4322f4ac1a0dec68413b1ccf44e7c7a to your computer and use it in GitHub Desktop.
Save reactormonk/f4322f4ac1a0dec68413b1ccf44e7c7a to your computer and use it in GitHub Desktop.
(spacemacs/setq-honor-customize scala-indent:align-forms t
scala-indent:align-parameters t
scala-indent:default-run-on-strategy scala-indent:operator-strategy)
;; Should produce
(progn
(unless (custom-variable-p 'scala-indent:align-forms) (setq scala-indent:align-forms t))
(unless (custom-variable-p 'scala-indent:align-parameters) (setq scala-indent:align-parameters t))
(unless (custom-variable-p 'scala-indent:default-run-on-strategy) (setq scala-indent:default-run-on-strategy scala-indent:operator-strategy)))
(defmacro spacemacs/setq-honor-customize (&rest body)
`(loop for (name . value) in ,@body
collect (unless (custom-variable-p name) (setq name ,value))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment