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

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

RE: Prefix-Arg (non-interactive!) in Info


From: Drew Adams
Subject: RE: Prefix-Arg (non-interactive!) in Info
Date: Fri, 13 Aug 2010 13:33:24 -0700

> I remember seeing it when I searched, but I dismissed it too quickly.
> Curious, an 'integer', or a 'list of one element' ... which is an
> integer.
> 
> Well, thats then the way it is.

No, this is not just a curiosity. 

If you read a bit about nil, you will see that it can act in Lisp in two
important ways:

1. It represents (it is) an empty list.
2. It represents false, with non-nil representing true.

Instead of false and true, think alligator and non-alligator: _any_ dichotomous
choice.

The _raw_ prefix arg is most often looked at as a boolean choice: nil or
non-nil, the particular non-nil value making no difference.

But a non-nil value can be, well, anything other than nil. And that means that a
program is free to attach different meanings (behaviors) to different non-nil
values.

In addition, a non-nil raw prefix argument, which can be one of several things
(an integer, the atom `-', a cons with integer car, etc.) also has an associated
numeric value, given by function `prefix-numeric-value'.

A given function could, if it wanted, produce different behaviors for different
numerical values of its prefix arg.  Or, for a cons value, it could produce
different behaviors depending on which integer is the car of its cons value (4,
16, 256,...).  And it can mix these possibilities.  The possibilities are
endless (there are an endless number of integers, for one thing).




reply via email to

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