emacs-devel
[Top][All Lists]
Advanced

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

Re: Macro CHECK_NUMBER?


From: Richard Stallman
Subject: Re: Macro CHECK_NUMBER?
Date: Sun, 28 Oct 2001 07:07:49 -0700 (MST)

    #define CHECK_NUMBER(x, i) \
      do { if (!INTEGERP ((x))) x = wrong_type_argument (Qintegerp, (x)); } 
while (0)

    What is the purpose of having two arguments? What is the meaning of i?

Originally Emacs would let you continue from an error signal, and I
thought that wrong_type_argument errors ought to include the functoin
name and the argument number which has the wrong type, so that
handlers could take specific actions for specific situations.

But I never finished implementing that, and later I changed things so
that continuing from an error was impossible.  Then I decided that
there was no point actually including the argument number in the error
data.  (The function name was never included in the error data.)
Practically speaking it doesn't seem to be useful to try to handle
errors except in very general ways.

The arg number is present in the calls to CHECK_... as a relic,
because I wasn't COMPLETELY sure they should be removed, and it was
less work to maintain them than to remove them.

If someone wants to remove them, at this point I would say ok.




reply via email to

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