[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cua-mode and cua-replace-region
From: |
bigfaceworm |
Subject: |
Re: cua-mode and cua-replace-region |
Date: |
Thu, 13 Nov 2008 11:39:00 -0800 (PST) |
User-agent: |
G2/1.0 |
On Nov 13, 11:20 am, bigfaceworm <bigfacew...@gmail.com> wrote:
> basically, I want the cua-rectangle editing, and none of the rest.
Modifying cua--select-keymaps to always set cua--ena-region-keymap to
nil seemed to have the effect I wanted.
Any better ways?
(defun cua--select-keymaps ()
;; Setup conditions for selecting the proper keymaps in cua--keymap-
alist.
(setq cua--ena-region-keymap
nil) ;; THIS IS THE CHANGE, was (and mark-active (not
deactivate-mark))
(setq cua--ena-prefix-override-keymap
(and cua--ena-region-keymap
cua-enable-cua-keys
(not cua-inhibit-cua-keys)
(or (eq cua-enable-cua-keys t)
(not cua--explicit-region-start))
(not executing-kbd-macro)
(not cua--prefix-override-timer)))
(setq cua--ena-prefix-repeat-keymap
(and cua--ena-region-keymap
(or (timerp cua--prefix-override-timer)
(eq cua--prefix-override-timer 'shift))))
(setq cua--ena-cua-keys-keymap
(and cua-enable-cua-keys
(not cua-inhibit-cua-keys)
(or (eq cua-enable-cua-keys t)
cua--last-region-shifted)))
(setq cua--ena-global-mark-keymap
(and cua--global-mark-active
(not (window-minibuffer-p)))))
TJ