all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Memnon Anon'" <gegendosenfleisch@googlemail.com>
Cc: help-gnu-emacs@gnu.org
Subject: RE: Prefix-Arg (non-interactive!) in Info
Date: Fri, 13 Aug 2010 13:33:24 -0700	[thread overview]
Message-ID: <785218C66A0048DBB2DE688D28131E06@us.oracle.com> (raw)
In-Reply-To: <874oeytlmx.fsf@mean.albasani.net>

> 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	other threads:[~2010-08-13 20:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-13 14:37 Prefix-Arg (non-interactive!) in Info Memnon Anon
2010-08-13 15:17 ` Eli Zaretskii
2010-08-13 15:50   ` Memnon Anon
2010-08-13 16:09     ` Eli Zaretskii
2010-08-13 16:21       ` Drew Adams
2010-08-13 18:36         ` Memnon Anon
2010-08-13 20:33           ` Drew Adams [this message]
2010-08-13 17:04       ` Memnon Anon
2010-08-13 17:40         ` Andreas Röhler
2010-08-13 21:04           ` Memnon Anon
2010-08-13 19:33         ` Eli Zaretskii
2010-08-13 20:58           ` [Solved] (was: Prefix-Arg (non-interactive!) in Info) Memnon Anon
2010-08-14  8:05             ` Eli Zaretskii
2010-08-14 21:18               ` [Solved] Memnon Anon
2010-08-14 22:27                 ` [Solved] Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=785218C66A0048DBB2DE688D28131E06@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=gegendosenfleisch@googlemail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.