 
 ;; if no region is active, act on current line
 (use-package whole-line-or-region
-  :ensure t)
-(setq whole-line-or-region-extensions-alist
-      '((comment-dwim whole-line-or-region-comment-dwim-2 nil)
-        (copy-region-as-kill whole-line-or-region-copy-region-as-kill nil)
-        (kill-region whole-line-or-region-kill-region nil)
-        (kill-ring-save whole-line-or-region-kill-ring-save nil)
-        (yank whole-line-or-region-yank nil)
-        ))
-(whole-line-or-region-mode 1)
+  :diminish whole-line-or-region-mode
+  :ensure t
+  :init
+  (whole-line-or-region-mode 1)
+  :config
+  (setq whole-line-or-region-extensions-alist
+        '((comment-dwim whole-line-or-region-comment-dwim-2 nil)
+          (copy-region-as-kill whole-line-or-region-copy-region-as-kill nil)
+          (kill-region whole-line-or-region-kill-region nil)
+          (kill-ring-save whole-line-or-region-kill-ring-save nil)
+          (yank whole-line-or-region-yank nil)
+          )))
+
 
 ;; tramp
 (use-package tramp

;; undo tree
(use-package undo-tree
  :ensure t
  :commands (undo-tree-undo undo-tree-redo)
  :init
  (global-undo-tree-mode)

(global-set-key [f8] 'goto-last-change)

;; Some saner clipboard
(if (>= emacs-major-version 25)
    (setq select-enable-clipboard t)
  (setq x-select-enable-clipboard t))
(if (>= emacs-major-version 25)
     (setq select-enable-primary t) 
     (setq x-select-enable-primary t))
(setq save-interprogram-paste-before-kill t
