[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Passing Multiplie Arguments in the mini buffer
From: |
Kevin Rodgers |
Subject: |
Re: Passing Multiplie Arguments in the mini buffer |
Date: |
Mon, 02 Aug 2004 10:12:06 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
Kai Grossjohann wrote:
> exits funnel <exitsfunnel@yahoo.com> writes:
>>However, according to it's doc string move-to-column takes, in
>>addition to the first argument, a second optional one. How can I
>>pass this second argument if I'm issuing the function interactively?
>
> I think there is no obvious way. Of course, you can cheat by doing
>
> M-: (move-to-column 42 t) RET
>
> But that's, well, cheating. Please note that M-: and M-x are not the
> same. I really meant M-:.
You could cheat even more by specifying a different interactive
interface, via defadvice. :-) I gave it a try, but haven't quite got
it working:
(defadvice move-to-column (before interactive activate)
"When called interactivly, prompt for COLUMN and interpret a prefix arg
to mean FORCE."
(interactive "nColumn: \nP")
The first part does what I'd hoped: I'm prompted for the column, and
that's where Emacs moves point to. But the "P" interactive spec
doesn't seem to have any effect, and neither did setting force
explicitly: (ad-set-arg 1 current-prefix-arg)
--
Kevin Rodgers