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

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

Re: Turn off selection coloring


From: Tassilo Horn
Subject: Re: Turn off selection coloring
Date: Fri, 18 Sep 2009 07:49:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Harry Putnam <reader@newsguy.com> writes:

Hi Harry,

>> [1] Some commands behave differently when the mark is active of
>> deactivated.  This can be very handy, although this feature isn't
>> used too much till now.
>
> It is mostly the color but I guess the stickyness I seem to see might
> be a problem without the color... Its likely I'd have selected regions
> and not know it...  Not sure how much havoc that might lead too, but I
> don't remember it being a problem before the advent of the coloring.
>
> But then I guess you are saying there other changes that go along with
> a selected region.

Indeed.

> I have a hunch it would take me mnths or even yrs to notice which
> behaved in a way I'd like.  Can you spell them out a bit more?

Sure.  `ispell-word' has a different behavior when a region is active.

,----[ C-h f ispell-word RET ]
| ispell-word is an interactive compiled Lisp function in `ispell.el'.
| 
| It is bound to M-$, <menu-bar> <tools> <spell> <ispell-word>.
| 
| (ispell-word &optional following quietly continue region)
| 
| Check spelling of word under or before the cursor.
|
| [...]
| 
| Interactively, in Transient Mark mode when the mark is active, call
| `ispell-region' to check the active region for spelling errors.
`----

A quick grep through the emacs sources reveals, that at least those
modes make use of this new feature.

,----
| lisp/allout.el:  (cond ((fboundp 'use-region-p) '(use-region-p))
| lisp/indent.el:   ((use-region-p)
| lisp/org/org-compat.el:         (use-region-p)
| lisp/proced.el:      (if (use-region-p)
| lisp/proced.el:    (cond ((use-region-p) ;; Omit active region
| lisp/progmodes/ada-mode.el:      (use-region-p)
| lisp/progmodes/cc-cmds.el:   (list current-prefix-arg (use-region-p)))
| lisp/progmodes/delphi.el:  (cond ((use-region-p)
| lisp/progmodes/idlwave.el:      (use-region-p)
| lisp/progmodes/perl-mode.el:  (cond ((use-region-p)            ; indent the 
active region
| lisp/progmodes/vera-mode.el:  (cond ((and (not (featurep 'xemacs)) 
(use-region-p))
| lisp/progmodes/vhdl-mode.el:    ((and (not (featurep 'xemacs)) (use-region-p))
| lisp/textmodes/conf-mode.el:      (when (use-region-p)
| lisp/textmodes/ispell.el:   ((and region (use-region-p))
| lisp/textmodes/reftex.el:      (use-region-p)
| lisp/tooltip.el:  `(use-region-p))
| lisp/vc-dir.el:  (if (use-region-p)
`----

But reading the docs, you can put

  (transient-mark-mode -1)

into your .emacs to turn it off, and only when you want to use the
special active region features, you turn it on for the following command
with `C-SPC C-SPC'.  Then you have the coloring and special region
handling only when you really want it.

Bye,
Tassilo





reply via email to

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