|
From: | Lennart Borgman (gmail) |
Subject: | Re: Toio little error information from widgets |
Date: | Thu, 08 Feb 2007 00:47:20 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 |
Lennart Borgman (gmail) wrote:
Daniel Brockman wrote:"Lennart Borgman (gmail)" <address@hidden> writes:;;(or (eq value 'fundamental-mode) (intern-soft (concat sym-name "-hook")) (boundp (intern-soft (concat sym-name "-hook")))) ;;)This part does not make sense: (or (intern-soft (concat sym-name "-hook")) (boundp (intern-soft (boncat sym-name "-hook")))) In general, nothing that looks like this can make sense, (or FOO (boundp FOO)) because `boundp' will only ever be called if FOO is nil.Thamnks. Sorry, I just added the "fundamental-mode" line to make it more clear when I posted. I missed to put and "add" around the following two lines.It should be ;;(or (eq value 'fundamental-mode) ;; (and (intern-soft (concat sym-name "-hook")) (boundp (intern-soft (concat sym-name "-hook")))) ;;))Both the "fundamental-line" and the "and" line must be uncommented to get it working.
I looked a little bit further. The error (which a bit surprisingly is "End of file during parsing") happens in `widget-apply' which is called from `widget-insert-button-action'.
`widget-apply' internally calls Fapply, which is `apply'. The message buffer contains Debug on Error enabled globally End of file during parsing Back to top level.There is no problem just calling a function which gets an error during apply, something like this
(defun temp-bad-div(x) (interactive "nNumber: ") (message "%s" (apply '/ 100 (list x)))) This gives the trace-back I expect if called with x=0. `widget-apply' is very short and the crucial part looks like GCPRO2 (newargs[0], newargs[2]); result = Fapply (3, newargs); UNGCPRO;However i have not much idea about what GCPRO2 does so maybe someone who knows that can look a bit further? Why does not the trace-back appear here?
[Prev in Thread] | Current Thread | [Next in Thread] |