home *** CD-ROM | disk | FTP | other *** search
- # $Header: P:/source/ppee/macros/startup.pev 1.33 17 Aug 1990 18:25:48 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: startup.pel $: System startup processing
-
- ###
- # The startup() function controls the overall initialization and
- # customization of the Sage Professional Editor. For certain special
- # applications it may be desirable to modify or replace startup() in order to
- # override normal startup behavior. However, caution is advised.
- #
- # The recommended location for routine customizations is (a) in the
- # local_setup() function in LOCAL.PEL, (b) in the SAGEEDIT.CFG config file,
- # or (c) in both locations. Local_setup() provides the fastest
- # initialization, and is the preferred location for customizations that
- # change infrequently. Items in the configuration file execute a little more
- # slowly, but are easily changed. Presently, all the customizations provided
- # by setup are placed in the config file, and override local_setup(). This
- # permits multiple users or projects to share a base configuration of the
- # editor, yet easily allows local customizations.
- #
-
- global function startup() {
-
- ###
- # The items contained within this function are customizable, though
- # few will want to change them here:
-
- pause_on_error = 0 # DO NOT prompt after each error
-
- if ( os_name == "OS/2" ) {
- # In OS/2, increase the keyboard repeat
- # rate to 30 characters per second.
- keyboard_speed( 30, 250 )
- }
-
- ###
- # First: implement hard-wired user customization:
-
- optional_function( "local_setup" )
-
- ###
- # Second, read soft-wired configuration and state information
- # from the config file
-
- optional_function( "read_config_file" )
-
- ###
- # If no emulation mode has been defined by setup or config then
- # use "native". This may override some of the settings
- # defined in local_setup or in the config file, (notably
- # default_window_flags, search_flags, and calls to the
- # assign_key function).
-
- if ( emulation_mode == "" ) {
- optional_function( "native" )
- }
-
- ###
- # process command line options and create buffers for all files
- # named on the command line
-
- process_command_line()
-
- ###
- # When startup() exits, the editor will create a full-screen window,
- # Next it will ensure that current_window is a non-system window
- # and current_buffer is attached. (These steps are omitted if they
- # have already been performed by the config file or local_setup().)
- #
- # Then the editor will begin processing keyboard input.
- #
- }
-