Ticket #11235: 11235_doc.patch

File 11235_doc.patch, 2.0 KB (added by jdemeyer, 9 years ago)
  • sage/misc/edit_module.py

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1327841925 -3600
    # Node ID 607e04b43c2c83b4c62a3ccb23801707af312cab
    # Parent  618db022122c3bb560b58d2243bd23243a593fdb
    Properly format EDITOR environment variable in docs
    
    diff --git a/sage/misc/edit_module.py b/sage/misc/edit_module.py
    a b  
    2020template. For a limited number of editors, templates are already known
    2121to the system. In those cases it suffices to give the editor name.
    2222
    23 In fact, if the environment variable EDITOR is set to a known editor,
     23In fact, if the environment variable :envvar:`EDITOR` is set to a known editor,
    2424then the system will use that if no template has been set explicitly.
    2525"""
    2626
     
    159159
    160160   It should reference ``${file}`` and ``${line}``. This routine normally
    161161   needs to be called prior to using 'edit'. However, if the editor
    162    set in the shell variable EDITOR is known, then the system will
     162   set in the shell variable :envvar:`EDITOR` is known, then the system will
    163163   substitute an appropriate template for you. See
    164164   edit_module.template_defaults for the recognised templates.
    165165
     
    248248      sage: m.edit_template.template
    249249      'vi -c ${line} ${file}'
    250250     
    251    And if your environment variable EDITOR is set to a recognised
     251   And if your environment variable :envvar:`EDITOR` is set to a recognised
    252252   editor, you would not have to set anything.
    253253     
    254254   To edit the source of an object, just type something like::
     
    299299        sage: %ed gcd           # indirect doctest, not tested
    300300
    301301    The above should open your favorite editor (as stored in the environment
    302     variable $EDITOR) with the file in which gcd is defined, and when your
     302    variable :envvar:`EDITOR`) with the file in which gcd is defined, and when your
    303303    editor supports it, also at the line in wich gcd is defined.
    304304    """
    305305    sageroot = sage.misc.sageinspect.SAGE_ROOT+'/'