! ! Kalamazoo College Supplement to SYS$LIBRARY:EDTSECINI ! ! COPYRIGHT © 1985 BY ! Richard D. Piccard, Michael L. Penix, and Kalamazoo College, ! Kalamazoo, Michigan, to the extent not copyright by DIGITAL. ! ALL RIGHTS RESERVED ! ! ! ! The following copyright line appears in several ! locations throughout the code, indicating sections that ! are tightly based on DIGITAL's EDTSECINI.TPU file. ! ! ! COPYRIGHT © 1983, 1984, 1985 BY ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS ! ALL RIGHTS RESERVED ! ! In those locations where the above lines appear, the ! following should be understood: ! ! ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ! ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE ! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER ! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY ! OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY ! TRANSFERRED. ! ! ! ! ! Functional 4-OCT-1985 Michael L. Penix and Richard D. Piccard ! ! Enhanced: ! 10-OCT-1985 MLP and RDP: for PF1 + C = find line by number. ! ! 10-OCT-1985 RDP: permit successful motion by paragraphs at ! beginning and end of buffer; thereby ! correcting PF1 + F failures at those points. ! ! 11-OCT-1985 RDP and MLP: clean two-window dual-file using ! PF1 + CTRL/W to change between single- and ! dual-window display; PF1 + B and PF1 + M ! during dual-window just bounce between. ! ! 14-OCT-1985 RDP: modify KAZ$RESTORE to leave cursor unmoved ! if no mark is present. ! ! 16-OCT-1985 RDP: PF1 + CTRL/A for insert vs overstrike mode. ! PF1 + I for including file in current ! buffer. ! ! ?-OCT-1985 RDP: "fix" the bug in FILL. ! ! 29-OCT-1985 RDP: screen jump up and down by move_vertical; ! at the top and bottom of the buffer, this ! will generate an error message but also ! move the cursor to the appropriate end of ! the buffer. ! ! 4-NOV-1985 RDP, Forrest Piehl: sound bell for broadcasts ! ! 6-NOV-1985 RDP: clean up the sentence delimiter pattern. ! Add CTRL/B for back one sentence and ! CTRL/G for forward one sentence. ! ! 8-NOV-1985 MLP: Set info_window normal video and no pad. ! ! 19-NOV-1985 RDP: Eliminate KAZ$GET_RNO in favor of direct ! definition of the key. ! ! 19-NOV-1985 RDP: Set(message_flags,5) to shorten output. ! ! 21-NOV-1985 RDP and MLP: Query file writing for new buffers ! ! 27-NOV-1985 RDP: use native tpu fill for PF1 + F, suppress ! screen updating during paragraph fill, ! leave cursor position unchanged. Revised ! kaz$top_sent. Revised comments. ! ! 1-DEC-1985 RDP: use EDT$X_WORD for paragraph fill. ! ! 2-DEC-1985 MLP: autoindent for programming. ! ! ! To activate after revisions: ! ! $ EDIT/TPU/SECTION=SYS$LIBRARY:EDTSECINI/COMMAND=this_file ! $ EDIT/TPU/SECTION=SYS$LOGIN:KAZSECINI/COMMAND=SYST:[SYSLOGIN]TPUINI ! and play with any modified commands; if all is OK, then ! $ PUBLIC SYS$LOGIN:KAZSECINI.NEW ! $ RENAME SYS$LOGIN:KAZSECINI.NEW SYST:[SYSLOGIN]*.GBL ! ! ! The major vulnerabilities to changes by DIGITAL are in those variables ! and procedures whose names begin with "EDT$"; they reference the ! contents of DIGITAL's EDTSECINI file, which is "subject to change ! without notice." ! ! procedure tpu$local_init ! first initialize global variables ! ! next line is space, tab, ff, lf, cr, vt edt$x_word := " "; kaz$word_delim := 'text'; ! ! the ''& here forces an incremental search ! see page 2-12 of the VAXTPU Ref. Manual ! kaz$sent_delim := ''& ( ('.'|'?'|'!') & ( ' ' | '" ' | ') ' | '] ' | '} ' | line_end | ('"'&line_end) | (')'&line_end) | (']'&line_end) | ('}'&line_end) )); ! kaz$parag_delim := line_begin & line_end; ! kaz$x_empty := ''; kaz$entry_mode := 'insert'; ! edt$x_tab_size := 4; edt$x_tab_goal := edt$x_tab_size; edt$x_tab_set := 1; ! define_key('edt$wrap_word',key_name(' ')); edt$x_wrap_position := 65; ! kaz$buffer_nam_1 := get_info(current_buffer,"name"); kaz$window_nam_1 := current_window; ! kaz$window_size := 21; ! ! now execute some statements to set up the environment ! set(bell,broadcast,on); SET (VIDEO,INFO_WINDOW,NONE); SET (PAD,INFO_WINDOW,OFF); set (message_flags,5); ! this last was suggested by "The Heap" 7/85, ! and eliminates identifier and facility kaz$define_keys; ! endprocedure procedure kaz$get_out write_file(main_buffer); set(no_write,main_buffer,ON); exit; endprocedure PROCEDURE kaz$RESTORE local start_mark, bizz_mark, bizz_mark_range; bizz_MARK := '^^&&^^'; start_mark := mark(none); POSITION (BEGINNING_OF (CURRENT_BUFFER)); bizz_MARK_RANGE := SEARCH(bizz_MARK,FORWARD,EXACT); if bizz_mark_range = 0 then position (start_mark); message ('No mark found in this buffer.'); return; endif; POSITION (bizz_MARK_RANGE); ERASE (bizz_MARK_RANGE); ENDPROCEDURE procedure KAZ$find_buffer ( buffer_name) ! support routine for line mode ! ! STOLEN FROM PAGE 21 OF EDTSECINI.TPU - V1.0 RDP 3-OCT-1985 ! ! COPYRIGHT © 1983, 1984, 1985 BY ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS ! ALL RIGHTS RESERVED ! !+ ! Find the buffer by name !- LOCAL upcased_name , buffer_ptr ; upcased_name := buffer_name; change_case(upcased_name,upper); buffer_ptr := get_info(buffers,'first'); loop exitif buffer_ptr = 0; exitif upcased_name = get_info(buffer_ptr,'name'); buffer_ptr := get_info(buffers,'next'); endloop; return buffer_ptr; endprocedure procedure KAZ$buffer ! ! support routine for line mode(= buffer cmd) ! ! STOLEN FROM SAME PLACE Page 22 ! ! COPYRIGHT © 1983, 1984, 1985 BY ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS ! ALL RIGHTS RESERVED ! !+ ! Process the line mode =buffer command !- LOCAL buffer_ptr , create_variable_string, term_char, file_write, file_name, buffer_name ; ! ! This is to move to a new buffer and map it to the main window. If ! the buffer does not exist, ask whether to create it with the NO_WRITE ! attribute. Get the buffer name from the command line. ! kaz$x_empty := ''; buffer_name := READ_LINE ("Enter buffer name: "); if (buffer_name = kaz$x_empty) then message('No buffer specified'); return 0; endif; ! IF it exists just map to it. buffer_ptr := kaz$find_buffer(buffer_name); if buffer_ptr = 0 then kaz$x_make_buf_var := buffer_name; create_variable_string := kaz$x_make_buf_var + "_buffer := create_buffer(kaz$x_make_buf_var)"; execute (create_variable_string); ! Now get the pointer back, we know it is the last buffer in the list buffer_ptr := get_info (buffers,'last'); file_write := read_line ("Write the contents of this buffer to a file upon exit [Y/N]? "); if (index(file_write,'y') = 0) and (index(file_write,'Y') = 0) then SET (NO_WRITE, buffer_ptr, ON); else file_name := read_line("Enter name of file: "); set (output_file,buffer_ptr,file_name); SET (NO_WRITE, buffer_ptr, OFF); endif; set(eob_text, buffer_ptr, '[End of '+buffer_name+']'); map(current_window,buffer_ptr); if (index(file_write,'y') <> 0) or (index(file_write,'Y') <> 0) then read_file(file_name); endif; return 1; else map(current_window,buffer_ptr); return 1; endif; endprocedure procedure KAZ$main_buf ! support routine for line mode(= buffer cmd) ! ! STOLEN FROM SAME PLACE Page 22 ! ! COPYRIGHT © 1983, 1984, 1985 BY ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS ! ALL RIGHTS RESERVED ! !+ ! Process the line mode =buffer command !- LOCAL buffer_ptr , create_variable_string, term_char, buffer_name ; ! ! This is to move to a new buffer and map it to the main window. If ! the buffer does not exist, create it with the NO_WRITE attribute. ! Get the name from the command line. ! kaz$x_empty := ''; buffer_name := 'main'; ! IF it exists just map to it. buffer_ptr := kaz$find_buffer(buffer_name); if buffer_ptr = 0 then kaz$x_make_buf_var := buffer_name; create_variable_string := kaz$x_make_buf_var + "_buffer := create_buffer(kaz$x_make_buf_var)"; execute (create_variable_string); ! Now get the pointer back, we know it is the last buffer in the list buffer_ptr := get_info (buffers,'last'); SET (NO_WRITE, buffer_ptr, ON); set(eob_text, buffer_ptr, '[End of '+buffer_name+']'); endif; map(current_window,buffer_ptr); return 1; endprocedure procedure kaz$write_buf ! support routine for line mode(write cmd) ! ! Page 25 ! !+ ! Modified from "Edt line mode Write command" !- ! ! COPYRIGHT © 1983, 1984, 1985 BY ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS ! ALL RIGHTS RESERVED ! LOCAL file_name , buffer_ptr, buffer_name, range_specifier , term_char , text_to_write ; file_name := read_line("Enter file to write to: "); buffer_name := read_line("Enter buffer to write from: "); if (buffer_name = kaz$x_empty) then message ('No buffer specified'); return 0; endif; buffer_ptr := kaz$find_buffer (buffer_name); if (buffer_ptr = 0) then message ('Specified buffer does not exist'); return 0; else write_file(buffer_ptr,file_name); return 1; endif; endprocedure procedure kaz$erase_buf ! Page 25 !+ ! Modified from "Edt line mode Write command" !- ! ! COPYRIGHT © 1983, 1984, 1985 BY ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS ! ALL RIGHTS RESERVED ! ! LOCAL file_name , buffer_ptr, buffer_name, range_specifier , term_char , text_to_write ; buffer_name := read_line("Enter buffer to erase: "); if (buffer_name = kaz$x_empty) then message ('No buffer specified'); return 0; endif; buffer_ptr := kaz$find_buffer (buffer_name); if (buffer_ptr = 0) then message ('Specified buffer does not exist'); return 0; else erase(buffer_ptr); return 1; endif; endprocedure procedure kaz$tab_jump ! ! one might sensibly choose the command cursor_horizontal ! but that doesn't go from one line to the next and can be hanging ! out in space beyond the end of the line. if current_direction = forward then move_horizontal(+8) else move_horizontal(-8) endif; endprocedure procedure kaz$swap_characters local first; first := erase_character(-1); move_horizontal(+1); copy_text (first); endprocedure procedure kaz$show_buf ! Page 23 !+ ! based on "EDT line mode Show command" !- ! ! COPYRIGHT © 1983, 1984, 1985 BY ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS ! ALL RIGHTS RESERVED ! LOCAL show_type , buf , cur_buf, pos , term_char , save_info_status, show_index ; ! SHOW BUFFER pos := current_window; cur_buf := current_buffer; erase(show_buffer); position(show_buffer); copy_text(' BUFFER NAME LINES FILE'); split_line; copy_text('------------------------------------------------------'); split_line; buf := get_info(buffers,'first'); loop exitif buf = 0; if (buf = cur_buf) then copy_text('='); else copy_text(' '); endif; copy_text(get_info(buf,'name')); copy_text(' '); ! insert a tab copy_Text(str(get_info(buf,'record_count'))); copy_text(' '); ! insert a tab copy_text(get_info(buf,'file_name')); split_line; buf := get_info(buffers,'next'); endloop; set(status_line,info_window,reverse,' '); set(width,info_window,get_info(screen,'width')); map(info_window,show_buffer); update(info_window); buf := read_line('Press RETURN to continue.',1); set(status_line,info_window,none,'Press CTRL-F to remove INFO_WINDOW and resume editing'); unmap(info_window); position(pos); endprocedure procedure kaz$page_length local found_range; ! next line's search string is a ff character found_range := search(' ',reverse,exact); if found_range=0 then position (beginning_of(current_buffer)); else position (found_range); endif; move_horizontal(+1); move_horizontal(-current_offset); move_vertical(+59); endprocedure procedure kaz$top_parag local parag_top_range; move_horizontal(-2); parag_top_RANGE := SEARCH(kaz$parag_delim,reverse,EXACT); if parag_top_range = 0 then position (beginning_of(current_buffer)); else position(parag_top_range); move_vertical(+1); endif; endprocedure procedure kaz$end_parag local parag_end_range; move_horizontal(+1); parag_end_RANGE := SEARCH(kaz$parag_delim,forward,EXACT); if parag_end_range = 0 then position (end_of(current_buffer)); else position(parag_end_range); move_vertical(+1); endif; endprocedure procedure kaz$end_sent local space, space_range, non_space, non_space_range, sent_end_range; sent_end_RANGE := SEARCH(kaz$sent_delim,forward,EXACT); if sent_end_range = 0 then return; endif; position(sent_end_range); space := ''&(' ' | line_end); space_range := search(space,forward,exact); if space_range = 0 then return; endif; position(space_range); non_space := ''&(line_begin | notany (' ')); non_space_range := search(non_space,forward,exact); if non_space_range = 0 then return; endif; position(non_space_range); endprocedure procedure kaz$top_sent ! ! move backward to beginning of sentence ! local non_space_range, non_space, space, space_range, start_mark, next_mark, this_mark, sent_top_range; start_mark := mark(none); move_horizontal(-5); sent_top_RANGE := SEARCH(kaz$sent_delim,reverse); if sent_top_range = 0 then position(start_mark); return; endif; position(beginning_of(sent_top_range)); space := '' & (' ' | line_end); space_range := search(space,forward); if space_range = 0 then return; endif; position(space_range); non_space_range := search(''&(line_begin | notany(' ')),forward); if non_space_range = 0 then return; endif; position(non_space_range); endprocedure procedure kaz$fill_parag local begin_mark, top, parag_end_range; begin_mark := mark(none); set(screen_update,off); kaz$top_parag; move_horizontal(+1); top := mark(none); parag_end_RANGE := SEARCH(kaz$parag_delim,forward,EXACT); if parag_end_range = 0 then parag_end_range := create_range(top,end_of(current_buffer),none); else position(end_of(parag_end_range)); move_horizontal(-1); parag_end_range := create_range(top,mark(none),none); endif; fill(parag_end_range,edt$x_word,1,edt$x_wrap_position); position (begin_mark); set(screen_update,on); endprocedure procedure kaz$GET_KEY_INFO LOCAL key_to_interpret, key_info; MESSAGE("Press the key you want information on: "); key_to_interpret := read_key; key_info := lookup_key(key_to_interpret, comment); if key_info <> "" then message("Comment: " + key_info); else message("No comment is associated with that key."); endif; endprocedure procedure kaz$swap_delim if (kaz$word_delim = 'text') then ! next line is space, tab, ff, lf, cr, vt, and punctuation edt$x_word := " /<>[]{},.:*&!;+-=^()\|'"; define_key ('kaz$return',ret_key, 'Return key autoindent for programming.'); kaz$word_delim := 'program'; else ! next line is space, tab, ff, lf, cr, vt edt$x_word := " "; define_key ('split_line',ret_key,'Normal Return key for prose.'); kaz$word_delim := 'text'; endif; endprocedure procedure kaz$find_line local line_no; position(beginning_of(current_buffer)); line_no := read_line('Enter line number to find: '); move_vertical ( int (line_no) - 1); endprocedure procedure kaz$windows ! !+ ! Window control: single- or double-window editing for use with ! multi-buffer commands. ! ! PF1 + CTRL/W will query the number of windows, establish and map ! them, and re-define PF1 + B and PF1 + M suitably. !- ! local window_count, buffer_name_2, window_top, delta_top, window_bottom, make_file_name_2, make_buf_var, delta_bottom, file_name_2; ! ! global variables are kaz$window_nam_1 the main window ! kaz$window_nam_2 second ! kaz$buffer_nam_1 the main buffer ! kaz$buffer_nam_2 second ! window_count := read_line("Enter number of windows (1 or 2): "); if window_count = "1" then ! here if normal usage ! ! restore standard key definitions; ! ensure that there is one mapped window, with standard size, to main ! buffer. ! kaz$window_size := 21; define_key ('kaz$buffer',Key_name('b',shift_key),"Edit a buffer."); define_key ('kaz$main_buf',key_name('m',shift_key), "Return to editing the main buffer."); ! kaz$main_buf; ! kaz$window_nam_1 := current_window; set (scrolling,current_window,on,7,7,0); window_top := get_info(current_window,"visible_top"); if window_top <> 1 then delta_top := 1 - window_top; adjust_window(current_window,delta_top,0); endif; window_bottom := get_info(current_window,"visible_bottom"); if window_bottom <> 20 then delta_bottom := 20 - window_bottom; adjust_window(current_window,0,delta_bottom); endif; set (status_line,current_window,none,""); refresh; return 1; else if window_count = "2" then ! here for dual-window usage ! ! ensure that there are two mapped windows, with half size, upper to ! main buffer, and lower to second buffer, each w/ status line. ! ! first, clean up the original file's buffer ! kaz$window_size := 10; kaz$window_nam_1 := current_window; window_top := get_info(current_window,"visible_top"); if window_top <> 1 then delta_top := 1 - window_top; adjust_window(current_window,delta_top,0); endif; window_bottom := get_info(current_window,"visible_bottom"); if window_bottom <> 11 then delta_bottom := 11 - window_bottom; adjust_window(current_window,0,delta_bottom); endif; file_1 := get_info(current_buffer,"file_name"); buffer_1 := get_info(current_buffer,"name"); status_1 := buffer_1 + " " + file_1; set (status_line,current_window,reverse,status_1); ! ! now establish second window, buffer, and file ! kaz$x_empty := ''; buffer_name := read_line("Enter name of second buffer: "); if (buffer_name = kaz$x_empty) then message('No buffer specified'); return 0; endif; ! IF it exists just map to it. kaz$buffer_nam_2 := buffer_name; buffer_ptr := kaz$find_buffer(buffer_name); if buffer_ptr = 0 then file_name_2 := read_line("Enter file for second buffer: "); kaz$buffer_nam_2 := create_buffer(buffer_name,file_name_2); ! Now get the pointer back, we know it is the last buffer in the list buffer_ptr := get_info (buffers,'last'); file_write := read_line ("Write the contents of this buffer to a file upon exit [Y/N]? "); if (index(file_write,'y') = 0) and (index(file_write,'Y') = 0) then SET (NO_WRITE, buffer_ptr, ON); else SET (NO_WRITE, buffer_ptr, OFF); endif; set(eob_text, buffer_ptr, '[End of '+buffer_name+']'); endif; ! ! now we have the buffer and file set up, it is second window time ! kaz$window_nam_2 := create_window(12,11,ON); map(kaz$window_nam_2,buffer_ptr); define_key ('position(kaz$window_nam_2)',Key_name('b',shift_key), "Edit buffer two."); define_key ('position(kaz$window_nam_1)',key_name('m',shift_key), "Edit buffer one."); set (scrolling,kaz$window_nam_1,on,3,3,0); set (scrolling,kaz$window_nam_2,on,3,3,0); return 1; else ! here for improper response message('Illegal, you must respond with 1 or 2.'); return 0; endif; endif; endprocedure procedure kaz$include ! ! include a file in the current buffer ! local filename; filename := read_line("Enter name of file to include: "); read_file(filename); endprocedure procedure kaz$overstrike ! ! swaps between overstrike and insert modes ! if (kaz$entry_mode = 'insert') then set (overstrike,current_buffer); kaz$entry_mode := 'overstrike'; else set (insert,current_buffer); kaz$entry_mode := 'insert'; endif; endprocedure procedure kaz$find_beg_of_line (b_mark) ! ! to be called by edt$preserve_blanks, thereby preventing ! the dreaded word-split when the select range starts in a ! word that extends beyond the specified margin. ! local temp_pattern, temp_rang; on_error return endon_error; position (b_mark); move_horizontal (-current_offset); b_mark := mark(none); endprocedure procedure edt$preserve_blanks(flag) ! support routine for fill ! ! ! COPYRIGHT © 1983, 1984, 1985 BY ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS ! ALL RIGHTS RESERVED ! ! modified at Kalamazoo College ! by including the call to kaz$find_beg_of_line ! LOCAL original_position, b_mark, e_mark, sub_range, temp_range, all_done, temp_pattern; on_error all_done:=1; ! cause exit endon_error; original_position:=mark(none); b_mark:=beginning_of(edt$x_select_range); ! skip leading spaces on first line only kaz$find_beg_of_line (b_mark); edt$skip_leading_spaces(b_mark); position(original_position); loop ! skip leading blank lines of a paragraph edt$skip_lines(b_mark); all_done:=edt$find_whiteline(b_mark,e_mark); ! start looking here exitif all_done; ! now only fill the range created between the blank lines sub_range:=create_range(b_mark,e_mark,none); ! go to line following the range position(e_mark); move_horizontal(1); move_vertical(1); ! pick up search at end of current_range b_mark:=mark(none); ! do the fill operation if flag then fill(sub_range,edt$x_word,1,edt$x_wrap_position); else fill(sub_range,edt$x_word,1,get_info(current_window,'width')); endif; exitif all_done; endloop; position(original_position); endprocedure procedure kaz$return ! ! implements autoindent a'la Apple Pascal, ! actuated when programming delimiters are used. ! local blanktab, orig_pos, first_pos, leading_blanks, dupe; ! search for first non-space or tab character ! if line is empty then search for line_end split_line; ! string next is space, tab blanktab := ''&(notany (" ") | line_end); orig_pos := mark(none); move_vertical (-1); first_pos := mark(none); leading_blanks := search (blanktab,forward,exact); if leading_blanks <> 0 then position (leading_blanks); endif; if current_offset <> 0 then move_horizontal (-1); dupe := create_range(first_pos,mark(none),none); position (orig_pos); copy_text(dupe); else position (orig_pos); endif; endprocedure; procedure kaz$define_keys define_key('kaz$overstrike',key_name(ctrl_a_key,shift_key), "Swap between insert and overstrike modes."); define_key ('kaz$include',key_name('i',shift_key), "Include file in current buffer."); define_key ('move_vertical(-(kaz$window_size))', key_name(up,shift_key),"Jump up one screen."); define_key ('move_vertical(+(kaz$window_size))', key_name(down,shift_key),"Jump down one screen."); define_key('kaz$windows',key_name(ctrl_w_key,shift_key), "Set up single- or dual-window."); define_key('kaz$find_line',key_name("c",shift_key),"Find a line by number."); define_key ('kaz$swap_delim',key_name(ctrl_d_key,shift_key), "Swap definition of word for programming or text."); define_key ('kaz$get_key_info',key_name('h',shift_key),"Get help on a key."); define_key ('kaz$fill_parag',key_name('f',shift_key), "Re-fill the present paragraph."); define_key ('kaz$top_sent',key_name(ctrl_b_key,shift_key), "Move back one sentence."); define_key ('kaz$end_sent',key_name(ctrl_f_key,shift_key), "Move forward one sentence."); define_key ('kaz$top_sent',ctrl_b_key, "Move back one sentence."); define_key ('kaz$end_sent',ctrl_g_key, "Move forward one sentence."); define_key ('kaz$end_parag',ctrl_p_key,"Move forward one paragraph."); define_key ('kaz$top_parag',ctrl_n_key,"Move back one paragraph."); define_key ('kaz$page_length',key_name('p',shift_key), "Go to bottom of current page."); define_key ('kaz$show_buf',key_name('s',shift_key),"Show buffer information."); define_key ('kaz$swap_characters',key_name(ctrl_h_key,shift_key), "Swap characters."); define_key ('kaz$tab_jump',key_name(ctrl_i_key,shift_key),"Jump 8 characters."); ! ! the key is the DELETE character in apostrophes define_key ('kaz$erase_buf',key_name('',shift_key),"Erase a buffer."); define_key ('kaz$write_buf',key_name('o',shift_key), "Write a buffer to a file."); define_key ('kaz$main_buf',key_name('m',shift_key), "Return to editing the main buffer."); ! ! the string is underscore, escape, semicolon ! DEFINE_KEY ('COPY_TEXT ("_;")' , key_name('u',shift_key), "Insert NEC escape sequence for superscripts."); ! ! the string is underscore, escape, colon ! DEFINE_KEY ('COPY_TEXT ("_:")' , key_name('d',shift_key), "Insert NEC escape sequence for subscripts."); ! ! the string is the backspace character ! DEFINE_KEY ('COPY_TEXT ("")' , key_name('v',shift_key), "Insert character, for overstrikes."); ! define_key ('kaz$buffer',Key_name('b',shift_key),"Edit a buffer."); define_key ('read_file (''standard.RNO'')',key_name('R',shift_key), "Insert a copy of the file STANDARD.RNO."); define_key ('quit', key_name('Q',shift_key),"Quit without writing file."); define_key ('kaz$get_out', key_name(CTRL_Z_KEY,shift_key), "Quick normal EXIT."); DEFINE_KEY ('COPY_TEXT ("^^&&^^")' , CTRL_V_KEY, "Insert a marker to be found by CTRL/R."); DEFINE_KEY ('kaz$RESTORE' , CTRL_R_KEY,"Find the marker left by CTRL/V."); endprocedure ! ! save ('sys$login:kazsecini.new'); quit;