[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).

`...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]

reply via email to

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