emacs-devel
[Top][All Lists]
Advanced

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

Reporting Lisp errors in dynamic modules


From: Eli Zaretskii
Subject: Reporting Lisp errors in dynamic modules
Date: Fri, 27 Nov 2015 13:07:01 +0200

With the latest emacs-25 branch, load modules/mod-test/mod-test.so,
then evaluate '(mod-test-sum "1" 2)'.  The backtrace that pops up is
this:

  Debugger entered--Lisp error: (wrong-type-argument integerp "1")
    #<subr module-call>(#<save-value <pointer 00fdab90> <unused> <unused> 
<unused>> ("1" 2))
    mod-test-sum("1" 2)
    eval((mod-test-sum "1" 2) nil)
    elisp--eval-last-sexp(nil)
    eval-last-sexp(nil)
    funcall-interactively(eval-last-sexp nil)
    call-interactively(eval-last-sexp nil nil)
    command-execute(eval-last-sexp)

I believe the line with "<subr module-call>" is suboptimal, in that it
looks alien and includes all kinds of unneeded and weirdly formatted
data.  AFAIU, the reason is that we deliberately unintern module-call.
Should we perhaps reconsider that decision, so that the backtrace is
in more familiar form?  What exactly are the dangers of having
module-call exposed as any other primitive?



reply via email to

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