help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cua-mode makes active region disappear in transient-mark-mode


From: Teemu Likonen
Subject: Re: Cua-mode makes active region disappear in transient-mark-mode
Date: Mon, 24 Nov 2008 14:54:01 GMT
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Teemu Likonen (2008-11-24 09:24 +0000) wrote:

> I like cua-selection-mode for its rectangle support. Still, there is a
> serious annoyance to which I haven't found a solution. This affects
> region behavior in transient-mark-mode which I also use.
>
> When I select a paragraph with M-h (mark-paragraph) and move the point
> the region disappears if cua-mode is switched on. Without cua-mode I
> can move the edges of the region and it stays visible. This is the
> only reason why I don't keep cua-(selection-)mode on by default. Can I
> make cua-mode to not make active region disappear?

It turned out that the CUA property of these cursor moving commands
caused the funny things I described above. I fixed it with this 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))))

I really think that the rectangle support should be separated from cua
bindings, to something like rectangle-mode or visual-rectangle-mode.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]