Re: Line number and source file names in stack trace, part 1

From: Michael Hohn <>
Date: Fri, 31 Dec 1999 15:02:47 -0700 (MST)

> How about this:
> o introduce globals *source-info-keep* (a flag, default #f) and
> *source-info-table* (the hash table)
> o change the reader to check *source-info-keep* -- a (slight?) speed
> penalty
> o change error.stk to incorporate available information in stack dumps
> The hash table should pose no significant speed penalty, and by
> separating flag and table, debugging information can be kept
> selectively.
> Any other suggestions/ideas?
   Yes this was the kind of thing I'm thinking of. Perhaps a better
   approach would be that to use a hook function rather than a hash
   table (a little bit like the report-error procedure). For instance,
   you can have a variable register-cons (or any better name) which is
Good idea. I've been using emacs for 6 years, and never thought about
using a hook function here... Maybe I spent too much time using
batch-oriented statically typed languages.

I'll (try to) implement the following, as suggested by Erick:
o Introduce global definition *read-hook*, defaulting to #f
o Modify the reader to check *read-hook*, treating it as
     (lambda (file-name line-number)) when not #f, and calling it while

Happy New Year!
Received on Sat Jan 01 2000 - 01:42:55 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST