Re: Context Sensitive Help for Shian Lee's Unicode/Utf8 editor, "edu.ex"

new topic     » goto parent     » topic index » view thread      » older message » newer message

The following modification to Shian Lee's Unicode/Utf8 editor, "edu.ex" will provide context sensitive help via help from the RDS text documentation if the library.doc option is selected from the top line help menu in Euphoria 3.1 or earlier. Also works in "ed.ex".

I thought this might be useful for minimalistic installations.

 
-- Searches text documentation in early versions of euphoria 
-- prior to 3.1 or earlier for word specific article 
-- Insert the following procedure before the routine  
-- "get_escape(boolean help): 
procedure text_context_help(char key, object self_command) 
sequence this_line, white_space, search_path, search_word 
		natural first_non_blank 
this_line = buffer[b_line] 
white_space = this_line = ' ' or this_line = '\t' 
first_non_blank = find(0, white_space) -- there's always '\n' at end                   
search_word = this_line[first_non_blank..b_col -1 - (key= ' ')] 
search_word = "<" & search_word & ">" 
add_queue(self_command & SLASH & "library.doc" & CR &  
          ESCAPE & "f" & search_word & CR & ESCAPE & "y" & CR) 
end procedure 
 
-- Within the routine get_escape(boolean help) 
-- context sensitive text help -- Euphoria 3.1 or earlier 
-- if library.doc is selected, the specific article for the current 
-- word will be displayed. 
  elsif answer[1] = 'l' then 
--add_queue(self_command & SLASH & "ed.doc" & CR) 
  text_context_help('l', self_command) 
 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu