[Top][All Lists]

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

Re: more than one prefix argument

From: Andreas Röhler
Subject: Re: more than one prefix argument
Date: Wed, 27 Jul 2011 12:21:32 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv: Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11

Am 27.07.2011 11:48, schrieb Tim Cross:
[ ... ]
Don't suggest additional code but a better use of "P" - no parallel
implementations. Having "P" as a branch-flag not affected by "p"

Sorry, just not quite following your argument.

If we were to get rid of one, it would have to be the numeric version
(i.e. p) rather than P as sometimes you need to be able to distinguish
between nil and 1.

Could you give a case for that? IMHO we have to distinguish between nil and t at these occasions. Looks like wrongly reffered c-style limitation, which we gladly don't have business with.

Essentially, we would need the raw form.


We need a number or a boolean.
"p" should send a number, 1 as default.
"P" a boolean, nil as default.

This means
that whenever you need to process the prefix argument as a number you
will need to test and convert it to distinguish nil and extract the
value from the list - this would be additional code ini your function.

I don't understand what you mean by having a handy code for branching.
Can you give an example of how this code would work and how a command
using this code would be called?

How do you switch an alternative now?
Quite often that is done with an negative or positive numeric value.
(abbrev-mode -1)
(abbrev-mode 1)

Bad style IMHO, C-like obfuscating the code.

much better would be

(abbrev-mode nil)
(abbrev-mode t)




reply via email to

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