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

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

RE: [h-e-w] cua-mode and comment-region


From: Molitor, Stephen
Subject: RE: [h-e-w] cua-mode and comment-region
Date: Thu, 21 Feb 2002 11:00:14 -0600

Cool.  Is there any way to get it to call uncomment-region, if there's a prefix arg, and an active region.  I used to do M-- C-c C-c (ALT minus, CONTROL-c, CONTROL-c) to do that.
 
Steve Molitor
address@hidden
-----Original Message-----
From: Nascif Abousalh-Neto [mailto:address@hidden
Sent: Thursday, February 21, 2002 10:14 AM
To: Daniel Hegyi; address@hidden
Cc: address@hidden
Subject: RE: [h-e-w] cua-mode and comment-region

Hi Daniel,

Try this. It is more flexible then C-c ; and don't interfere with cua.el

M-; runs the command comment-dwim
   which is an interactive compiled Lisp function in `newcomment'.
(comment-dwim ARG)

Call the comment command you want (Do What I Mean).
If the region is active and `transient-mark-mode' is on, call
  `comment-region' (unless it only consists of comments, in which
  case it calls `uncomment-region').
Else, if the current line is empty, insert a comment and indent it.
Else if a prefix ARG is specified, call `comment-kill'.
Else, call `comment-indent'.

> -----Original Message-----
> From: Daniel Hegyi [mailto:address@hidden]
> Sent: Thursday, February 21, 2002 10:22 AM
> To: address@hidden
> Cc: address@hidden
> Subject: Re: [h-e-w] cua-mode and comment-region
>
>
> I downloaded the latest cua.el from
> http://www.cua.dk/cua.html. (I had a
> very old one.)
>
> I still can't get my "\C-c;" keybinding for comment-region
> working. If I
> press the Control key twice and then the semicolon or if I press the
> keybinding with the SHIFT key down it works.
>
> I tried setting the Cua Mode Inhibit Method variable to
> "delay" for the
> current session, but it still didn't work.
>
> Any ideas?
>
> Thanks,
> Daniel
>
>
> >From: Stefan Reichör <address@hidden>
> >To: "Daniel Hegyi" <address@hidden>
> >CC: address@hidden
> >Subject: Re: [h-e-w] cua-mode and comment-region
> >Date: Thu, 21 Feb 2002 09:46:27 +0100
> >
> >"Daniel Hegyi" <address@hidden> writes:
> >
> > > Hi,
> > >
> > > I recently installed the cua package. Since then I can't use the
> > > "\C-c;" key-binding to do comment-region, because when I highlight
> > > something and want to use these key-bindings it just
> copies the region
> > > and inserts a semicolon.
> > >
> > > Is there a workaround for this?
> > >
> > >
> > > Regards,
> > > Daniel
> > >
> >
> >Look at the documentation in cua.el:
> >;; If you really need to perform a command which starts with one of
> >;; the prefix keys even when the region is active, you have
> three options:
> >;; - press the prefix key twice very quickly (within 0.2 seconds),
> >;; - press the prefix key and the following key within 0.2
> seconds), or
> >;; - use the SHIFT key with the prefix key, i.e. C-X or C-C
> >;;
> >;; This behaviour is controlled via the CUA-mode-inhibit-method and
> >;; CUA-mode-inhibit-delay variables.
> >
> >There are some other goodies (especially the rectangular support,
> >started with shift+enter)
> >
> >So cua.el is worth a look to find out more about cua.el
> >
> >--
> >Stefan.
> >
> >
>
>
>
>
> _________________________________________________________________
> Join the world's largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
>


reply via email to

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