 (add-to-list 'transient-values '(magit-pull "--rebase"))
 ;; (bind-key "C-x M-g" 'magit-dispatch-popup)
 
-(bind-key "C-w" '(lambda ()
-                   (interactive)
-                   (if (use-region-p)
-                       (call-interactively 'kill-region)
-                     (crux-kill-whole-line))))
+(bind-key "C-w" #'(lambda ()
+                    (interactive)
+                    (if (use-region-p)
+                        (call-interactively 'kill-region)
+                      (crux-kill-whole-line))))
 
 (bind-key "C-a" 'crux-move-beginning-of-line)
 (bind-key "C-c d" 'crux-duplicate-current-line-or-region)

(add-to-list 'grep-find-ignored-directories "build")
(add-to-list 'grep-find-ignored-directories "_darcs")

(bind-key "M-g" '(lambda ()
                   (interactive)
                   (save-some-buffers t nil)
                   (helm-grep-ag (projectile-project-root) current-prefix-arg)))

(bind-key* "M-G" '(lambda ()
                    (interactive)
                    (save-some-buffers t nil)
                    (helm-grep-ag (helm-current-directory) current-prefix-arg)))

(require 'shackle)
(setq shackle-rules


(bind-key "RET" 'newline-and-indent)
(bind-key "S-RET" 'crux-smart-open-line)
(bind-key "M-r" #'(lambda ()
                    (interactive)
                    (call-interactively (if (get-buffer "*compilation*")
                                            'recompile
                                          'compile))))
(bind-key "M-R" 'shell-command)
;; (bind-key "M-o" 'other-window)

