Merge pull request #570 from toctan/exchange-point-and-mark
Do not deactivate-mark if region active when exchange-point-and-mark
This commit is contained in:
commit
3b61b1f3bb
3 changed files with 5 additions and 11 deletions
|
@ -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 ()
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue