GNU bug report logs -
#77464
X is already defined as something else than a generic function
Previous Next
Full log
View this message in rfc822 format
Hello Stefan
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>> Now that I have finally done that, I also managed to come of with a
>>> reproducer.
>>>
>>> 1. Create a file "demo.el" with contents:
>>>
>>> (require 'eieio)
>>> (defclass demo-class () ())
>>> (cl-defmethod demo-function ((obj demo-class)) obj)
>>>
>>> (error "something else goes wrong here")
>>> (provide 'demo)
>
> I pushed to `master` what I think should fix this problem.
> Can you try again?
That fixed the issue. It's now also easier to understand why, when and
how this avoids recording the location.
Of course that won't fix the issue for released Emacsen, and for anyone
who runs into this and has not seen this thread that continues to be
very confusing. Can you think of any workaround beside making sure that
each and every generic function is first declared using cl-defgeneric?
>> Then, after this function has returned, something else goes wrong (in
>> this reproducer intentionally). We can then observe that the value of
>> (symbol-function 'demo-function) somehow goes back to being 'dummy.
>> (I couldn't find anything else in Emacs that sets a symbol-function to
>> 'dummy.)
Could you please explain what was happening? To me this still looks
like the value somehow magically goes back to 'dummy.
Thanks!
Jonas
This bug report was last modified 61 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.