/[guile]/guile/guile-core/lang/elisp/variables.scm
ViewVC logotype

Diff of /guile/guile-core/lang/elisp/variables.scm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by ossau, Sat Oct 27 23:39:14 2001 UTC revision 1.2 by ossau, Tue Jan 22 23:46:01 2002 UTC
# Line 0  Line 1 
1    (define-module (lang elisp variables))
2    
3    ;;; The only purpose of this module is to provide a place where the
4    ;;; variables holding Elisp function definitions can be bound to
5    ;;; symbols.
6    ;;;
7    ;;; This can be useful when looking at unmemoized procedure source
8    ;;; code for Elisp functions and macros.  Elisp function and macro
9    ;;; symbols get memoized into variables.  When the unmemoizer tries to
10    ;;; unmemoize a variables, it does so by looking for a symbol that is
11    ;;; bound to that variable, starting from the module in which the
12    ;;; function or macro was defined and then trying the interfaces on
13    ;;; that module's uses list.  If it can't find any such symbol, it
14    ;;; returns the symbol '???.
15    ;;;
16    ;;; Normally we don't want to bind Elisp function definition variables
17    ;;; to symbols that are visible from the Elisp evaluation module (lang
18    ;;; elisp base), because they would pollute the namespace available
19    ;;; to Elisp variables.  On the other hand, if we are trying to debug
20    ;;; something, and looking at unmemoized source code, it's far more
21    ;;; informative if that code has symbols that indicate the Elisp
22    ;;; function being called than if it just says ??? everywhere.
23    ;;;
24    ;;; So we have a compromise, which achieves a reasonable balance of
25    ;;; correctness (for general operation) and convenience (for
26    ;;; debugging).
27    ;;;
28    ;;; 1. We bind Elisp function definition variables to symbols in this
29    ;;; module (lang elisp variables).
30    ;;;
31    ;;; 2. By default, the Elisp evaluation module (lang elisp base) does
32    ;;; not use (lang elisp variables), so the Elisp variable namespace
33    ;;; stays clean.
34    ;;;
35    ;;; 3. When debugging, a simple (named-module-use! '(lang elisp base)
36    ;;; '(lang elisp variables)) makes the function definition symbols
37    ;;; visible in (lang elisp base) so that the unmemoizer can find
38    ;;; them, which makes the unmemoized source code much easier to read.
39    ;;;
40    ;;; 4. To reduce the effects of namespace pollution even after step 3,
41    ;;; the symbols that we bind are all prefixed with `<elisp' and
42    ;;; suffixed with `>'.

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26