home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 16 / 16.iso / w / w055 / 4.ddi / SOURCES.LIF / LOCAL.PEL < prev    next >
Encoding:
Text File  |  1990-09-27  |  7.7 KB  |  193 lines

  1. # $Header:   P:/source/ppee/macros/local.pev   1.23   18 Aug 1990 12:18:00   skipr  $
  2.  
  3. ##############################################################################
  4. #
  5. #           Sage Software - POLYTRON Division
  6. #             1700 NW 167th Place
  7. #               Beaverton, OR 97006
  8. #
  9. #   Copyright 1990, Sage Software, Inc.
  10. #
  11. #   Permission is hereby granted for licensed users of Sage Professional
  12. #   Editor and PolyAwk to copy and modify this source code for their own
  13. #   personal use.  These derivative works may be distributed only to other
  14. #   licensed Sage Professional Editor and PolyAwk users.  All other usage
  15. #   is prohibited without express written permission from Sage Software.
  16. #
  17. ##############################################################################
  18.  
  19. #### $Workfile:   local.pel  $: User's customized startup
  20.  
  21.  
  22. ###
  23. # Each user may have a local copy of this file in order to augment the 
  24. # standard macro library.  The function "local_setup" is called from within 
  25. # the startup function.
  26. #
  27. # As shipped, this function does virtually nothing.  However, sample code 
  28. # and advisory comments have been included to simplify the inclusion of 
  29. # popular customizations into a customer's local_setup function.  Some of 
  30. # the customizations interact, so this outline illuminates a path of least 
  31. # astonishment.
  32. #
  33. # If any changes are made to this or any other .pel source file, the
  34. # user must recompile the "sageedit.ae" file using the PEL utility.
  35. # (For details on how this is done, see chapter 10 in the User's Manual
  36. # entitled "Getting Started With PEL."
  37.  
  38. global function local_setup()
  39. {
  40.     ###
  41.     # (At this point in system initialization, no windows have yet been 
  42.     # created and a default system buffer named "Scratch" has been 
  43.     # initialized.)
  44.  
  45.     ###
  46.     # The emulation modes modify many system variables.  For your 
  47.     # customizations to persist, you probably should pick an emulation 
  48.     # mode before any other customization.  Pick only one from the 
  49.     # list below.
  50.  
  51.     # native()    # Sage Professional Editor's Native mode
  52.     # vi()
  53.     # brief()
  54.     # wordstar()
  55.     # epsilon()
  56.     # msword()
  57.  
  58.     ###
  59.     # There are several global parameters you may wish to modify:
  60.  
  61.     # pause_on_error = 1    # enable pausing after every error
  62.     # emm_available = 1    # enable use of EMS memory
  63.     # save_state = 1    # enable automatic state file saves/restores
  64.     # mouse_enabled = 0    # to disable the mouse no matter what
  65.  
  66.     # mouse_click_speed = 200    # check for double-clicks (may
  67.                     # impact tracking performance)
  68.  
  69.     # keyboard_speed( 10, 500 )    # slow-down keyboard speed
  70.                     # (10 CPS, after a 0.5 sec delay)
  71.  
  72.     ###
  73.     # Several features are enabled by some emulation modes but not by 
  74.     # others (or in some cases they're not enabled at all).  In any case 
  75.     # you may wish to override the defaults, and they generally should 
  76.     # be set AFTER you select an emulation mode.  The toggle_... 
  77.     # functions take an optional argument: 0=> disable, 1=> enable,  
  78.     # nothing=> toggle the current state.
  79.  
  80.     # toggle_file_locking( 1 )    # enable locking of edit files
  81.     # toggle_display( 1 )        # force 43/50 line mode (0=> 25 lines)
  82.     # toggle_dialog( 1 )        # one-line dialog window on last line
  83.     # toggle_clock( 1 )        # day-time clock in lower-right corner
  84.     # toggle_electric( 1 )        # electric C "code processing mode"
  85.     # toggle_auto_indent( 1 )    # auto-indent mode
  86.     # toggle_pvcs( 3 )        # automatic pvcs gets/puts, 
  87.                     #  see "pvcs.pel" for definition of "3"
  88.     # toggle_help( 1 )        # enable help/menu bar
  89.     # toggle_file_backup( 1 )    # enable file backups
  90.     # init_colors()            # create each new window with a new color
  91.     # autosave( 15 )            # autosave every 15 seconds
  92.     # toggle_pause( 1 )        # enable pause on errors/warnings
  93.     # toggle_search_case( 1 )    # enable case insensitivity searches (default is different for each keymap)
  94.     # toggle_search_regex( 1 )    # enable regular expression searches (default is different for each keymap)
  95.     # toggle_search_forward( 1 )    # enable forward searches (default is different for each keymap)
  96.     # toggle_search_block( 1 )    # enable block restricted searches (default is different for each keymap)
  97.  
  98.  
  99.     ###
  100.     # The toggle_... functions listed above affect the entire system.
  101.     # Several other toggle_... functions exist which only affect the
  102.     # current buffer or current window.  These can be used from the 
  103.     # command line or within other functions.
  104.     #
  105.  
  106.     # toggle_borders( 1 )      # enable display of window borders
  107.     # toggle_insert_mode( 1 )  # disable overtype mode
  108.     # toggle_linenumbers( 1 )  # enable display of line numbers
  109.     # toggle_real_space( 1 )   # disable entry into virtual space
  110.     # toggle_tabs_to_spaces(1) # enable conversion of tabs to spaces during edits
  111.     # toggle_wp( 1 )           # enable continuous word wrap
  112.     
  113.  
  114.     ###
  115.     # To modify the mode and operation of all regular buffers created 
  116.     # from this point on, modify the default_buffer_flags variable.
  117.     # Each flag has a unique affect on buffer edit operations.  See 
  118.     # "Library Reference" for more details.
  119.     #
  120.  
  121.     # set_default_buffer_flag( BUFFER_READ_ONLY, 1 )      # make all buffers read-only
  122.     # set_default_buffer_flag( BUFFER_OVERTYPE_MODE, 1 )  # make overtype mode the default
  123.     # set_default_buffer_flag( BUFFER_EXPAND_TABS, 1 )    # expand tabs on write
  124.     # set_default_buffer_flag( BUFFER_WP_ENABLED, 1 )     # enable continuous word wrap
  125.     # set_default_buffer_flag( BUFFER_REAL_SPACE_ONLY, 1 )# disable movement into virtual space
  126.     # set_default_buffer_flag( BUFFER_SNAP_TO_EOL, 1 )    # disable insertion past EOL
  127.     # set_default_buffer_flag( BUFFER_NO_UNDO, 1 )        # disable recording of undo information
  128.     # set_default_buffer_flag( BUFFER_TABS_TO_SPACES, 1 ) # enable convertion of tabs to spaces
  129.     # set_default_buffer_flag( BUFFER_WHOLE_LINES, 1 )    # enable display of whole lines
  130.  
  131.  
  132.     ###
  133.     # One may wish to override the default compiler used with a given
  134.     # filename extension.  The following example shows how to replace
  135.     # the default C compiler with Borland's Turbo C compiler:
  136.     #
  137.     # add_compiler( ".c .h", "tcc -c -w $<", "TurboC" )
  138.  
  139.  
  140.     ###
  141.     # All other custom initialization goes here.
  142.     #
  143.     #    eg., window colors, border styles, search flags,
  144.     #    refinements to emulation keymaps, etc.
  145.     #
  146.     #    If you wish the editor to start with other than a
  147.     #    full-screen window, it is sufficient to create that
  148.     #    window here.
  149.     #
  150.     #    Since an edit window has not yet been created, it's 
  151.     #    advisable to set default_... variables so they take effect
  152.     #    when windows are eventually created.
  153.  
  154.     # mouse_cursor_mask = 0x1700    # white on blue
  155.     # mouse_display_mask = 0x00FF
  156.  
  157.     # cursor_normal       = 0x0607    # normal cursor shape
  158.     # cursor_overtype       = 0x0007    # cursor in overtype mode
  159.     # cursor_virtual       = 0x0407    # cursor in virtual space
  160.     # cursor_virtual_overtype = 0x0003    # overtype in virtual space
  161.  
  162.     # color_text         = 0x170    # black on white, no blink
  163.     # color_background     = 0x170    # black on white, no blink
  164.     # color_highlight      = 0x0E0    # black on yellow 
  165.     # color_warnings     = 0x070    # yellow on white
  166.     # color_errors         = 0x076    # red (brown?) on white
  167.  
  168.  
  169.     ###
  170.     # other custom initialization or keymap definitions can go here...
  171.  
  172.  
  173.     ###
  174.     # After local_setup() exits, startup processing proceeds as follows:
  175.     #
  176.     # 1) The configuration/state file, SAGEEDIT.CFG, is processed.
  177.     # 2) Buffers are created for all files specified on the command line,
  178.     #    and command line switches are processed.
  179.     # 3) If no window has yet been created, a full-screen window is
  180.     #    initialized and attached to the first file on the command line.
  181.     #
  182.     # Upon completion of startup processing, the editor begins accepting
  183.     # commands from the user.
  184.  
  185. }
  186.  
  187.  
  188. ### additional custom startup function definitions go here,
  189. #    after local_startup():
  190.  
  191.  
  192.  
  193.