Ticket #11235: 11235-reviewer.patch

File 11235-reviewer.patch, 1.8 KB (added by mstreng, 10 years ago)

reST formatting, spelling, clarity

  • sage/misc/edit_module.py

    # HG changeset patch
    # User Marco Streng <marco.streng@gmail.com>
    # Date 1326388480 0
    # Node ID 7517f840dedae2527c3d412461c9023bbffe055c
    # Parent  b7e03fa8776dfbad18f59cc0e13f6d6b7454731b
    11235 documentation for %ed and edit_devel
    
    diff --git a/sage/misc/edit_module.py b/sage/misc/edit_module.py
    a b  
    285285
    286286def edit_devel(self, filename, linenum):
    287287    """
    288     This hook calls the default implementation but with a diffrent filename.
     288    This function is for internal use and is called by IPython when you use
     289    the IPython commands ``%edit`` or ``%ed``.
    289290
    290     If the filename begins with SAGE_ROOT/local/lib/python2.6/site-packages/
    291     it replaces this by SAGE_ROOT/devel/sage
     291    This hook calls the default implementation, but changes the filename for
     292    files that appear to be from the sage library: if the filename begins with
     293    SAGE_ROOT/local/lib/python.../site-packages/ it replaces this by
     294    SAGE_ROOT/devel/sage
    292295
    293     This function is called by IPython when you do either:
     296    EXAMPLES::
    294297
    295     sage: %edit gcd         # not tested
    296     sage: %ed gcd           # not tested
     298        sage: %edit gcd         # indirect doctest, not tested
     299        sage: %ed gcd           # indirect doctest, not tested
    297300
    298301    The above should open your favorite editor (as stored in the environment
    299     variable $EDITOR) with the file in witch gcd is defined, and when your
     302    variable $EDITOR) with the file in which gcd is defined, and when your
    300303    editor supports it, also at the line in wich gcd is defined.
    301304    """
    302305    sageroot = sage.misc.sageinspect.SAGE_ROOT+'/'
     
    305308    filename=re.sub(runpathpattern,develbranch,filename)
    306309    IPython.hooks.editor(self, filename, linenum)
    307310
     311
    308312ip = IPython.ipapi.get()
    309313if ip:
    310314    ip.set_hook('editor', edit_devel)