comparison etc/emacs.py @ 65673:df079883ac40

(ehelp): Add g and l to arg list, and use them in the call to `help'.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 24 Sep 2005 11:03:18 +0000
parents f05a048483cc
children e8a3fb527b77
comparison
equal deleted inserted replaced
65672:e60ed2bd9d3d 65673:df079883ac40
80 print '"%s"' % elt, 80 print '"%s"' % elt,
81 print ')' 81 print ')'
82 except: 82 except:
83 print '_emacs_out ()' 83 print '_emacs_out ()'
84 84
85 def ehelp (name): 85 def ehelp (name, g, l):
86 """Get help on string NAME. 86 """Get help on string NAME using globals G and locals L.
87 First try to eval name for, e.g. user definitions where we need 87 First try to eval name for, e.g. user definitions where we need
88 the object. Otherwise try the string form.""" 88 the object. Otherwise try the string form."""
89 try: help (eval (name)) 89 try: help (eval (name, g, l))
90 except: help (name) 90 except: help (name)
91 91
92 def eimport (mod, dir): 92 def eimport (mod, dir):
93 """Import module MOD with directory DIR at the head of the search path. 93 """Import module MOD with directory DIR at the head of the search path.
94 NB doesn't load from DIR if MOD shadows a system module.""" 94 NB doesn't load from DIR if MOD shadows a system module."""