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

[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.



reply via email to

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