[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How run a command JUST on region highlighted by MOUSE?!?!
From: |
Kevin Rodgers |
Subject: |
Re: How run a command JUST on region highlighted by MOUSE?!?! |
Date: |
Wed, 03 Sep 2003 17:13:42 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
Christian Seberino wrote:
What does the (interactive "r") do??? I really ONLY ever invoke my
functions
with key-combos that are hard wired to start the functions....e.g.
C-ac, C-z, etc....
Does this mean I can omit all this (interactive ..) stuff from .emacs
everywhere???
No, the interactive form allows the function to be bound to a key and
specifies what values its arguments (if any) get when it is invoked
interactively (i.e. via a key binding or `M-x').
It appears that beg and end got automagically set when I dragged mouse
over some region.
Exactly!
It also appears that although py-comment-region did not need it's 2
args
without narrow-to-region part... it does now when I add the
narrow-to-region
part and that was the main bug.
That doesn't make sense to me.
Thank goodness it works but there is a lot going on I don't understand
here
about how arguments get defined and (interactive..) function. Any
help would
be greatly appreciated.
Everything you need to know is availabel via its doc string (`C-h v
interactive')
and in the Emacs Lisp manual.
--
Kevin Rodgers