[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible bug in cua-mode: deactivates region
From: |
Teemu Likonen |
Subject: |
Re: Possible bug in cua-mode: deactivates region |
Date: |
Mon, 24 Nov 2008 20:13:19 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Teemu Likonen (2008-11-24 17:19 +0200) wrote:
> I like to use cua-mode only for its rectangle support so I have set
> cua-enable-cua-keys to nil. Still the normal region (selected with
> M-h) is deactivated when I move the cursor. It has something to do
> with CUA property since I managed to fix the issue with the following
> hook:
> In other words, by setting the CUA property to nil for these commands
> the region is not deactivated anymore.
Perhaps the following change would prevent cua-mode from changing these
properties when cua-enable-cua-keys is nil.
diff --git i/lisp/emulation/cua-base.el w/lisp/emulation/cua-base.el
index 8a366a2..b40497d 100644
--- i/lisp/emulation/cua-base.el
+++ w/lisp/emulation/cua-base.el
@@ -1150,8 +1150,10 @@ If ARG is the atom `-', scroll downward by nearly full
screen."
(scroll-up arg)
(end-of-buffer (goto-char (point-max)))))))
+(when cua-enable-cua-keys
(put 'cua-scroll-up 'CUA 'move)
(put 'cua-scroll-up 'isearch-scroll t)
+)
(defun cua-scroll-down (&optional arg)
"Scroll text of current window downward ARG lines; or near full screen if no
ARG.
@@ -1171,8 +1173,10 @@ If ARG is the atom `-', scroll upward by nearly full
screen."
(scroll-down arg)
(beginning-of-buffer (goto-char (point-min)))))))
+(when cua-enable-cua-keys
(put 'cua-scroll-down 'CUA 'move)
(put 'cua-scroll-down 'isearch-scroll t)
+)
;;; Cursor indications
@@ -1490,6 +1494,7 @@ If ARG is the atom `-', scroll upward by nearly full
screen."
;; Setup standard movement commands to be recognized by CUA.
+(when cua-enable-cua-keys
(dolist (cmd
'(forward-char backward-char
next-line previous-line
@@ -1505,6 +1510,7 @@ If ARG is the atom `-', scroll upward by nearly full
screen."
forward-sentence backward-sentence
forward-paragraph backward-paragraph))
(put cmd 'CUA 'move))
+)
;; State prior to enabling cua-mode
;; Value is a list with the following elements: