[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible bug in cua-mode: deactivates region
From: |
Teemu Likonen |
Subject: |
Possible bug in cua-mode: deactivates region |
Date: |
Mon, 24 Nov 2008 17:19:25 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
I noticed that in cua-mode the cursor-moving commands deactivate the
region when it is selected with M-h (mark-paragraph) in
transient-mark-mode.
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:
(add-hook 'cua-mode-hook
(lambda ()
(dolist (cmd '(forward-char
backward-char
previous-line
next-line
forward-paragraph
backward-paragraph
beginning-of-buffer
end-of-buffer))
(put cmd 'CUA nil))))
In other words, by setting the CUA property to nil for these commands
the region is not deactivated anymore. I'm quite a beginner with Emacs
so I don't know if this is a bug or just a result from something I don't
understand. I'd like to hear comments about this behavior.
(As a side note, I feel that it would be more logical if cua-mode's
rectangle support was a completely separate mode, like rectangle-mode,
and only Common User Access bindings were in the cua-mode.)
- Possible bug in cua-mode: deactivates region,
Teemu Likonen <=