 (diminish 'whole-line-or-region-mode)
 (make-variable-buffer-local 'whole-line-or-region-mode)
 
-(defun suspend-mode-during-cua-rect-selection (mode-name)
-  "Add an advice to suspend `MODE-NAME' while selecting a CUA rectangle."
-  (let ((flagvar (intern (format "%s-was-active-before-cua-rectangle" mode-name)))
-        (advice-name (intern (format "suspend-%s" mode-name))))
-    (eval-after-load 'cua-rect
-      `(progn
-         (defvar ,flagvar nil)
-         (make-variable-buffer-local ',flagvar)
-         (defadvice cua--activate-rectangle (after ,advice-name activate)
-           (setq ,flagvar (and (boundp ',mode-name) ,mode-name))
-           (when ,flagvar
-             (,mode-name 0)))
-         (defadvice cua--deactivate-rectangle (after ,advice-name activate)
-           (when ,flagvar
-             (,mode-name 1)))))))
-
-(suspend-mode-during-cua-rect-selection 'whole-line-or-region-mode)
-
 (require-package 'highlight-escape-sequences)
 (hes-mode)
 
+;;----------------------------------------------------------------------------
+;; Move text/region around the buffer
+;;----------------------------------------------------------------------------
+(require-package 'drag-stuff)
+(drag-stuff-mode t)
+
 (provide 'init-editing-utils)


(global-set-key [remap backward-up-list] 'backward-up-sexp) ; C-M-u, C-M-up

;;
;;----------------------------------------------------------------------------
;; Cut/copy the current line if no region is active
;;----------------------------------------------------------------------------

(require-package 'smartparens)
(require 'smartparens-config)

(set-face-background 'show-paren-match (face-attribute 'default :foreground))
(set-face-foreground 'show-paren-match (face-attribute 'default :background))
(set-face-attribute 'show-paren-match nil :weight 'extra-bold)

;;----------------------------------------------------------------------------
;; Some basic preferences
