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
|
(when after-init-time
|
||||||
(eval form))))
|
(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)
|
(require 'epl)
|
||||||
|
|
||||||
(defun prelude-update ()
|
(defun prelude-update ()
|
||||||
|
|
|
@ -280,6 +280,11 @@ The body of the advice is in BODY."
|
||||||
(browse-kill-ring-default-keybindings)
|
(browse-kill-ring-default-keybindings)
|
||||||
(global-set-key (kbd "s-y") 'browse-kill-ring)
|
(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
|
;; automatically indenting yanked text if in programming-modes
|
||||||
(defvar yank-indent-modes
|
(defvar yank-indent-modes
|
||||||
'(LaTeX-mode TeX-mode)
|
'(LaTeX-mode TeX-mode)
|
||||||
|
|
|
@ -110,11 +110,6 @@
|
||||||
|
|
||||||
(global-set-key (kbd "C-=") 'er/expand-region)
|
(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 "C-c j") 'ace-jump-mode)
|
||||||
(global-set-key (kbd "s-.") 'ace-jump-mode)
|
(global-set-key (kbd "s-.") 'ace-jump-mode)
|
||||||
(global-set-key (kbd "C-c J") 'ace-jump-buffer)
|
(global-set-key (kbd "C-c J") 'ace-jump-buffer)
|
||||||
|
|
Loading…
Reference in a new issue