diff options
| -rw-r--r-- | etc/ChangeLog | 4 | ||||
| -rw-r--r-- | etc/emacs.py | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog index 0d61048a858..ec2b017c25c 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2006-08-20 Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> (tiny change) | ||
| 2 | |||
| 3 | * emacs.py (eexecfile): Use the __main__ rather than `emacs' namespace. | ||
| 4 | |||
| 1 | 2006-08-18 Primoz PETERLIN <primoz.peterlin@mf.uni-lj.si> | 5 | 2006-08-18 Primoz PETERLIN <primoz.peterlin@mf.uni-lj.si> |
| 2 | 6 | ||
| 3 | * TUTORIAL.sl: Synchronize with TUTORIAL. | 7 | * TUTORIAL.sl: Synchronize with TUTORIAL. |
diff --git a/etc/emacs.py b/etc/emacs.py index 9538b0b7127..bc6c5bb034d 100644 --- a/etc/emacs.py +++ b/etc/emacs.py | |||
| @@ -26,13 +26,14 @@ __all__ = ["eexecfile", "args", "complete", "ehelp", "eimport"] | |||
| 26 | 26 | ||
| 27 | def eexecfile (file): | 27 | def eexecfile (file): |
| 28 | """Execute FILE and then remove it. | 28 | """Execute FILE and then remove it. |
| 29 | Execute the file within the __main__ namespace. | ||
| 29 | If we get an exception, print a traceback with the top frame | 30 | If we get an exception, print a traceback with the top frame |
| 30 | (oursleves) excluded.""" | 31 | (ourselves) excluded.""" |
| 31 | try: | 32 | try: |
| 32 | try: execfile (file, globals (), globals ()) | 33 | try: execfile (file, __main__.__dict__) |
| 33 | except: | 34 | except: |
| 34 | (type, value, tb) = sys.exc_info () | 35 | (type, value, tb) = sys.exc_info () |
| 35 | # Lose the stack frame for this location. | 36 | # Lose the stack frame for this location. |
| 36 | tb = tb.tb_next | 37 | tb = tb.tb_next |
| 37 | if tb is None: # print_exception won't do it | 38 | if tb is None: # print_exception won't do it |
| 38 | print "Traceback (most recent call last):" | 39 | print "Traceback (most recent call last):" |