[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Rationale behind conversion of a nil prefix arg to numeric 1
From: |
Drew Adams |
Subject: |
RE: Rationale behind conversion of a nil prefix arg to numeric 1 |
Date: |
Thu, 8 Sep 2016 08:40:38 -0700 (PDT) |
> I have read this thread as well as the other suggested readings. If the
> purpose of either p or P is to pass arguments, I do not understand the
> rationale of allowing C-u when using the interactive upper case P. As
> noted above, It returns an integer as the only element in a list, which
> if evaluated returns an error. Is there a use for this? Such as you may
> want an error?
Sorry, but I don't understand your question. What do you mean by
"allowing C-u when using the interactive upper case P"?
`C-u' with (interactive "P") does return `(4)' as the value of the
argument. But why do you ask about evaluating that list (value)?
Emacs Lisp uses strict evaluation of arguments to functions: all args
are evaluated before evaluation of the function body. `(4)' is the
"evaluated" value of the raw prefix argument - the function body
does not normally invoke `eval' on that to evaluate it again (which
would raise an error).
Maybe try to clarify your question. Consider showing an example.
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, (continued)
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Kaushal Modi, 2016/09/06
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Andreas Röhler, 2016/09/06
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Kaushal Modi, 2016/09/06
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Charles Millar, 2016/09/07
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Kaushal Modi, 2016/09/08
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Charles Millar, 2016/09/08
- RE: Rationale behind conversion of a nil prefix arg to numeric 1,
Drew Adams <=
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Andreas Röhler, 2016/09/06
- RE: Rationale behind conversion of a nil prefix arg to numeric 1, Drew Adams, 2016/09/05
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, Florian v. Savigny, 2016/09/05
- RE: Rationale behind conversion of a nil prefix arg to numeric 1, Drew Adams, 2016/09/05
- Re: Rationale behind conversion of a nil prefix arg to numeric 1, B.V. Raghav, 2016/09/05
Re: Rationale behind conversion of a nil prefix arg to numeric 1, Florian v. Savigny, 2016/09/04
Re: Rationale behind conversion of a nil prefix arg to numeric 1, Thien-Thi Nguyen, 2016/09/15