home *** CD-ROM | disk | FTP | other *** search
- # $Header: P:/source/ppee/macros/local.pev 1.23 18 Aug 1990 12:18:00 skipr $
-
- ##############################################################################
- #
- # Sage Software - POLYTRON Division
- # 1700 NW 167th Place
- # Beaverton, OR 97006
- #
- # Copyright 1990, Sage Software, Inc.
- #
- # Permission is hereby granted for licensed users of Sage Professional
- # Editor and PolyAwk to copy and modify this source code for their own
- # personal use. These derivative works may be distributed only to other
- # licensed Sage Professional Editor and PolyAwk users. All other usage
- # is prohibited without express written permission from Sage Software.
- #
- ##############################################################################
-
- #### $Workfile: local.pel $: User's customized startup
-
-
- ###
- # Each user may have a local copy of this file in order to augment the
- # standard macro library. The function "local_setup" is called from within
- # the startup function.
- #
- # As shipped, this function does virtually nothing. However, sample code
- # and advisory comments have been included to simplify the inclusion of
- # popular customizations into a customer's local_setup function. Some of
- # the customizations interact, so this outline illuminates a path of least
- # astonishment.
- #
- # If any changes are made to this or any other .pel source file, the
- # user must recompile the "sageedit.ae" file using the PEL utility.
- # (For details on how this is done, see chapter 10 in the User's Manual
- # entitled "Getting Started With PEL."
-
- global function local_setup()
- {
- ###
- # (At this point in system initialization, no windows have yet been
- # created and a default system buffer named "Scratch" has been
- # initialized.)
-
- ###
- # The emulation modes modify many system variables. For your
- # customizations to persist, you probably should pick an emulation
- # mode before any other customization. Pick only one from the
- # list below.
-
- # native() # Sage Professional Editor's Native mode
- # vi()
- # brief()
- # wordstar()
- # epsilon()
- # msword()
-
- ###
- # There are several global parameters you may wish to modify:
-
- # pause_on_error = 1 # enable pausing after every error
- # emm_available = 1 # enable use of EMS memory
- # save_state = 1 # enable automatic state file saves/restores
- # mouse_enabled = 0 # to disable the mouse no matter what
-
- # mouse_click_speed = 200 # check for double-clicks (may
- # impact tracking performance)
-
- # keyboard_speed( 10, 500 ) # slow-down keyboard speed
- # (10 CPS, after a 0.5 sec delay)
-
- ###
- # Several features are enabled by some emulation modes but not by
- # others (or in some cases they're not enabled at all). In any case
- # you may wish to override the defaults, and they generally should
- # be set AFTER you select an emulation mode. The toggle_...
- # functions take an optional argument: 0=> disable, 1=> enable,
- # nothing=> toggle the current state.
-
- # toggle_file_locking( 1 ) # enable locking of edit files
- # toggle_display( 1 ) # force 43/50 line mode (0=> 25 lines)
- # toggle_dialog( 1 ) # one-line dialog window on last line
- # toggle_clock( 1 ) # day-time clock in lower-right corner
- # toggle_electric( 1 ) # electric C "code processing mode"
- # toggle_auto_indent( 1 ) # auto-indent mode
- # toggle_pvcs( 3 ) # automatic pvcs gets/puts,
- # see "pvcs.pel" for definition of "3"
- # toggle_help( 1 ) # enable help/menu bar
- # toggle_file_backup( 1 ) # enable file backups
- # init_colors() # create each new window with a new color
- # autosave( 15 ) # autosave every 15 seconds
- # toggle_pause( 1 ) # enable pause on errors/warnings
- # toggle_search_case( 1 ) # enable case insensitivity searches (default is different for each keymap)
- # toggle_search_regex( 1 ) # enable regular expression searches (default is different for each keymap)
- # toggle_search_forward( 1 ) # enable forward searches (default is different for each keymap)
- # toggle_search_block( 1 ) # enable block restricted searches (default is different for each keymap)
-
-
- ###
- # The toggle_... functions listed above affect the entire system.
- # Several other toggle_... functions exist which only affect the
- # current buffer or current window. These can be used from the
- # command line or within other functions.
- #
-
- # toggle_borders( 1 ) # enable display of window borders
- # toggle_insert_mode( 1 ) # disable overtype mode
- # toggle_linenumbers( 1 ) # enable display of line numbers
- # toggle_real_space( 1 ) # disable entry into virtual space
- # toggle_tabs_to_spaces(1) # enable conversion of tabs to spaces during edits
- # toggle_wp( 1 ) # enable continuous word wrap
-
-
- ###
- # To modify the mode and operation of all regular buffers created
- # from this point on, modify the default_buffer_flags variable.
- # Each flag has a unique affect on buffer edit operations. See
- # "Library Reference" for more details.
- #
-
- # set_default_buffer_flag( BUFFER_READ_ONLY, 1 ) # make all buffers read-only
- # set_default_buffer_flag( BUFFER_OVERTYPE_MODE, 1 ) # make overtype mode the default
- # set_default_buffer_flag( BUFFER_EXPAND_TABS, 1 ) # expand tabs on write
- # set_default_buffer_flag( BUFFER_WP_ENABLED, 1 ) # enable continuous word wrap
- # set_default_buffer_flag( BUFFER_REAL_SPACE_ONLY, 1 )# disable movement into virtual space
- # set_default_buffer_flag( BUFFER_SNAP_TO_EOL, 1 ) # disable insertion past EOL
- # set_default_buffer_flag( BUFFER_NO_UNDO, 1 ) # disable recording of undo information
- # set_default_buffer_flag( BUFFER_TABS_TO_SPACES, 1 ) # enable convertion of tabs to spaces
- # set_default_buffer_flag( BUFFER_WHOLE_LINES, 1 ) # enable display of whole lines
-
-
- ###
- # One may wish to override the default compiler used with a given
- # filename extension. The following example shows how to replace
- # the default C compiler with Borland's Turbo C compiler:
- #
- # add_compiler( ".c .h", "tcc -c -w $<", "TurboC" )
-
-
- ###
- # All other custom initialization goes here.
- #
- # eg., window colors, border styles, search flags,
- # refinements to emulation keymaps, etc.
- #
- # If you wish the editor to start with other than a
- # full-screen window, it is sufficient to create that
- # window here.
- #
- # Since an edit window has not yet been created, it's
- # advisable to set default_... variables so they take effect
- # when windows are eventually created.
-
- # mouse_cursor_mask = 0x1700 # white on blue
- # mouse_display_mask = 0x00FF
-
- # cursor_normal = 0x0607 # normal cursor shape
- # cursor_overtype = 0x0007 # cursor in overtype mode
- # cursor_virtual = 0x0407 # cursor in virtual space
- # cursor_virtual_overtype = 0x0003 # overtype in virtual space
-
- # color_text = 0x170 # black on white, no blink
- # color_background = 0x170 # black on white, no blink
- # color_highlight = 0x0E0 # black on yellow
- # color_warnings = 0x070 # yellow on white
- # color_errors = 0x076 # red (brown?) on white
-
-
- ###
- # other custom initialization or keymap definitions can go here...
-
-
- ###
- # After local_setup() exits, startup processing proceeds as follows:
- #
- # 1) The configuration/state file, SAGEEDIT.CFG, is processed.
- # 2) Buffers are created for all files specified on the command line,
- # and command line switches are processed.
- # 3) If no window has yet been created, a full-screen window is
- # initialized and attached to the first file on the command line.
- #
- # Upon completion of startup processing, the editor begins accepting
- # commands from the user.
-
- }
-
-
- ### additional custom startup function definitions go here,
- # after local_startup():
-
-
-
-