diff --git a/core/prelude-core.el b/core/prelude-core.el index 9216f9d..7a9a144 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -469,12 +469,6 @@ Doesn't mess with special buffers." (when after-init-time (eval form)))) -(defun prelude-exchange-point-and-mark () - "Identical to `exchange-point-and-mark' but will not activate the region." - (interactive) - (exchange-point-and-mark) - (deactivate-mark nil)) - (require 'epl) (defun prelude-update () diff --git a/core/prelude-editor.el b/core/prelude-editor.el index 809e7d5..e964e6d 100644 --- a/core/prelude-editor.el +++ b/core/prelude-editor.el @@ -280,6 +280,11 @@ The body of the advice is in BODY." (browse-kill-ring-default-keybindings) (global-set-key (kbd "s-y") 'browse-kill-ring) +(defadvice exchange-point-and-mark (before deactivate-mark activate compile) + "When called with no active region, do not activate mark." + (interactive + (list (not (region-active-p))))) + ;; automatically indenting yanked text if in programming-modes (defvar yank-indent-modes '(LaTeX-mode TeX-mode) diff --git a/core/prelude-global-keybindings.el b/core/prelude-global-keybindings.el index 9e29c89..a8e241f 100644 --- a/core/prelude-global-keybindings.el +++ b/core/prelude-global-keybindings.el @@ -110,11 +110,6 @@ (global-set-key (kbd "C-=") 'er/expand-region) -;; make C-x C-x usable with transient-mark-mode -(define-key global-map - [remap exchange-point-and-mark] - 'prelude-exchange-point-and-mark) - (global-set-key (kbd "C-c j") 'ace-jump-mode) (global-set-key (kbd "s-.") 'ace-jump-mode) (global-set-key (kbd "C-c J") 'ace-jump-buffer)