[Top][All Lists]

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

Re: fset and error reporting

From: Jordon Biondo
Subject: Re: fset and error reporting
Date: Tue, 2 Sep 2014 14:42:36 -0400

It does not have to do with fset. Rather yes-or-no-p is a `subrp` and is being 
evaluated by  eval.c(eval_sub) and y-or-no-p is a `byte-code-function-p` 
evaluated by bytecode.c(exec_byte_code). These two functions both signal about 
incorrect number of args if needed, but pass different data in. bytecode.c 
seems to be the oddball as all such signals pass function name and number of 
args given but bytecode.c passes a cons with min/max args.

If you’re actually wondering why it was chosen that sometimes the cons cell is 
passed in and sometimes not, well I have no idea.

Hope it helps!


On Sep 2, 2014, at 1:33 PM, Dmitry Antipov <address@hidden> wrote:

> My .emacs has:
> (fset 'yes-or-no-p 'y-or-n-p)
> With -Q, I have:
> (yes-or-no-p) ==> Wrong number of arguments: yes-or-no-p, 0
> After loading .emacs, I have mysterious:
> (yes-or-no-p) ==> Wrong number of arguments: (1 . 1), 0
> Can someone explain why it is so?
> Dmitry

reply via email to

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