[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CUA mode cursor color
From: |
Miles Bader |
Subject: |
Re: CUA mode cursor color |
Date: |
14 May 2002 08:52:49 +0900 |
Richard Stallman <address@hidden> writes:
> If you have transient-mark-mode enabled, turning on cua-mode and
> then turning it off again leaves transient-mark-mode disabled;
> it would be much better to leave it in whatever state it was in
> originally.
>
> It would be nice, but I think it is impossible to find a way to handle
> this that gives in all cases the result that you would consider
> correct.
Maybe it's a hard problem in general, but it doesn't seem hard to do a
very good job in this case:
cua-mode can record whether transient-mark-mode was enabled when it
was turned on, by setting variable `cua-mode-tmm-was-enabled' to t.
Then when cua-mode is turned off, only disable transient-mark-mode if
`cua-mode-tmm-was-enabled' is nil (otherwise, just do nothing).
This only fails in the most bizarre of cases; for instance:
if t-m-m is disabled, and the user turns on cua-mode, and then turns off
t-m-m and then turns t-m-m back on, and somehow expects it to then
`stick' if he subsequently turns off cua-mode. This seems like a very
unlikely scenario.
A bigger problem would be if multiple modes (including cua-mode) try to
turn on t-m-m for their own usage; then things would probably get hairy.
Currently this doesn't seem to be the case (and if this happens, we
could just design some mechanism to deal with it, e.g., ref-counting
uses of t-m-m).
-Miles
--
`...the Soviet Union was sliding in to an economic collapse so comprehensive
that in the end its factories produced not goods but bads: finished products
less valuable than the raw materials they were made from.' [The Economist]
- Re: CUA mode cursor color, (continued)
- Re: CUA mode cursor color, Alex Schroeder, 2002/05/13
- Re: CUA mode cursor color, Richard Stallman, 2002/05/15
- Re: CUA mode cursor color, Richard Stallman, 2002/05/14
- Re: CUA mode cursor color, Miles Bader, 2002/05/13
- Re: CUA mode cursor color, Richard Stallman, 2002/05/15
Re: CUA mode cursor color, Richard Stallman, 2002/05/13
Re: CUA mode cursor color, Kim F. Storm, 2002/05/13
Re: CUA mode cursor color, Ehud Karni, 2002/05/13
Re: CUA mode cursor color, Richard Stallman, 2002/05/13
Re: CUA mode cursor color, Kim F. Storm, 2002/05/13