Helmut Eller e9626484@stud3.tuwien.ac.at writes:
Ivan Boldyrev boldyrev+nospam@cgitftp.uiggm.nsc.ru writes:
[snip]
If symbol exists, but is not function, error message is different:
(INTEGER -- Error in KERNEL:%COERCE-TO-FUNCTION: the function INTEGER is undefined.)
What would you like to see instead? Nothing? "<not available>"?
Well, if we're wishing...
This commonly happens when we're inside some kind of macro, such as CASE in Ivan's particular case, or DEFUN (in the arglist). While it may not be possible to solve the problem in full generality, for common-lisp symbols naming macros it is possible to know whether the user is currently in a region which is directly program text, or whether he is typing a case matching clause, or an arglist, or a DEFCLASS slot description. So given that, in an ideal world, rather than looking at the nearest open parenthesis, one would look further back and figure out the semantics of the current form, not just assume that it's a macro or function call.
On the other hand, firstly I know nothing about emacs programming, so this may be neither practical nor possible; nor am I volunteering to learn enough to be able to evaluate this, so please feel free to tell me that this is way too hard wishlist pie-in-the-sky.
Christophe