emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: M-\ does not work with prefix argument as documented


From: Kevin Rodgers
Subject: Re: M-\ does not work with prefix argument as documented
Date: Mon, 18 Dec 2006 17:07:58 -0700
User-agent: Thunderbird 1.5.0.8 (Windows/20061025)

Dieter Wilhelm wrote:
Kevin Rodgers <address@hidden> writes:
Dieter Wilhelm wrote:
...
Neither the Emacs manual nor the delete-horizontal-space's doc string
says anything about how prefix args are handled.  But it seems like a

You're right, I interpreted the documentation in this way because I
wanted M-\ to work also with a prefix argument.  My notion was that a
numeric argument to an interactive function means implicitly that a
prefix argument must be working as well.  The next time I'll be
looking out for the word prefix.

Thank you for installing your patch. (You did install it, didn't you?)

No, I don't have that permission.  But RMS posted a similar patch,
so I assume that was committed.  The main difference was that my patch
included changes to the doc string and the manual.

Could you, please, also make the command symmetric? For example
negative arguments are killing on the left hand side of the point and
positive arguments on the left hand side.  The default would remain as
is.  (There was recently a request--unrelated to M-\--for such a
feature on gnu.emacs.help, killing white space left or right of the
cursor).
>>
That would be cool.

8-), OK, I'll have a go at it.  But probably only after the release.

What I need to know is how could I distinguish in the function whether
the user gave a prefix argument '1' or whether it was the default
argument '1'?  The default argument would mean kill on both sides, the
same numerical value would mean just kill to the right.  Is it
possible to intercept the argument before the (interactive "*p") form
is evaluated?

I think that would be a poor interface: for any command foo that takes
a numeric argument, `M-x foo' and `M-1 M-x foo' ought to mean the same
thing.

But yes, you can examine the value of current-prefix-arg, which will
be nil in the `M-x foo' case.

--
Kevin





reply via email to

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