[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tue, 18 Feb 2003 11:15:22 -0700
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2
Dan Jacobson wrote:
"K" == Kevin Rodgers <address@hidden> writes:
K> Dan Jacobson wrote:
I wanted to have emacs stop if it ever called a function, but no:
debug-on-entry: Function base64-encode-region is a primitive
I don't need to debug inside that function. All I wanted was to see a
backtrace so I can tell the layers of stuff calling that function.
K> (defadvice base64-encode-region (before debug activate)
K> "Debug (when called from an Emacs Lisp function)."
OK, maybe this could be the guts of the new debug-on-call function, or
at least documented as what to do when debug-on-entry isn't usable...
Please find attached a tentative user (i.e. non-integrated) implementation.
Of course an antidote should also be provided to turn it off.
Yep, but I haven't gotten that far yet.
P.S. Kev, your References:
<address@hidden> does not give my
original post the fame and glory of its original Message-ID causing
its thread to be broken 'in many newsreaders'.
That's odd, google finds it under that Message-ID. I used
From: Dan Jacobson <address@hidden>
Date: 01 Feb 2003 03:03:22 +0800
Sender: news <address@hidden>
Reply-To: Dan Jacobson <address@hidden>
Did you try reading
this group via NNTP of gmane.org for maximal comfort?
I primarily read gnu.emacs.bug and only check gmane.emacs.bug (both via
NNTPSERVER=news.cis.dfn.de) to make sure I don't miss any articles.
<a href="mailto:<firstname.lastname@example.org>">Kevin Rodgers</a>
(defadvice debug-on-entry (around advise-primitive activate)
"If an error is signalled because FUNCTION is a primitive, query the user
whether to debug Lisp calls via `defadvice'."
(error (let ((error-message (format "Function %s is a primitive"
(if (and (equal (car (cdr condition-data)) error-message)
"; debug Lisp calls via defadvice? ")))
(eval `(defadvice ,(ad-get-arg 0) (before debug activate)
"Debug (when called from an Emacs Lisp function)."
(signal 'error (cdr condition-data)))))))
;; (defadvice cancel-debug-on-entry (around advise-primitive activate)
Re: debug-on-call, Richard Stallman, 2003/02/04
Message not available