* language * NEdit Macro * comment * CallTipFiles.nm ---------------------------------------------------------------- CallTipFile_getList CallTipFile_getList([refresh]): fetch a list of ".ct" files from the calltip files directory. The resut is stored in $CALLTIPS["file list"] and the value $CALLTIPS["good file list"] is set to 1 if successful. If refresh is not supplied or is zero, any previous value of $CALLTIPS["file list"] is returned. Returns 1 on success, 0 otherwise.   (requires macro file CallTipFiles.nm) CallTipFileCreateNew CallTipFileCreateNew(): prompts the user for a new calltip file name and, if valid, creates it and opens it for editing. If it already exists, it prompts the user whether it needs to be edited.   (requires macro file CallTipFiles.nm) CallTipFile_getFileName CallTipFile_getFileName(prompt): used to return the name of a calltip file in the caltip file directory tree. Fails with an empty string.   (requires macro file CallTipFiles.nm) CallTipFileOpen CallTipFileOpen(): asks the user which calltip file to open.   (requires macro file CallTipFiles.nm) CallTipFileLoad CallTipFileLoad(): asks the user which calltip file to load.   (requires macro file CallTipFiles.nm) CallTipFiles.nm Functions in file CallTipFiles.nm: ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ CallTipFile_getList([refresh]) CallTipFileCreateNew() CallTipFile_getFileName(prompt) CallTipFileOpen() CallTipFileLoad() * comment * DEBUG.nm ----------------------------------------------------------------------- DEBUG_focus_dbg_window DEBUG_focus_dbg_window: creates the debug window if necessary, then makes it current. It returns the name of the (previous) current window.   (requires macro file DEBUG.nm) DEBUG DEBUG(text): writes text to the debug window.   (requires macro file DEBUG.nm) DEBUG_clear_all DEBUG_clear_all(): calls undo() on the debug window until all undone.   (requires macro file DEBUG.nm) DEBUG_mark_to DEBUG_mark_to(): returns the current $DEBUG_WINDOW_UNDOS value.   (requires macro file DEBUG.nm) DEBUG_undo_to DEBUG_undo_to(undo_mark): calls undo() until $DEBUG_WINDOW_UNDOS == undo_mark.   (requires macro file DEBUG.nm) DEBUG_s DEBUG_s(text): returns the text string for "display", flattening newlines.   (requires macro file DEBUG.nm) DEBUG_s_nl DEBUG_s_nl(text): returns the text string for "display", with newlines.   (requires macro file DEBUG.nm) DEBUG_s_col DEBUG_s_col(text): returns the text string for "display", flattening newlines. We use $column as a length specifying start column.   (requires macro file DEBUG.nm) DEBUG_s_nl_col DEBUG_s_nl_col(text): returns the text string for "display", with newlines. We use $column as a length specifying start column.   (requires macro file DEBUG.nm) DEBUG.nm Functions in file DEBUG.nm: ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ DEBUG(text) DEBUG_clear_all() DEBUG_mark_to() DEBUG_undo_to(undo_mark) DEBUG_s(text) DEBUG_s_nl(text) DEBUG_s_col(text) DEBUG_s_nl_col(text) * comment * Development.nm ----------------------------------------------------------------- Development_SetupCppFileExtnToType Development_SetupCppFileExtnToType(): creates a $Development_CppFileExtnToType array to map various file extension strings to one of the acceptable file types, as defined by $Development_CppFileExtnAlt. It returns the $Development_CppFileExtnToType array.   (requires macro file Development.nm) Development_SetupCppPreferredFileExtn Development_SetupCppPreferredFileExtn([redo]): if an argument (redo) is present or the array $Development_CppPrefFileExtn is empty, this function looks at the files in the current directory, trying to find valid extensions. It counts these then sets up the result array $Development_CppPrefFileExtn to contain the most numerous acceptable extensions of each. Otherwise the array is assumed to be valid and is returned directly.   (requires macro file Development.nm) Development_fileNameToIdentifier Development_fileNameToIdentifier(): returns the current file name with any non-word characters swapped for underscores.   (requires macro file Development.nm) Development_getCopyright Development_getCopyright([silent]): returns the copyright string for headings in new files; if non-existent or if silent is present and non-zero, a dialog prompts for it, storing its value for later.   (requires macro file Development.nm) Development_getAuthors Development_getAuthors([silent]): returns the array of author names for headings in new files; if none assigned or if silent is present and non-zero, successive dialog boxes prompt for the author list.   (requires macro file Development.nm) Development_makeWhatString_C_Cpp Development_makeWhatString_C_Cpp(): inserts a C/C++ static const what-string definition for the current file, containing the what lead-in and RCS/CVS substitution marker keywords.   (requires macro file Development.nm) Development_makeWhatString_Hash Development_makeWhatString_Hash(): inserts a line, starting with hash ('#'), containing the what lead-in and RCS/CVS substitution marker keywords. This is a suitable script comment line.   (requires macro file Development.nm) Development_makeWhatString_HTML_SGML_XML Development_makeWhatString_HTML_SGML_XML(): inserts a line, formatted as a HTML comment, containing the what lead-in and the RCS/CVS $Name$ and $Id$ substitution marker keywords.   (requires macro file Development.nm) Development_makeFileHeaderComment_base Development_makeFileHeaderComment_base(): builds a file header comment box with copyright notice, creation date (today), author list and file name, returning it as a string.   (requires macro file Development.nm) Development_makeFileHeaderComment_C_Cpp Development_makeFileHeaderComment_C_Cpp(): uses Development_makeFileHeaderComment_base() to build a comment box for C or C++ programs.   (requires macro file Development.nm) Development_makeFileHeaderComment_Hash Development_makeFileHeaderComment_C_Cpp(): uses Development_makeFileHeaderComment_base() to build a comment box for files using hash comments.   (requires macro file Development.nm) Development_addHeaderFileGuards_C_Cpp Development_addHeaderFileGuards_C_Cpp(): adds requisite include guards for C/C++ header files.   (requires macro file Development.nm) Development_makeNewFile_Cpp Development_makeNewFile_Cpp(name, [text [, silent]]): create a new C++ file, add comment-box header, what-string and guards (if necessary), and any required initial text. If name (the name of the new file to create) does not end in .cpp, .h or .inl, this function fails. It will not overwrite an existing, non-empty file. It returns 1 if it was able to add everything, zero otherwise.   (requires macro file Development.nm) Development_makeClassFiles_Cpp Development_makeClassFiles_Cpp(name): attempts to make a pair of files using name as this base file name, in the directory of the current document, and adding .cpp (for C++ source) and .h (for a header). The .h file will hold a class definition skeleton; the .cpp will include the .h.   (requires macro file Development.nm) Development_openClassFiles_Cpp Development_openClassFiles_Cpp(name): given a name or file path and basename in the parameter name, this function attempts to find files with extensions .cpp and .h, then to open them.   (requires macro file Development.nm) Development_getCppMatchingCloseBrace Development_getCppMatchingCloseBrace(obracepos): searches forward for a close brace matching the open brace at obracepos. Returns its position or -1.   (requires macro file Development.nm) Development_getCppClass Development_getCppClass(pos): tries to find the enclosing class(es) for a method declaration. Returns an array of positional and other information: ["class"] class name ["classPos"] start position of class name ["classEndPos"] start position of class name   (requires macro file Development.nm) Development_extractPrototypeCPP Development_extractPrototypeCPP(pos): search from pos in the current file for a method declaration. pos is expected to be in the method name (or in the word "operator"). Returns an array of positional and other information: ["class"] class name ["classPos"] start position of class name ["classEndPos"] start position of class name ["method"] method name ["methodPos"] start position of method name ["methodEndPos"] end position of method name ["prototype"] prototype for method definition ["prototypeCheck"] prototype for method detection ["protoStart"] start position of prototype ["protoEnd"] end position of prototype   (requires macro file Development.nm) Development_makeCppMethod_makeColor Development_makeCppMethod_makeColor(): sets up the colors of the rangesets to be used to color the lexical elements defining a method.   (requires macro file Development.nm) Development_makeCppMethod Development_makeCppMethod(): if positioned in a method name of a class in a header (.h) file, this function looks for a corresponding implementation in a source (.cpp) file, named for the method's class. If no such file exists, a dialog prompts whether to create one, or to look in a file of the same name as the current one, with another extension (.cpp, .inl or .h). Given the appropriate file, it checks whether an implementation already exists. If methods of the same name exist with different prototypes, a dialog prompts whether to create an implementation of the chosen method; if the prototype matches an implemented method, a dialog warning is issued and the implementation selected. Otherwise a new method implementation skeleton is added at the end of the appropriate file.   (requires macro file Development.nm) Development.nm Functions in file Development.nm: ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ Development_SetupCppFileExtnToType() Development_SetupCppPreferredFileExtn([redo]) Development_fileNameToIdentifier() Development_getCopyright([silent]) Development_getAuthors([silent]) Development_makeWhatString_C_Cpp() Development_makeWhatString_Hash() Development_makeWhatString_HTML_SGML_XML() Development_makeFileHeaderComment_base() Development_makeFileHeaderComment_C_Cpp() Development_addHeaderFileGuards_C_Cpp() Development_makeNewFile_Cpp(name, [text [, silent]]) Development_makeClassFiles_Cpp(name) Development_openClassFiles_Cpp(name) Development_getCppMatchingCloseBrace(obracepos) Development_getCppClass(pos) Development_extractPrototypeCPP(pos) Development_makeCppMethod_makeColor() Development_makeCppMethod() ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ Globals:   User preference values   $Development_Authors[] An array of author name strings, indexed from 0   $Development_Copyright[] Should contain the copyright string, indexed by the string "copyright"   $Development_CVS[] An array of values for constructing RCS/CVS/SCCS "what" strings - indexed elements are: ["Keywords"] version control system substitution strings to add to the "what" string, eg "$Header$" or "%W%" ["WhatPrefix"] first component of all "what" strings, eg "@(#)" ["FileIdPrefix"] prefix for "what" string's identifier For C/C++, a "what" string will be generated as: static const char [] = " ";\n\n   $Development_Layout[] Contains source generation layout information: ["MaxCols"] maximum line length, default 80; if zero, line breaking is not applied   C++ preference values - these are set up during macro loading:   $Development_CppFileType[] C++ file extensions indexed by file type name, eg ["C++ header"] = ".h"   $Development_CppFileExtn[] C++ file extensions indexed by the file extension, eg [".cpp"] = ".cpp"   $Development_CppFileExtnToType[] Map of alternative extensions to basic extensions in $Development_CppFileExtn[] ("inverse" of $Development_CppFileExtnAlt[], built by Development_SetupCppFileExtnToType()   $Development_CppPrefFileExtn[] Actual extensions to use; if empty, it will be built by Development_SetupCppPreferredFileExtn() using file names found in the current directory, matching extensions which are indices to $Development_CppFileExtnToType[]; this results in new C++ source files ending with ".C" rather than ".cpp" if ".C" files were found, say.   $Development_CppFileExtnAlt[] List of alternative extensions (as a string) for extensions in $Development_CppFileExtn[]; eg [".h"] = ".h .H .h++ .hh"   You can set up your author list and copyright information by creating another macro file, setting up these values. This file should then be loaded. The following assumes a file called DevelopmentData.nm and the use of the NEDIT_LOADED.nm macros to ensure loading.   The file DevelopmentData.nm should contain something like: # custom DevelopmentData.nm file $Development_Authors[0] = "Mark Edel" $Development_Authors[1] = "Tony Balinski" # $Development_Copyright["copyright"] = "NEdit.org" * comment * DevelopmentData.nm ------------------------------------------------------------- * comment * FindAll.nm --------------------------------------------------------------------- FindAllHistory_Add FindAllHistory_Add(pattern, pattype[, unique]): store a search pattern in the $FindAllHistory array, at the end. If the third parameter is present, any previous search with the same pattern and type will be removed.   (requires macro file FindAll.nm) FindAllHistory_Del FindAllHistory_Del(index): delete a search pattern in the $FindAllHistory array, renumbering consecutive entries.   (requires macro file FindAll.nm) FindAllHistory_ToEnd FindAllHistory_ToEnd(index): move a search pattern in the $FindAllHistory array to the end, renumbering consecutive entries.   (requires macro file FindAll.nm) FindAllHistory_AskList FindAllHistory_AskList(): build a string describing all entries in the $FindAllHistory array, suitable for a list dialog, and return it. The string may be empty. Entries are listed in reverse order.   Each line is formatted as "index searchtype: pattern".   (requires macro file FindAll.nm) FindAllHistory_Ask FindAllHistory_Ask(header, [back]): present a list dialog to the user containing all entries in the $FindAllHistory array; the returned result is the index of the entry chosen or zero. If there are no valid entries in the array, the value returned is -1. If the back argument is present, an extra button is made available with back's value as its label, leading to a return value of -1. Other options, handled here, provide for entry deletion. The index is read from the start of the selected line. The argument header provides extra commentary to the dialogs.   (requires macro file FindAll.nm) FindAll_Ask FindAll_Ask([header]): asks the user for a find-all pattern and search type, providing options for using the current selection (if any) or a previous pattern/type pair. Once chosen, the index, pattern and type are returned in an array of indices "index", "pattern" and "type". The single argument, header (default empty) is a string to be added to the dialog commentary.   (requires macro file FindAll.nm) FindAll.nm Functions in file FindAll.nm: ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ FindAllHistory_Add(pattern, pattype[, unique]) FindAllHistory_Del(index) FindAllHistory_ToEnd(index) FindAllHistory_AskList() FindAllHistory_Ask(header, [back]) FindAll_Ask([header]) ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ Globals:   $FindAllHistory[]: an array indexed by integer from 1 of arrays with indices ["pattern"] and ["type"]. $FindAll_SearchComment - comment explaining the search type names $FindAll_SearchShortForms - names of search type to present to user $FindAll_SearchLongForms - actual search parameter to use * comment * Fragment_store.nm -------------------------------------------------------------- Fragment_fname Fragment_fname(subj): converts the given subject name into a file name; all non-\w characters are removed and the $FRAGMENT_FILE prefix added.   (requires macro file Fragment_store.nm) Fragment_choose_name Fragment_choose_name(): prompts a user for a fragment file name. It returns the unique suffix of the filename, or the empty string. Extra options allow creation and deletion of fragment files.   (requires macro file Fragment_store.nm) Fragment_open_file Fragment_open_file(subj): opens the fragments repository file for editing.   (requires macro file Fragment_store.nm) Fragment_transformName Fragment_transformName(s): returns s transformed to contain at most one tab and all other sequences of multi-spacelike characters to a single space.   (requires macro file Fragment_store.nm) Fragment_transformList Fragment_transformList(s): for each line in s, if it contains a tab, reformat it to line up everything following the tab on each such line   (requires macro file Fragment_store.nm) Fragment_load_fragments Fragment_load_fragments(subj): loads a file of useful fragments. These are stored as \v\b\n\n\f\b\n pairs.   (requires macro file Fragment_store.nm) Fragment_save_fragments Fragment_save_fragments(subj): saves the array of useful fragments. These are stored as \v\b\n\n\f\b\n pairs.   (requires macro file Fragment_store.nm) Fragment_add Fragment_add(subj): prompts for a new fragment to store, with its name.   (requires macro file Fragment_store.nm) Fragment_delete Fragment_delete(subj, key): prompts the user whether he wants to delete the fragment with the given key. Returns an error string, which is empty if deletion was chosen.   (requires macro file Fragment_store.nm) Fragment_rename Fragment_rename(subj, key): prompts the user to provide a new key for the given fragment. Returns an error string, which is empty if everything went well.   (requires macro file Fragment_store.nm) Fragment_change Fragment_change(subj, key): allows a user to replace the fragment of a given name.   (requires macro file Fragment_store.nm) Fragment_fetch Fragment_fetch(subj): prompts the user with the list of fragment names; the buttons indicate possible actions.   (requires macro file Fragment_store.nm) Fragment_store.nm Functions in file Fragment_store.nm: ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ Fragment_fname(subj) Fragment_choose_name() Fragment_open_file(subj) Fragment_transformName(s) Fragment_transformList(s) Fragment_load_fragments(subj) Fragment_save_fragments(subj) Fragment_add(subj) Fragment_delete(subj, key) Fragment_rename(subj, key) Fragment_change(subj, key) Fragment_fetch(subj) ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ Globals:     $FRAGMENT_FILE prefix for fragment files, specifying the path and any leading text   $FRAGMENT_stored[] an array indexed by fragment file name: each element is an array of fragments indexed by fragment name. * comment * GCD.nm ------------------------------------------------------------------------- gcd_r gcd_r(a, b): greatest common divisor (recursive part)   (requires macro file GCD.nm) gcd gcd(a, b): greatest common divisor   (requires macro file GCD.nm) GCD.nm Functions in file GCD.nm: ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ gcd_r(a, b) gcd(a, b) * comment * GoThereGrep.nm ----------------------------------------------------------------- goThereGrep goThereGrep(): attempt to move to a line in a file specified by the current line in "grep -n" format, ie ::content. It colors the current line (and subsequent/previous lines referencing the same destination), then attempts to open the file mentioned and go to the line number. If this works, and if the content part of the current line (combined with the content parts of subsequent/previous lines with the same reference) does not match the destination, a calltip is produced for the newly opened/raised file document, with the reference content. (This is particularly useful for GNU compiler output: the messages are in "grep -n" format, so this can open a faulty source file and display the error message where the fault was found.)   (requires macro file GoThereGrep.nm) GoThereGrep.nm Functions in file GoThereGrep.nm: ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ goThereGrep() * comment * GoThereSunCC.nm ---------------------------------------------------------------- goThereSunCC goThereSunCC(): attempt to move to a line in a file specified by the current line in "CC output" format from Sun's CC/cc compilers, ie "", line :. Any following lines starting with tabs are included as content, part of a compiler message. It colors the current line (and subsequent content lines referencing the same destination), then attempts to open the file mentioned and go to the line number. If this works, a calltip is produced for the newly opened/raised file document, with the message content.   (requires macro file GoThereSunCC.nm) GoThereSunCC.nm Functions in file GoThereSunCC.nm: ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ goThereSunCC() * comment * GoThereSunJavac.nm ------------------------------------------------------------- goThereSunJavac goThereSunJavac(): attempt to move to a line in a file specified by the current line in "grep -n" format from Sun's javac compilers, ie ::. Any following lines are included as content, upto a line containing a single carat (^) or upto another line in "grep -n" format. All this is treated as a compiler message. It colors the current line (and subsequent content lines referencing the same destination), then attempts to open the file mentioned and go to the line number. If this works, a calltip is produced for the newly opened/raised file document, with the message content. If a line with a carat is found, it is assumed to give the position of an error in the code line, which is reproduced as the line immediately preceding the one with the carat. The position in the source code line is calculated using this information, and the calltip message shortened accordingly.   (requires macro file GoThereSunJavac.nm) GoThereSunJavac.nm Functions in file GoThereSunJavac.nm: ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ goThereSunJavac() * comment * HStoHTML-dbg.nm ---------------------------------------------------------------- HighlightToHTML HighlightToHTML(): takes the current window and creates a new one with HTML markup matching the syntax highlighting. If the word "detab" is supplied as a parameter, detab the output using $tab_dist as the tab setting.   (requires macro file HStoHTML-dbg.nm) HighlightToHTML_Merge HighlightToHTML_Merge(resH, resT): helper routine.   (requires macro file HStoHTML-dbg.nm) HighlightToHTML_PrettyPage HighlightToHTML_PrettyPage(): calls HighlightToHTML(expTabs, pageBg, rulesBg, preBg) to provide the text of a file in a
 block, within a table
	following a heading holding the file name.
 
(requires macro file HStoHTML-dbg.nm)

HighlightToHTML_bgColor
HighlightToHTML_bgColor(col, defCol): helper to set up a color attribute.
 
(requires macro file HStoHTML-dbg.nm)

HStoHTML-dbg.nm
Functions in file HStoHTML-dbg.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
HighlightToHTML()
HighlightToHTML_Merge(resH, resT)
HighlightToHTML_PrettyPage()
HighlightToHTML_bgColor(col, defCol)

* comment *
MakeMacroCallTips.nm -----------------------------------------------------------

MakeMacroCallTips
MakeMacroCallTips(macro_dir): scans the directory identified by macro_dir
       (defaulting to the value of $NEDIT_MACRO_DIR) for files matching *.nm.
       Each of these files is scanned for macro function definitions (of form
       "define functionName") and any comments preceding these. The function
       names and comments are assembled into a calltip-file formatted string,
       which is returned.
 
       NB You need to write the returned string to a file or insert it into a
       document to keep your results.
 
(requires macro file MakeMacroCallTips.nm)

MakeMacroCallTips.nm
Functions in file MakeMacroCallTips.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
MakeMacroCallTips(macro_dir)

* comment *
MakeMacroCallTipsDbg.nm --------------------------------------------------------

MakeMacroCallTipsDbg
MakeMacroCallTipsDbg(macro_dir): scans the directory identified by macro_dir
       (defaulting to the value of $NEDIT_MACRO_DIR) for files matching *.nm.
       Each of these files is scanned for macro function definitions (of form
       "define functionName") and any comments preceding these. The function
       names and comments are assembled into a calltip-file formatted string,
       which is returned.
 
       NB You need to write the returned string to a file or insert it into a
       document to keep your results.
 
       This is the debugging version of MakeMacroCallTips.nm.
 
(requires macro file MakeMacroCallTipsDbg.nm)

MakeMacroCallTipsDbg.nm
Functions in file MakeMacroCallTipsDbg.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
MakeMacroCallTipsDbg(macro_dir)

* comment *
ManHelp.nm ---------------------------------------------------------------------

ManHelp
ManHelp(): calls man(1) for either the selected text or for the current word
       or a user-supplied man subject. The result is written to a window, with
       the "Man page output" language set, which may replace or append to
       previous output of this command. Rangesets are used instead of bold
       and underline/italic.
 
(requires macro file ManHelp.nm)

ManHelp.nm
Functions in file ManHelp.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
ManHelp()

* comment *
ModeString.nm ------------------------------------------------------------------

ModeStringInterpret
ModeStringInterpret(default_language): looks for mode strings in the current
       document, and interprets them.
 
(requires macro file ModeString.nm)

ModeStringInterpret_vi
ModeStringInterpret_vi(string, settings): augments the editor settings
       information in settings[] with values taken from string, a "mode line".
       This is used internally by ModeStringInterpret() for vi-style mode
       lines.
 
(requires macro file ModeString.nm)

ModeStringInterpret_emacs
ModeStringInterpret_vi(string, settings): augments the editor settings
       information in settings[] with values taken from string, a "mode line".
       This is used internally by ModeStringInterpret() for EMACS-style mode
       lines.
 
(requires macro file ModeString.nm)

ModeString.nm
Functions in file ModeString.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
ModeStringInterpret(default_language)
ModeStringInterpret_vi(string, settings)

* comment *
NEDIT_LOADED.nm ----------------------------------------------------------------

NEDIT_readable_file_exists
NEDIT_readable_file_exists(filename): tests filename to see if it refers to
	an existing file. Returns zero on failure.
 
Parameters:
	$1 - filename to test - the current directory of the subshell will be
	     used: this may cause surprises...
 
(requires macro file NEDIT_LOADED.nm)

NEDIT_reduce_filename
NEDIT_reduce_filename(filename): returns the filename without "//" or "/./".
 
Parameters:
	$1 - filename.
 
(requires macro file NEDIT_LOADED.nm)

NEDIT_remove_dotdot
NEDIT_remove_dotdot(filename): returns the filename without "/../".
 
Parameters:
	$1 - filename.
 
(requires macro file NEDIT_LOADED.nm)

NEDIT_find_file_in_pathlist
NEDIT_find_file_in_pathlist(filename, list): tests filename to see if it
	refers to an existing file in one of the given paths of the
	"\n"-separated list. Relative file paths use the value of the
	$NEDIT_START_DIR variable, and not the current working directory.
	Returns the fully qualified name of the first file found, or "" on
	failure.
 
Parameters:
	$1 - filename to test
	$2 - "\n"-separated list of paths
 
(requires macro file NEDIT_LOADED.nm)

NEDIT_display_settings
NEDIT_display_settings(): display the values of various NEDIT loader settings
	in a dialog box.
 
Parameters:
	none.
 
(requires macro file NEDIT_LOADED.nm)

NEDIT_require_macro_file
NEDIT_require_macro_file(macro_filename): searches for the given file, and
	if found, reads it as a macro file (if not already read).
	It searches along the path in $NEDIT_MACRO_SEARCH_PATH.
	Using this function sets up a sort of "include" mechanism which avoids
	circular dependencies.
	Returns non-zero if (already?) loaded.
 
Parameters:
	$1 - name of macro file to load.
	$2 - prefix for path search list (use "\n" separators if necessary)
	$3 - suffix for path search list (use "\n" separators if necessary)
 
$2 and $3 can be used, for example, to add a search in $file_path, if needed.
 
(requires macro file NEDIT_LOADED.nm)

NEDIT_reload_macro_file
NEDIT_reload_macro_file(macro_filename): searches for the given file, and
	if found, reads it as a macro file. Basically this is just like
	NEDIT_require_macro_file(), but always attempts the load.
	It searches along the path in $NEDIT_MACRO_SEARCH_PATH.
	Using this function sets up a sort of "include" mechanism which avoids
	circular dependencies.
	Returns non-zero if loaded.
 
Parameters:
	$1 - name of macro file to load.
	$2 - prefix for path search list (use "\n" separators if necessary)
	$3 - suffix for path search list (use "\n" separators if necessary)
 
$2 and $3 can be used, for example, to add a search in $file_path, if needed.
 
(requires macro file NEDIT_LOADED.nm)

NEDIT_reload_all_macro_files
NEDIT_reload_all_macro_files([feedback]): runs through the list of loaded
	macro files, reloading them. If feedback is absent, or is true, dialogs
	are displayed as each file is loaded.
 
(requires macro file NEDIT_LOADED.nm)

NEDIT_show_macro_files
NEDIT_show_macro_files(): lists full macro file loading information.
 
(requires macro file NEDIT_LOADED.nm)

NEDIT_show_macro_file_names
NEDIT_show_macro_file_names(): lists those macro files loaded using
	NEDIT_require_macro_file(), as their names were indicated. (This is
	just part of the information provided by NEDIT_show_macro_files().)
 
(requires macro file NEDIT_LOADED.nm)

NEDIT_request_reload_macro_file
NEDIT_request_reload_macro_file([file]): if file is not given, prompts the
	user for which already loaded macro file to be reloaded. If it is
	currently being edited and has been modified, requests the user to save
	it first.
 
(requires macro file NEDIT_LOADED.nm)

NEDIT_request_edit_macro_file
NEDIT_request_edit_macro_file(): prompts the user for which macro file to be
	opened for editing.
 
(requires macro file NEDIT_LOADED.nm)

NEDIT_show_settings
NEDIT_show_settings(): displays NEDIT_LOADED settings in a dialog.
 
(requires macro file NEDIT_LOADED.nm)

NEDIT_LOADED.nm
Functions in file NEDIT_LOADED.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
NEDIT_readable_file_exists(filename)
NEDIT_reduce_filename(filename)
NEDIT_remove_dotdot(filename)
NEDIT_find_file_in_pathlist(filename, list)
NEDIT_display_settings()
NEDIT_require_macro_file(macro_filename)
NEDIT_reload_macro_file(macro_filename)
NEDIT_reload_all_macro_files([feedback])
NEDIT_show_macro_files()
NEDIT_show_macro_file_names()
NEDIT_request_reload_macro_file([file])
NEDIT_request_edit_macro_file()
NEDIT_show_settings()
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Globals:
 
$NEDIT_LOADED: list of macro files loaded using NEDIT_require_macro_file()
$NEDIT_LOADED_SHORT: list of macro file names as passed to
	NEDIT_require_macro_file()
$NEDIT_MACRO_DIR_NAME: name of user-specific macro file directory relative to
	$NEDIT_HOME_DIR
$NEDIT_HOME_DIR: path of user's nedit home directory, seeded from the
	NEDIT_HOME environment variable (defaults to ~/.nedit)
$NEDIT_START_DIR: path of directory in which NEdit is running
	(when loading this file, NEDIT_LOADED.nm, for the first time)
$NEDIT_MACRO_DIR: full path of user-specific macro file directory
$NEDIT_MACRO_SEARCH_PATH: contents of env variable of same name, defaults to
	$NEDIT_START_DIR followed by $NEDIT_MACRO_DIR. Note that ":" and " "
	separators are changed to "\n"s
 
$NEDIT_MACRO: an array that can be initialised with various preferences in
	autoload.nm, copied to some of the global variables on loading:
		["MACRO_DIR_NAME"] - copied to $NEDIT_MACRO_DIR_NAME
		["HOME_DIR"] - copied to $NEDIT_HOME_DIR
		["MACRO_DIR"] - copied to $NEDIT_MACRO_DIR
		["MACRO_SEARCH_PATH"] - copied to $NEDIT_MACRO_SEARCH_PATH

* comment *
PlainText.nm -------------------------------------------------------------------

PlainText_setSettings
PlainText_setSettings(): toggles the PlainText configuration switches.
 
(requires macro file PlainText.nm)

PlainText_startOfLine
PlainText_startOfLine(position): Returns the position of the first character
	on the line containing the position passed.
 
(requires macro file PlainText.nm)

PlainText_endOfLine
PlainText_endOfLine(position): Returns the position of the newline character
	at the end of the line containing the position passed, or the end of the
	file.
 
(requires macro file PlainText.nm)

PlainText_getLine
PlainText_getLine(position): Returns a copy of the current line upto the
	position.
 
(requires macro file PlainText.nm)

PlainText_getWholeLine
PlainText_getWholeLine(position): Returns a copy of the current line upto the
	end of the line.
 
(requires macro file PlainText.nm)

PlainText_getCommonPrefix
PlainText_getCommonPrefix(position): finds the common prefix between the
	current and previous lines, and returns it. The position in the string
	of the first character not of the prefix (ie the prefix length) is
	returned in $PlainText_firstColPos
 
(requires macro file PlainText.nm)

PlainText_getFirstCol
PlainText_getFirstCol(line, col, pos): Returns the column of the first
	non-space character in line. The position in the string of the character
	is given in $PlainText_firstColPos.
 
(requires macro file PlainText.nm)

PlainText_getBreakPos
PlainText_getBreakPos(line, m_right, col): Returns the position of the
	character following the space/tab sequence which comes before or
	runs over the column specified by m_right (default $wrap_margin).
	Column counting starts from col (default 0), which must be less than
	m_right. If no break is needed, returns zero.
 
(requires macro file PlainText.nm)

PlainText_NewlineMacro
PlainText_NewlineMacro(position): Macro called for the plain text language's
	automatic newlining. Returns 0 or -1.
Note: Newline macros will be called by NEdit if automatic word wrap is used.
If this is the case, the Newline macro commands get called after the type-in
commands, with the same position ($1). If the action routine newline() was
called, however, the position in the two commands will be different.
 
(requires macro file PlainText.nm)

PlainText_prefixFill
PlainText_prefixFill(position, prefix, margin): starting at the beginning of
	the line containing position, the following line is checked to see if it
	has the given prefix and some following text. If it does, it is joined
	to the current line, then the current line is broken if too long.
 
(requires macro file PlainText.nm)

PlainText_TypeInMacro
PlainText_TypeInMacro(position, charactersTyped): Macro called (through the
	insert_string() action) for the plain text language's text entry. It
	implicitly calls the newline macro by calling the newline() action when
	the typing cursor on a line reaches the wrap margin.
	Since multiple characters can be entered using insert_string(), and
	here we can only guarantee useful handling of one character at a time,
	we quit if the string length is not 1.
 
(requires macro file PlainText.nm)

PlainText_getLineEnd
PlainText_getLineEnd(text, pos): scans text starting from pos until a newline
	or the end of text is found. Returns the position after the newline.
 
(requires macro file PlainText.nm)

PlainText_getLineBegin
PlainText_getLineBegin(text, pos): scans text backwards starting from pos
	until a newline or the start of text is found. Returns the position
	after the newline, or zero.
 
(requires macro file PlainText.nm)

PlainText_LineNonEmpty
PlainText_LineNonEmpty(text, pos): returns 0 if the (first) line passed is
	empty or contains only spaces. Otherwise, it returns the position after
	the newline character. Searching starts at pos, if passed.
 
(requires macro file PlainText.nm)

PlainText_ParagraphBegin
PlainText_ParagraphBegin(text, beg): get paragraph end position from input
	text, starting the analysis at beg.
 
(requires macro file PlainText.nm)

PlainText_ParagraphEnd
PlainText_ParagraphEnd(text, beg): get paragraph end position from input text,
	starting the analysis at beg.
 
(requires macro file PlainText.nm)

PlainText_GetLeftMargins
PlainText_GetLeftMargins(text, col, start, end): returns a triplet, separated
	by spaces.
 
	If the paragraph is empty (an empty line):
		-1 start end_of_line_pos
	If the paragraph has one line:
		left_margin -1 end_of_line_pos
	If the paragraph has two or more lines:
		left_margin 2nd_left_margin end_of_line_pos
 
(requires macro file PlainText.nm)

PlainText_ParagraphMargins
PlainText_ParagraphMargins(text, col, start): returns left margins for the
	first paragraph in the text - one for the first line, and one for the
	second. If no second line is present, and the next (non-empty) paragraph
	has the same first line margin, tries to find the second line margin of
	that paragraph etc. until either all paragraphs are exhaused, or the
	next paragraph starts at a different position.
 
(requires macro file PlainText.nm)

PlainText_IndentString
PlainText_IndentString(indent, col): returns a string suitable for use as a
	left indent.
 
(requires macro file PlainText.nm)

PlainText_1ParagraphFill
PlainText_1ParagraphFill(text, col, start, end, m1, m2): returns the text
	from start to end filled out according to left margins m1 and m2, and
	right margin $wrap_margin. start and end are assumed to be properly
	set for the paragraph. col gives the initial column position.
 
(requires macro file PlainText.nm)

PlainText_ParagraphFill
PlainText_ParagraphFill(text, col, start, end, m1, m2): returns the text
	from start to end filled out according to left margins m1 and m2, and
	right margin $wrap_margin. start and end are assumed to be properly
	set for the paragraph. col gives the initial column position.
 
(requires macro file PlainText.nm)

PlainText.nm
Functions in file PlainText.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
PlainText_setSettings()
PlainText_startOfLine(position)
PlainText_endOfLine(position)
PlainText_getLine(position)
PlainText_getWholeLine(position)
PlainText_getCommonPrefix(position)
PlainText_getFirstCol(line, col, pos)
PlainText_getBreakPos(line, m_right, col)
PlainText_NewlineMacro(position)
PlainText_prefixFill(position, prefix, margin)
PlainText_TypeInMacro(position, charactersTyped)
PlainText_getLineEnd(text, pos)
PlainText_getLineBegin(text, pos)
PlainText_LineNonEmpty(text, pos)
PlainText_ParagraphBegin(text, beg)
PlainText_ParagraphEnd(text, beg)
PlainText_GetLeftMargins(text, col, start, end)
PlainText_ParagraphMargins(text, col, start)
PlainText_IndentString(indent, col)
PlainText_1ParagraphFill(text, col, start, end, m1, m2)
PlainText_ParagraphFill(text, col, start, end, m1, m2)

* comment *
REGEX_store.nm -----------------------------------------------------------------

REGEX_open_regexes_file
REGEX_open_regexes_file(): opens the regex repository file for editing. (The
       file is in $NEDIT_HOME/datafiles/REGEXes.)
 
(requires macro file REGEX_store.nm)

REGEX_load_regexes
REGEX_load_regexes(): loads a file of useful regex expressions. These are
       stored as \t pairs, one per line, in the file.
 
(requires macro file REGEX_store.nm)

REGEX_save_regexes
REGEX_save_regexes(): saves the array of useful regex expressions. These are
       stored as \t pairs, one per line, in the file.
 
(requires macro file REGEX_store.nm)

REGEX_add
REGEX_add(): prompts for a new regex to store, with its name.
 
(requires macro file REGEX_store.nm)

REGEX_delete
REGEX_delete(name): prompts the user whether he wants to delete the regex with
       the given key. Returns an error string, which is empty if deletion was
       chosen.
 
(requires macro file REGEX_store.nm)

REGEX_fetch
REGEX_fetch(): prompts the user with the list of regex names; the buttons
       indicate possible actions.
 
(requires macro file REGEX_store.nm)

REGEX_store.nm
Functions in file REGEX_store.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
REGEX_open_regexes_file()
REGEX_load_regexes()
REGEX_save_regexes()
REGEX_add()
REGEX_delete(name)
REGEX_fetch()

* comment *
RScolor.nm ---------------------------------------------------------------------

RangeSet_mapToDark
RangeSet_mapToDark(color [, mul, div]): takes some "standard" color names and
       returns dark versions of them if background_is_dark() returns true. Also
       accepts hexadecimal color specifications of the form #rrggbb and
       multiplies each color's value by mul/div (by default 1/2). This division
       is avoided if the specification is an unrecognised color or if it starts
       with "=" (in which case the "=" is removed).
 
(requires macro file RScolor.nm)

RangeSet_set_color
RangeSet_set_color(name[, color [, mul, div]]): sets the range set color, or
       clears it. This uses RangeSet_set_color_basic(), overriding the version
       in RSextensions.nm. Factors mul and div, if supplied, are passed to
       RangeSet_mapToDark().
 
(requires macro file RScolor.nm)

RangeSet_QuickColor
RangeSet_QuickColor([rs]): prompts the user for a color for the given range
       set named rs from a fixed list. It will create the range set if it
       doesn't already exist. If name is empty, it will prompt for a non-empty
       name. It returns the name used, failing with the empty string.
 
(requires macro file RScolor.nm)

RScolor.nm
Functions in file RScolor.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
RangeSet_mapToDark(color [, mul, div])
RangeSet_set_color(name[, color [, mul, div]])
RangeSet_QuickColor([rs])

* comment *
RSextensions.nm ----------------------------------------------------------------

RangeSet_forceName
RangeSet_forceName(id): returns the name of a range set, defining it if
       necessary.
 
(requires macro file RSextensions.nm)

RangeSet_setGlobals
RangeSet_setGlobals(id, name, index[, nolist]): fetches information about the
       given range set and a range within it. If a fourth argument is supplied,
       the list of all range sets is not re-evaluated.
 
(requires macro file RSextensions.nm)

RangeSet_getRangeSet
RangeSet_getRangeSet(name[, create]): returns a range set identifier for the
       given name. If the second parameter is present and true, a new range
       set may be created; otherwise an existing set is returned.
 
(requires macro file RSextensions.nm)

RangeSet_getNewRangeSet
RangeSet_getNewRangeSet(name): returns a possibly new range set identifier for
       the given name.
 
(requires macro file RSextensions.nm)

RangeSet_AddRem
RangeSet_AddRem(op, id)
RangeSet_AddRem(op, id, start, end)
RangeSet_AddRem(op, id, other_name): Adds to or removes from the range set
       identified by id. The first form adds or removes the current selection
       range. The second adds or removes the range start, end. The third adds
       or removes all ranges from the existing set named other_name.
       The operation is add if op >= 0, remove otherwise. Returns the result of
       rangeset_add() if it is invoked. It does not return a value if
       rangeset_subtract() is invoked.
 
(requires macro file RSextensions.nm)

RangeSet_defined
RangeSet_defined([name[, index]]): returns a range set identifier for the
       given name. If index is present, this is used to interrogate a
       particular range in the set - true is returned if it exists. If there
       are no arguments, the number of rangesets defined is returned. As a side
       effect, the globals are set to match the named range set (if any) or are
       cleared.
 
(requires macro file RSextensions.nm)

RangeSet_get_count
RangeSet_get_count(name): returns the number of ranges in the given
       range set, or zero if the range set is non-existent.
 
(requires macro file RSextensions.nm)

RangeSet_remove
RangeSet_remove(name)
RangeSet_remove(name, start, end)
RangeSet_remove(name, other_name): calls RangeSet_AddRem() appropriately.
 
(requires macro file RSextensions.nm)

RangeSet_add
RangeSet_add(name)
RangeSet_add(name, start, end)
RangeSet_add(name, other_name): calls RangeSet_AddRem() appropriately.
 
(requires macro file RSextensions.nm)

RangeSet_inverse
RangeSet_inverse(name): inverts the range set, returning the new number of
       entries.
 
(requires macro file RSextensions.nm)

RangeSet_forget
RangeSet_forget(name): deletes the range set.
 
(requires macro file RSextensions.nm)

RangeSet_select
RangeSet_select(name[, index]): selects the whole span of the range set or
       just that of the relevant range if index is supplied.
 
(requires macro file RSextensions.nm)

RangeSet_includes_pos
RangeSet_includes_pos(name, pos): returns true if the given range set has a
       range including the given position.
 
(requires macro file RSextensions.nm)

RangeSet_set_color_basic
RangeSet_set_color_basic(name[, color]): sets the range set color, or clears
       it.
 
(requires macro file RSextensions.nm)

RangeSet_set_modify_response
RangeSet_set_modify_response(name, mode): sets the rangeset modify response.
 
(requires macro file RSextensions.nm)

rangeset_fetch
rangeset_fetch(name, [setting, value,] ...): returns the named range set,
       creating it if necessary. Any further parameters are assembled as
       key/value pairs in an array and passed to rangeset_set() if the
       range set has just been created. Returns the range set identifier.
 
(requires macro file RSextensions.nm)

RangeSet_list
RangeSet_list(): returns a list of rangeset names as a string with entries
       separated by newlines.
 
(requires macro file RSextensions.nm)

rangeset_clear
rangeset_clear(id): removes all ranges from the range set.
 
(requires macro file RSextensions.nm)

rangeset_set
rangeset_set(id, array): uses keys in array to identify values to set, and
       applies those values. Acceptable settings are "color", "mode" and
       "name".
 
(requires macro file RSextensions.nm)

RSextensions.nm
Functions in file RSextensions.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
RangeSet_forceName(id)
RangeSet_setGlobals(id, name, index[, nolist])
RangeSet_getRangeSet(name[, create])
RangeSet_getNewRangeSet(name)
RangeSet_AddRem(op, id)
RangeSet_defined([name[, index]])
RangeSet_get_count(name)
RangeSet_remove(name)
RangeSet_add(name)
RangeSet_inverse(name)
RangeSet_forget(name)
RangeSet_select(name[, index])
RangeSet_includes_pos(name, pos)
RangeSet_set_color_basic(name[, color])
RangeSet_set_modify_response(name, mode)
rangeset_fetch(name, [setting, value,] ...)
RangeSet_list()
rangeset_clear(id)
rangeset_set(id, array)

* comment *
RSfileMerge.nm -----------------------------------------------------------------

fileMerge_read_file
fileMerge_read_file(file): evaluates the full path for the file name given,
       using the current window's path for relative paths. It then tries to
       read the file there. Returns an array, which is empty on failure, and
       contains the content of the file at index zero otherwise.
         The reason for this function is that the read/write_file() NEdit
       built-in functions do not take the window's current path into account.
       Rather, relative file names are evaluated from the directory from which
       NEdit was invoked.
 
(requires macro file RSfileMerge.nm)

fileMerge_write_file
fileMerge_write_file(buffer, file): evaluates the full path for the file name given,
       using the current window's path for relative paths. It then tries to
       write the buffer contents to the file there. Returns a true (non-zero)
       value if successful, false (zero) otherwise.
         The reason for this function is that the read/write_file() NEdit
       built-in functions do not take the window's current path into account.
       Rather, relative file names are evaluated from the directory from which
       NEdit was invoked.
 
(requires macro file RSfileMerge.nm)

fileMerge_hexVal
fileMerge_hexVal(hexStr): convert hexStr as hexadecimal string to a number.
 
(requires macro file RSfileMerge.nm)

fileMerge_mapRSbg_ask
fileMerge_mapRSbg_ask(): asks whether a bright or dark background should be
       assumed. It then recolors existing known rangesets appropriately.
 
(requires macro file RSfileMerge.nm)

fileMerge_mapRSbg
fileMerge_mapRSbg(color): uses get_style_at_pos() to try to determine whether
       the background is "light" or "dark". It then uses the color string to
       decide on a correct value.
 
(requires macro file RSfileMerge.nm)

fileMerge_nameRSbg
fileMerge_nameRSbg(color): maps the given color name to the "original" color.
 
(requires macro file RSfileMerge.nm)

fileMerge_extract_diffinfo
fileMerge_extract_diffinfo(difftext): scans difftext looking for lines of the
       form "diff -options file1 file2". Returns the information in an array of
       six entries:
               [0] diff_num    - index number of info string
               [1] diffpos     - position of start of diff command
               [2] startpos    - position of start of diff information
               [3] endpos      - position of end of diff information
               [4] file1       - name of file 1
               [5] file2       - name of file 2
               [6] diff line   - what was chosen
       Fails with an empty array.
 
(requires macro file RSfileMerge.nm)

fileMerge_ask_for_diff_line
fileMerge_ask_for_diff_line(diffinfo): Uses information from diffinfo to
       present lines of the form "diff -options file1 file2" to the user in a
       list_dialog(). The user chooses an entry, and this function returns a 7
       element array in the format:
               [0] diff_num    - index number of info string
               [1] diffpos     - position of start of diff command
               [2] startpos    - position of start of diff information
               [3] endpos      - position of end of diff information
               [4] file1       - name of file 1
               [5] file2       - name of file 2
               [6] diff line   - what was chosen
               [7] diff choice - "Analyse", "Locate", "Forget", "Copy"
                                 operation
       Fails with an empty array.
 
(requires macro file RSfileMerge.nm)

fileMerge_ask_for_mdiff_line
fileMerge_ask_for_mdiff_line(diffinfo): Uses information from diffinfo to
       present lines of the form "diff -options file1 file2" to the user in a
       list_dialog(). The user chooses an entry, and this function returns a 7
       element array in the format:
               [0] diff_num    - index number of info string
               [1] diffpos     - position of start of diff command
               [2] startpos    - position of start of diff information
               [3] endpos      - position of end of diff information
               [4] file1       - name of file 1
               [5] file2       - name of file 2
               [6] diff line   - what was chosen
               [7] diff choice - "Analyse", "Locate", "Forget", "Copy"
                                 operation
       Fails with an empty array.
 
(requires macro file RSfileMerge.nm)

fileMerge_get_diff_data
fileMerge_get_diff_data(difftext, info): extracts diff data given difftext
       and an information string as returned by fileMerge_ask_for_diff_line().
       Fails with an empty string.
 
(requires macro file RSfileMerge.nm)

fileMerge_is_lines_info
fileMerge_is_lines_info(line): returns true if the line specifies ranges of
       lines to add/change/delete.
 
(requires macro file RSfileMerge.nm)

fileMerge_get_lines_range
fileMerge_get_lines_range(range): if the range string looks like N, returns
       "N\nN\n" (doubling up the only value); if it looks like "N,M", returns
       "N\nM\n".
 
(requires macro file RSfileMerge.nm)

fileMerge_get_lines_info
fileMerge_get_lines_info(line): returns an information string about the
       ranges of lines to add/change/delete as held in the line passed. The
       information is returned in a string of format:
               operation               - a:add, d:delete, c: change
               file1_from              - from line for first file
               file1_to                - to line for first file
               file2_from              - from line for second file
               file2_to                - to line for second file
 
(requires macro file RSfileMerge.nm)

fileMerge_RS_recolor
fileMerge_RS_recolor(RS, color, check): if check is positive and the rangeset
       is defined, does nothing; otherwise, colors the rangeset with the
       desired color, creating it if check is non-negative. If no color is
       given, just makes sure the rangeset exists, creating it if necessary.
       The modify response is set to break.
 
(requires macro file RSfileMerge.nm)

fileMerge_RS_color
fileMerge_RS_color(RS, color): defines the new rangeset with the desired
       color. The modify response is set to break.
 
(requires macro file RSfileMerge.nm)

fileMerge_RS_makeModified
fileMerge_RS_makeModified(): uses $fileMergeRSModNames as names of range sets
       to add to the "Modified" rangeset.
 
(requires macro file RSfileMerge.nm)

fileMerge_display_file_mergeFWD
fileMerge_display_file_mergeFWD(diffdata, info [, lang]): opens the first file
       of the diff and integrates info about the second file, using the
       difference data in diffdata. This is done backwards. A default language
       mode lang can be provided.
 
(requires macro file RSfileMerge.nm)

fileMerge_openOld
fileMerge_openOld(diffdata, info [, lang]): opens the first file of the diff
       and colors the areas which were changed or deleted in the second. A
       default language mode lang can be provided.
 
(requires macro file RSfileMerge.nm)

fileMerge_display_file_mergeREV
fileMerge_display_file_mergeREV(diffdata, info [, lang]): opens the second
       file of the diff and integrates info about the first file, using the
       difference data in diffdata. This is done backwards.
         It works "backward" with respect to fileMerge_display_file_mergeFWD(),
       hence the name.
       A default language mode lang can be provided.
         This function is intended for use with CVS where you want to compare
       available current images against CVS' last checkin (via 'cvs diff')
 
(requires macro file RSfileMerge.nm)

fileMerge_openNew
fileMerge_openNew(diffdata, info [, lang]): opens the second file of the diff
       and colors the areas which were changed or added to the first. A default
       language mode lang can be provided.
 
(requires macro file RSfileMerge.nm)

fileMerge_diff_details
fileMerge_diff_details(title): presents information about the differences
       found between files for the merged result (assumed to be in the current
       window) in a string. The parameter title is prefixed on the front.
 
(requires macro file RSfileMerge.nm)

fileMerge_rework_display
fileMerge_rework_display(ins_pos, diffdata, filedata, rA, rD, rO, rN): takes
       a broken-up set of changes (created by diff listed in diffdata) and
       merges them into the current text at ins_pos. filedata contains the
       text of the old (left hand) file of broken-up change text. rA, rD, rO,
       rN are the various rangesets.
 
(requires macro file RSfileMerge.nm)

fileMerge_rework_changes
fileMerge_rework_changes([index]): takes each pair of old/new change rangeset
       ranges and analyses them on a word by word (rather than line by line)
       basis. If index is provided and is in range, only the individual change
       identified by the ranges it addresses in the old/new change rangesets
       will be handled.
 
(requires macro file RSfileMerge.nm)

fileMerge_CopyLeftRight
fileMerge_CopyLeftRight(fLeft, fRight): copies file1 to file2 or vice-versa
       according to choices picked from dialogs. Returns an empty array on
       failure; a two-entry array [0] = fromFile / [1] = toFile if successful.
 
(requires macro file RSfileMerge.nm)

fileMerge_from_diff
fileMerge_from_diff([rework [, rev]]): interprets the current window as the
       output of a plain diff command, such as "diff file-old file-new". It
       expects the diff command to be present. (Fine for executing diff with
       the keypad enter key or Shell->Execute Command Line option.)
 
       If the rework parameter is present and "true", change reworking will
       be applied.
 
       If the rev parameter is present and "true", the base file used for
       merging will be the right hand file, not the left.
 
       If you want multiple differences to be calculated, you should issue
       commands like (in sh):
for f in *.c; do [ -f $f.old ] && (echo diff $f.old $f; diff $f.old $f); done
       For directory compares, diff puts in the "echo" part in itself.
 
(requires macro file RSfileMerge.nm)

RSfileMerge.nm
Functions in file RSfileMerge.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
fileMerge_read_file(file)
fileMerge_write_file(buffer, file)
fileMerge_hexVal(hexStr)
fileMerge_mapRSbg_ask()
fileMerge_mapRSbg(color)
fileMerge_nameRSbg(color)
fileMerge_extract_diffinfo(difftext)
fileMerge_ask_for_diff_line(diffinfo)
fileMerge_ask_for_mdiff_line(diffinfo)
fileMerge_get_diff_data(difftext, info)
fileMerge_is_lines_info(line)
fileMerge_get_lines_range(range)
fileMerge_get_lines_info(line)
fileMerge_RS_recolor(RS, color, check)
fileMerge_RS_color(RS, color)
fileMerge_RS_makeModified()
fileMerge_display_file_mergeFWD(diffdata, info [, lang])
fileMerge_openOld(diffdata, info [, lang])
fileMerge_display_file_mergeREV(diffdata, info [, lang])
fileMerge_openNew(diffdata, info [, lang])
fileMerge_diff_details(title)
fileMerge_rework_display(ins_pos, diffdata, filedata, rA, rD, rO, rN)
fileMerge_rework_changes([index])
fileMerge_CopyLeftRight(fLeft, fRight)
fileMerge_from_diff([rework [, rev]])

* comment *
RSfindAll.nm -------------------------------------------------------------------

rangeset_FindAll
rangeset_FindAll(rsid, pattern, pattype): search the current document for all
       occurrences of pattern using the search type pattype, and add all these
       occurrences as ranges to the range set whose identifier is rsid.
 
(requires macro file RSfindAll.nm)

RangeSet_FindAll
RangeSet_FindAll(rs, pattern, pattype): search the current document for all
       occurrences of pattern using the search type pattype, and add all these
       occurrences as ranges to the range set named rs. It does this by calling
       rangeset_FindAll().
 
(requires macro file RSfindAll.nm)

RangeSet_FindAll_Ask
RangeSet_FindAll_Ask([rs[, action]]): ask for FindAll information, then use
       the range set named rs (which may be created with RangeSet_QuickColor())
       to store all found occurrences. The parameter action can be one of
       "add", "replace", "recreate" or "ask" (default "ask") - the found ranges
       are added to the range set normally ("add"), following a removal of all
       ranges ("replace"), or following the deletion and recreation of the
       named range ("recreate"). If set to "ask", a dialog will prompt the user
       for the action to take.
 
       Recreation is useful if another range set might obscure the coloring of
       rs.
 
(requires macro file RSfindAll.nm)

RangeSet_FindAll_Ask_AllDocs
RangeSet_FindAll_Ask_AllDocs([rs]): uses rs as a range set name to be used in
       all currently open documents. If no rs was supplied, the name is
       requested, and if necessary the range set is created and colored in the
       current document. The name and color are then stored, and the range set
       deleted. Next ask for FindAll information, then use the range set named
       rs to store all found occurrences in each open document. In each
       document the range set is deleted and, if needed, recreated. Finally,
       list all results, allowing the user to navigate to them or to dump them
       as part of the return value array (which is otherwise empty).
 
       The returned array, if not empty, contains:
           ["pattern"]     The pattern used to search
           ["type"]        The search type
           ["index"]       The pattern's position in the FindAll history
           ["occurrences"] The number of occurrences found in all documents
           ["results"]     The results formatted as
                             FileSpec:LineNumber:=Position:FirstLineOfMatch
 
(requires macro file RSfindAll.nm)

RSfindAll.nm
Functions in file RSfindAll.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
rangeset_FindAll(rsid, pattern, pattype)
RangeSet_FindAll(rs, pattern, pattype)
RangeSet_FindAll_Ask([rs[, action]])
RangeSet_FindAll_Ask_AllDocs([rs])

* comment *
RSnavigate.nm ------------------------------------------------------------------

RangeSet_NavigateWhich
RangeSet_NavigateWhich([rs [, ask]]): if rangeset name rs is supplied, it is
       checked for validity. If OK, it is returned. Otherwise, or if a second
       argument is supplied, a new rangeset name is requested from the user
       and returned. Whatever the result, $RS_Navigate["?"] is updated as
       as appropriate.
 
(requires macro file RSnavigate.nm)

RangeSet_Navigate
RangeSet_Navigate(rs, direction, selectit, center): "navigates" the given
       rangeset rs's ranges, asking for a valid rangeset if rs is empty or
       invalid. Each time this is called, the cursor is moved in the current
       window to the next or previous range in the set, if any.
       If the operation cannot be completed, a beep is issued. Direction
       should be a negative value for backward navigation; otherwise it is
       forward. If selectit is non-zero, the range "navigated to" is selected;
       if center is non-zero, the cursor line after cursor movement is centered
       in the window.
 
(requires macro file RSnavigate.nm)

RSnavigate.nm
Functions in file RSnavigate.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
RangeSet_NavigateWhich([rs [, ask]])
RangeSet_Navigate(rs, direction, selectit, center)

* comment *
RSselect.nm --------------------------------------------------------------------

RangeSet_names
RangeSet_names(): fetches names of all range sets, creating them if
	necessary. Returns the names as a zero-based array, with the newest
	range set's name at index 0.
 
(requires macro file RSselect.nm)

RangeSet_ask
RangeSet_ask(prompt): ask for a range set. It prompts for a range set name
	with a set of "recently defined" buttons. Returns the selected name
	or "".
 
(requires macro file RSselect.nm)

RangeSet_askExisting
RangeSet_askExisting(prompt [, multi]): ask for a range set. It uses a list
	dialog to present a list of existing set names. Returns the selected
	name or "". If a second parameter is present, multiple selection is
	performed, and an array is returned, empty if nothing selected.
 
(requires macro file RSselect.nm)

RangeSet_list_ask
RangeSet_list_ask(prompt, lines): ask for a range set and a line of text in
	the list lines. It prompts for a range set letter with a set of
	"recently defined" buttons. Returns the selected list entry and the
	selected range set in $RANGESET_SELECTED.
 
(requires macro file RSselect.nm)

RSselect.nm
Functions in file RSselect.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
RangeSet_names()
RangeSet_ask(prompt)
RangeSet_askExisting(prompt [, multi])
RangeSet_list_ask(prompt, lines)

* comment *
RSshowChange.nm ----------------------------------------------------------------

diff_with_saved
diff_with_saved(): opens a new window showing changes between the current
	editor window buffer and the file it represents.
REQUIRES RANGESETS
 
(requires macro file RSshowChange.nm)

RSshowChange.nm
Functions in file RSshowChange.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
diff_with_saved()

* comment *
STX-ETX.nm ---------------------------------------------------------------------

stx_etx
stx_etx(): adds newlines and tabs in front of the following control
       characters - stx, fs, gs, rs and etx. This is for validating simple
       line protocols.
 
(requires macro file STX-ETX.nm)

STX-ETX.nm
Functions in file STX-ETX.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
stx_etx()

* comment *
SaveAllFiles.nm ----------------------------------------------------------------

SaveAllFiles
SaveAllFiles(): writes all modified documents to their files.
 
(requires macro file SaveAllFiles.nm)

SaveAllFiles.nm
Functions in file SaveAllFiles.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
SaveAllFiles()

* comment *
array_utils.nm -----------------------------------------------------------------

make_array_from_list
make_array_from_list(list_array[, start]): builds an array from the key-value
       pairs from contiguous values in list_array, and returns it. The keys to
       list_array must be consecutive numbers, starting with start (or zero).
       There must be an even number of them.
 
(requires macro file array_utils.nm)

make_array
make_array(key, value, ...): builds an array from the key-value pairs, and
       returns it. If an odd number of arguments is given, does not return
       anything, which should cause an error.
 
(requires macro file array_utils.nm)

make_arraylist
make_arraylist(value, ...): builds an array from the values, using numeric
       indices starting at zero, and returns it.
 
(requires macro file array_utils.nm)

make_arraylist1
make_arraylist1(value, ...): builds an array from the values, using numeric
       indices starting at one, and returns it.
 
(requires macro file array_utils.nm)

shift_arraylist
shift_arraylist(offset, oldarray [, low, high]): builds an array from the
       values in oldarray (accessed through numeric indices): the new array has
       indices shifted by offset compared to the old, and if low and high
       are given, only those new indices from low to high are kept.
 
(requires macro file array_utils.nm)

array_has_value
array_has_value(array, value): determines whether array has an entry whose
       value is that given. Returns an array of keys to the value, indexed by
       number. This will be an empty array if value was not found.
 
(requires macro file array_utils.nm)

cat_arraylist
cat_arraylist(array [, separator]): concatenates a zero-based array to a
       string, adding the separator (default "\n") between each piece. Note
       that separators are not added after the last entry. This is the
       "opposite" of split - the following identity is true:
 
           str == cat_arraylist(split(str, "\n"), "\n")
 
(requires macro file array_utils.nm)

cat_arraylist1
cat_arraylist1(array [, separator]): concatenates a one-based array to a
       string, adding the separator (default "\n") between each piece. Note
       that separators are not added after the last entry.
 
(requires macro file array_utils.nm)

arrayval_10ask
arrayval_10ask(prompt, len, more, string_dlg, buttons [, lines]): asks for an
       array value from a choice of up to 10 (as buttons), and/or a line.
       buttons must be indexed from 0 to len - 1, and len must be less than 10.
       If lines is present list_dialogs will be used. If string_dlg is false,
       dialog will be used instead of string_dialog and ["line"] will not be
       set. Uses an array return value with
           ["more"]    ">>More" button pressed - ask for other ranges
           ["null"]    dismissed - take no further action
           ["button"]  the string for a button, or an entered string
           ["line"]    the selected line or typed text, if any
           ["index"]   the number of the button, if any
 
(requires macro file array_utils.nm)

array_ask_keys
array_ask_keys(prompt, array, [string_dlg [, lines]]): asks for an array key
       from the ones in array, up to 5 at a time (as buttons), and/or a line.
       If string_dlg is true, the line is the string result of a string dialog.
       If lines is present list_dialogs will be used (even if string_dlg is
       true) to retrieve the line value. Uses an array return value with
       some of the following keys:
           ["null"]    dismissed: no other values - take no further action
           ["key"]     the string for a key - may not be present with
                       string_dlg true and "OK" pressed
           ["line"]    the selected line or typed text, if string_dlg or lines
                       used - may be empty
 
(requires macro file array_utils.nm)

array_ask_vals
array_ask_vals(prompt, array, [string_dlg [, lines]]): asks for an array value
       from the ones in array, up to 5 at a time (as buttons), and/or a line.
       The array must have numeric indices starting at 0.
       If string_dlg is true, the line is the string result of a string dialog.
       If lines is present list_dialogs will be used (even if string_dlg is
       true) to retrieve the line value. Uses an array return value with
       some of the following keys:
           ["null"]    dismissed: no other values - take no further action
           ["key"]     the string for a key - may not be present with
                       string_dlg true and "OK" pressed
           ["value"]   the key's value or typed in line
           ["line"]    the selected line or typed text, if string_dlg or lines
                       used - may be empty
 
(requires macro file array_utils.nm)

array_select_entry_flatten_str
array_select_entry_flatten_str(s [, len [, quot]]): returns s with all
       newlines changed to '/' and tabs and space sequences changed to ' '. If
       the result is longer than len + 3, remove everything after len and add
       "..."). If the quot parameter is passed, its first character will be
       added at either end of the string, not included in the length count,
       before any added "...".
 
(requires macro file array_utils.nm)

array_select_entry_longest_key
array_select_entry_longest_key(array, null): returns the longest key that will
       be used to format the list_dialog() lines in array_select_entry().
 
(requires macro file array_utils.nm)

array_select_entry_neg_keys_to_string
array_select_entry_neg_keys_to_string(array, startline, maxkeylenstr): makes
       lines appropriate for list_dialog() displays in array_select_entry() for
       keys in array which are negative numbers, ordered numerically. Each line
       has a number, starting at startline, so that a line selected in
       list_dialog() can be identified and its key found (see ["i_to_key"]
       below). maxkeylenstr is the longest key value as returned by
       array_select_entry_longest_key. Returns an array with the following
       keys:
           ["lines"]       the string holding generated lines
           ["next_i"]      the line number for any following line
           ["i_to_key"]    an array of line number to key string values
 
(requires macro file array_utils.nm)

array_select_entry_pos_keys_to_string
array_select_entry_pos_keys_to_string(array, startline, maxkeylenstr): makes
       lines appropriate for list_dialog() displays in array_select_entry() for
       keys in array which are non-negative numbers, ordered numerically. Each
       line has a number, starting at startline, so that a line selected in
       list_dialog() can be identified and its key found (see ["i_to_key"]
       below). maxkeylenstr is the longest key value as returned by
       array_select_entry_longest_key. Returns an array with the following
       keys:
           ["lines"]       the string holding generated lines
           ["next_i"]      the line number for any following line
           ["i_to_key"]    an array of line number to key string values
 
(requires macro file array_utils.nm)

array_select_entry_nul_key_to_string
array_select_entry_nul_key_to_string(array, startline, maxkeylenstr, null):
       makes a single line appropriate for list_dialog() displays in
       array_select_entry() for the empty string key in array. The line has a
       number, startline, so that if selected in list_dialog(), it can be
       identified and its key found (see ["i_to_key"] below). maxkeylenstr is
       the longest key value as returned by array_select_entry_longest_key.
       Returns an array with the following keys:
           ["lines"]       the string holding the generated line
           ["next_i"]      the line number for any following line
           ["i_to_key"]    an array of line number to key string values
 
(requires macro file array_utils.nm)

array_select_entry_str_keys_to_string
array_select_entry_str_keys_to_string(array, startline, maxkeylenstr): makes
       lines appropriate for list_dialog() displays in array_select_entry() for
       keys in array which are non-nnumeric strings, ordered as in the array.
       Each line has a number, starting at startline, so that a line selected
       in list_dialog() can be identified and its key found (see ["i_to_key"]
       below). maxkeylenstr is the longest key value as returned by
       array_select_entry_longest_key. Returns an array with the following
       keys:
           ["lines"]       the string holding generated lines
           ["next_i"]      the line number for any following line
           ["i_to_key"]    an array of line number to key string values
 
(requires macro file array_utils.nm)

array_select_entry
array_select_entry(prompt, array [, button1, ... button7]): uses a
       list_dialog() to ask the user to select an array entry (which must
       contain only scalar values). Returns an array with the indices
           ["key"]     the string for a key - may not be present with
                       string_dlg true and "OK" pressed
           ["value"]   the key's value or typed in line
           ["btnnum"]  the button number
           ["button"]  the button text
       The returned array is empty if no button was pressed. ["key"] and
       ["value"] may not be present if no entry was selected. If no button was
       given, only ["key"] and ["value"] may be returned.
 
(requires macro file array_utils.nm)

array_utils.nm
Functions in file array_utils.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
make_array_from_list(list_array[, start])
make_array(key, value, ...)
make_arraylist(value, ...)
make_arraylist1(value, ...)
shift_arraylist(offset, oldarray [, low, high])
array_has_value(array, value)
cat_arraylist(array [, separator])
cat_arraylist1(array [, separator])
arrayval_10ask(prompt, len, more, string_dlg, buttons [, lines])
array_ask_keys(prompt, array, [string_dlg [, lines]])
array_ask_vals(prompt, array, [string_dlg [, lines]])
array_select_entry_flatten_str(s [, len [, quot]])
array_select_entry_longest_key(array, null)
array_select_entry_neg_keys_to_string(array, startline, maxkeylenstr)
array_select_entry_pos_keys_to_string(array, startline, maxkeylenstr)
array_select_entry_nul_key_to_string(array, startline, maxkeylenstr, null)
array_select_entry_str_keys_to_string(array, startline, maxkeylenstr)
array_select_entry(prompt, array [, button1, ... button7])

* comment *
autoload.nm --------------------------------------------------------------------

* comment *
backlight.nm -------------------------------------------------------------------

backlight_set_from_range
backlight_set_from_range(rangestring): creates a string of ascii characters
       for the specified range specification. Note that character zero is
       ignored.
 
(requires macro file backlight.nm)

backlight_range_from_set
backlight_range_from_set(setstring): creates a range specification
       corresponding to the string of ascii characters. Note that character
       zero is ignored.
 
(requires macro file backlight.nm)

backlight_assign
backlight_assign(resourcestr): creates an array suitable for assignment to
       $backlights from the given resource string.
 
(requires macro file backlight.nm)

backlight_make_string
backlight_make_string(array): creates a resource string from a suitable array.
 
(requires macro file backlight.nm)

backlight_use_stored_group_names
backlight_use_stored_group_names(olda, newa): checks newa's group names
       against the ones stored in olda by matching charRanges entries: it
       renames the newa's group names then returns it.
 
(requires macro file backlight.nm)

backlight_display_build_lines
backlight_display_build_lines(array): generates a string holding lines
       suitable for a list_dialog() from the backlight array passed.
 
(requires macro file backlight.nm)

backlight_display_groups
backlight_display_groups(title, array, button...): presents a list of groups
       held in array, adding buttons as taken from the argument list. It
       returns an array holding keys "button" (number of button pressed, if
       any), "group", "charRanges" and "colorValue" holding parts of the
       selected line.
 
(requires macro file backlight.nm)

backlight_get_backlights
backlight_get_backlights(): assembles the backlight groups into the array
       $backlights.
 
(requires macro file backlight.nm)

backlight_display_backlights
backlight_display_backlights(): displays the current window backlights.
 
(requires macro file backlight.nm)

backlight_modify_range
backlight_modify_range(oldr): walks the user through a number of dialogs,
       modifying the range in different ways. Returns a new range, which may be
       the same as the old range.
 
(requires macro file backlight.nm)

backlight_manip_backlights
backlight_manip_backlights(): displays the array $backlights, assembling it
       if necessary.
 
(requires macro file backlight.nm)

backlight.nm
Functions in file backlight.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
backlight_set_from_range(rangestring)
backlight_range_from_set(setstring)
backlight_assign(resourcestr)
backlight_make_string(array)
backlight_use_stored_group_names(olda, newa)
backlight_display_build_lines(array)
backlight_display_groups(title, array, button...)
backlight_get_backlights()
backlight_display_backlights()
backlight_modify_range(oldr)
backlight_manip_backlights()

* comment *
c_expand.nm --------------------------------------------------------------------

c_expand_replacement_for_prefix
c_expand_replacement_for_prefix(word): tries to find a replacement text for
	the given word.
 
(requires macro file c_expand.nm)

c_expand
c_expand(): picks up the current line, detabs the start, fetches the last word
	on the line, tries to expand it. Returns 1 if successful, else 0.
 
(requires macro file c_expand.nm)

c_expand.nm
Functions in file c_expand.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
c_expand_replacement_for_prefix(word)
c_expand()

* comment *
centerline.nm ------------------------------------------------------------------

centerline
centerline(): attempts to center the cursor position in the current window.
 
(requires macro file centerline.nm)

centerline.nm
Functions in file centerline.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
centerline()

* comment *
columns.nm ---------------------------------------------------------------------

make_columns
make_columns(text, colsep, new_sep, match_type, just, notidy, maxcol, force):
	returns the text passed modified so that all occurrences of colsep
	(column separator) are replaced by spaces, in such a way that the text
	is formatted as columns separated by the string passed as new_sep. If
	new_sep is a number, its value is used as the number of spaces to
	guarantee between the resultant columns. match_type should be one of
	"literal", "case", "regex". just can be one of "left", "right" or
	"middle" and specifies how the column data should be written into the
	column. The text is assumed to consist of complete lines, and the column
	data are assumed not to contain tabs. If the notidy parameter is
	"notidy", no spaces will be stripped from either side of the column
	data. Normally the space is stripped. If the force parameter is "force",
	each line which does not have the full complement of columns will have
	empty columns added.
 
(requires macro file columns.nm)

make_columns_dialog
make_columns_dialog(): converts selected text into columns. If the selection
	is not rectangular, it is extended to include whole lines. Parameters
	to make_columns() are prompted for. Uses the detab() macro function.
 
(requires macro file columns.nm)

columns.nm
Functions in file columns.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
make_columns(text, colsep, new_sep, match_type, just, notidy, maxcol, force)
make_columns_dialog()

* comment *
element.nm ---------------------------------------------------------------------

element_n
element_n(): returns the number of elements in the given string, using the
	given delimiter.
 
Parameters:
	$1 - the string containing all elements
	$2 - the delimiter (defaults to "\n", used as "case"; if empty,
	     space delimiters will be used: ie "[ \t\r\n\v\f]*"/"regex")
	$3 - match type for delimiter (default "case": see $2)
Returns:
	The number of elements: this is at least 1 (no delimiter found), unless
	the array string was empty to start with.
 
(requires macro file element.nm)

element_i
element_i(): returns the element with the given index, where elements are
	separated by the given delimiter in the given string. It fails if the
	number of elements in the string is less than or equal to the index
	(indexes start from zero).
 
Parameters:
	$1 - the string containing all elements
	$2 - the index (must be a number)
	$3 - the delimiter (defaults to "\n", used as "case"; if empty,
	     space delimiters will be used: ie "[ \t\r\n\v\f]*"/"regex")
	$4 - match type for delimiter (default "case": see $3)
Returns:
	The substring corresponding to the index, or the empty string on
	failure.
 
(requires macro file element.nm)

i_of_element
i_of_element(): returns the index of the given element, or -1 on failure.
	The element must match exactly.
 
Parameters:
	$1 - the string containing all elements
	$2 - the element to find
	$3 - the delimiter (defaults to "\n", used as "case"; if empty,
	     space delimiters will be used: ie "[ \t\r\n\v\f]*"/"regex")
	$4 - match type for delimiter (default "case": see $3)
Returns:
	The index corresponding to the element, or -1 on failure.
 
(requires macro file element.nm)

i_of_elempref
i_of_elempref(): returns the index of the first element in the array which
	starts with the same string as that passed in, using an exact match.
	Returns -1 on failure.
 
Parameters:
	$1 - the string containing all elements
	$2 - the element prefix to find
	$3 - the delimiter (defaults to "\n", used as "case"; if empty,
	     space delimiters will be used: ie "[ \t\r\n\v\f]*"/"regex")
	$4 - match type for delimiter (default "case": see $3)
Returns:
	The index corresponding to the element, or -1 on failure.
 
(requires macro file element.nm)

elem_of_elempref
elem_of_elempref(): returns the first element in the array which
	starts with the same string as that passed in, using an exact match.
	Returns "" on failure.
 
Parameters:
	$1 - the string containing all elements
	$2 - the element prefix to find
	$3 - the delimiter (defaults to "\n", used as "case"; if empty,
	     space delimiters will be used: ie "[ \t\r\n\v\f]*"/"regex")
	$4 - match type for delimiter (default "case": see $3)
Returns:
	The corresponding element, or "" on failure.
 
(requires macro file element.nm)

element_assoc
element_assoc(): searches for the first element in the array which starts
	with the same string as that passed in, using elem_of_elempref().
	Returns the rest of the element if successful, "" on failure.
 
Parameters:
	$1 - the string containing all elements
	$2 - the element prefix to find
	$3 - the delimiter (defaults to "\n", used as "case"; if empty,
	     space delimiters will be used: ie "[ \t\r\n\v\f]*"/"regex")
	$4 - match type for delimiter (default "case": see $3)
Returns:
	The suffix of the element, after removing $1, or "" on failure.
 
(requires macro file element.nm)

element_from_to
element_from_to(): returns a new array, holding only those elements between
	the specified indices.
 
Parameters:
	$1 - the string containing all elements
	$2 - the first index (numbered from zero)
	$3 - the last index (optional, defaults to the last index number if
	     not present or negative)
	$4 - the delimiter (defaults to "\n", used as "case"; if empty,
	     space delimiters will be used: ie "[ \t\r\n\v\f]*"/"regex")
	$5 - match type for delimiter (default "case": see $4)
Returns:
	The substring of the original array, corresponding to the index range
	given. Fails with an empty string. If the last index is beyond the
	end of the array, this is not cause for failure.
 
(requires macro file element.nm)

element.nm
Functions in file element.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
element_n()
element_i()
i_of_element()
i_of_elempref()
elem_of_elempref()
element_assoc()
element_from_to()

* comment *
extensions.nm ------------------------------------------------------------------

tochar
tochar(int): returns the ascii char corresponding to the integer int, if in
       range, as a single character string. Fails with the empty string (as for
       int = 0).
 
(requires macro file extensions.nm)

toascii
toascii(char): returns the ascii code corresponding to the first character in
       char, if present, as an integer. Fails with -1.
 
(requires macro file extensions.nm)

isinstring
isinstring(ch, str): returns true if the first character of ch is in str.
 
(requires macro file extensions.nm)

tolowercase
tolowercase(string): converts to lower case, returning the converted string.
 
(requires macro file extensions.nm)

touppercase
touppercase(string): converts to upper case, returning the converted string.
 
(requires macro file extensions.nm)

islowercase
islowercase(string): checks the first character of string (aka islower())
 
(requires macro file extensions.nm)

islower
islower(string): checks the first character of the string
 
(requires macro file extensions.nm)

isuppercase
isuppercase(string): checks the first character of the string (aka isupper())
 
(requires macro file extensions.nm)

isupper
isupper(string): checks the first character of the string
 
(requires macro file extensions.nm)

isalpha
isalpha(string): checks the first character of the string (iso8859-1)
       cf isasciialpha()
 
(requires macro file extensions.nm)

isasciialpha
isasciialpha(string): checks the first character of the string (ascii only)
 
(requires macro file extensions.nm)

isdigit
isdigit(string): checks the first character of the string
 
(requires macro file extensions.nm)

isxdigit
isxdigit(string): checks the first character of the string (hexadecimal)
 
(requires macro file extensions.nm)

isalnum
isalnum(string): checks the first character of the string (iso8859-1)
 
(requires macro file extensions.nm)

isspace
isspace(string): checks the first character of the string
 
(requires macro file extensions.nm)

ispunct
ispunct(string): checks the first character of the string (iso8859-1)
 
(requires macro file extensions.nm)

isgraph
isgraph(string): checks the first character of the string (iso8859-1)
 
(requires macro file extensions.nm)

isprint
isprint(string): checks the first character of the string (iso8859-1)
 
(requires macro file extensions.nm)

iscntrl
iscntrl(string): checks the first character of the string (iso8859-1)
 
(requires macro file extensions.nm)

isascii
isascii(string): checks the first character of the string
 
(requires macro file extensions.nm)

isblank
isblank(string): return true if the first character is space or tab
 
(requires macro file extensions.nm)

isword
isword(string): return true if the first character is '_', an ascii letter or
       a digit
 
(requires macro file extensions.nm)

togglecase
togglecase(string): returns the string with all uppercase characters switched
       to lowercase and vice-versa.
 
(requires macro file extensions.nm)

substr
substr(string, [startpos, [endpos]]): calls substring() for given string,
       start position, end position. Position parameters are optional. If any
       are negative, measurement is made from the end of the string.
 
Parameters:
       $1 - source string (default "")
       $2 - start position (default 0)
       $3 - end position (default length($1))
 
(requires macro file extensions.nm)

replace_in_str
replace_in_str(string, search_for, replace_with, [type]): calls
       replace_in_string() with its parameters. If replace_in_string() fails,
       returns the original string unchanged.
 
Parameters:
       $1 - original string in which patterns should be matched
       $2 - patterns to replace
       $3 - what to replace with (default "")
       $4 - type of matching to use (default "literal")
 
(requires macro file extensions.nm)

hex_to_int
hex_to_int(hex_str): returns the value of the hex string. All (and only) hex
       characters are considered. Scanning stops at first non-hex character.
 
(requires macro file extensions.nm)

hex_to_char
hex_to_char(hex_str): returns the value of the hex string. All (and only) hex
       characters are considered.
 
(requires macro file extensions.nm)

hex2_to_str
hex2_to_str(hex_str): returns a string whose value is that of the
       concatenation of characters whose hex values are listed, two digits at
       a time. All non-digits in the input are ignored.
 
(requires macro file extensions.nm)

int_to_hex
int_to_hex(int, mindigits): returns the hex representation of the integer.
       By default, mindigits is set to one.
 
(requires macro file extensions.nm)

char_to_hex
char_to_hex(chars): returns the hex values of each of the characters passed.
       Each character is transformed into 2 hex digits.
 
(requires macro file extensions.nm)

start_of_line_pos
start_of_line_pos([pos [, string]]): returns the position of the start of the
       line containing pos (default $cursor) - ie the position following the
       previous newline. If string is supplied, it is used instead of the
       current document.
 
(requires macro file extensions.nm)

end_of_line_pos
end_of_line_pos([pos [, string]]): returns the position of the end of the line
       containing pos (default $cursor) - ie the position of the next newline.
       If string is supplied, it is used instead of the current document.
 
(requires macro file extensions.nm)

line_of_pos
line_of_pos([pos [, string]]): returns the line containing the position pos
       (default $cursor) as a string without a trailing newline. If string is
       supplied, it is used instead of the current document.
 
(requires macro file extensions.nm)

break_lines_over
break_lines_over(maxchars, string [, pref]): tries to break string at word
       boundaries adding newlines followed by the string pref (if present).
       Returns the modified string.
 
(requires macro file extensions.nm)

quote_literal_as_regex
quote_literal_as_regex(string): returns a string representing a valid regex
       search string for the parameter passed.
 
(requires macro file extensions.nm)

quote_literal_as_subst
quote_literal_as_subst(string): returns a string representing a valid
       replace substitution string for the parameter passed.
 
(requires macro file extensions.nm)

regex_to_quoted_string
regex_to_quoted_string(regex): adds quotes and backslashes to convert a
       string containing a valid regex into one usable in NEdit Macro code.
 
(requires macro file extensions.nm)

line_col_to_pos
line_col_to_pos(lineNum [, colNum [, tabSize [, string]]]): returns the
       position of the character position indicated by lineNum and colNum,
       assuming a particular tabSize. By default, colNum is zero and tabSize
       equals $tab_dist. Lines are numbered from 1, columns from zero. If there
       are not enough lines, -1 is returned; if there are not enough columns in
       the addressed line, the position of the last character is returned; if
       the column is "inside" a tab, return the tab's position. If string is
       present, measurements take place within it; otherwise the current
       document is used.
 
(requires macro file extensions.nm)

str_line_col_to_pos
str_line_col_to_pos(string, lineNum [, colNum [, tabSize]]):  returns the
       position of the character position indicated by lineNum and colNum,
       assuming a particular tabSize. By default, colNum is zero and tabSize
       equals $tab_dist. Lines are numbered from 1, columns from zero. If there
       are not enough lines, -1 is returned; if there are not enough columns in
       the addressed line, the position of the last character is returned; if
       the column is "inside" a tab, return the tab's position. All
       measurements take place within string. This function calls
       line_col_to_pos(lineNum, colNum, tabSize, string) with appropriate
       defaults.
 
(requires macro file extensions.nm)

pos_to_line_forwardNlines
pos_to_line_forwardNlines(pos, nLines [, string]): returns the position of
       the start of the line nLines away; fails with -1. If string is supplied
       the search is performed in the string, otherwise in the current window.
 
(requires macro file extensions.nm)

pos_to_line
pos_to_line(pos [, string]): returns the line number (counted from 1) of the
       position pos. If pos is too large, this returns the last line number
       for the document (so the minimum value is 1). If string is present,
       measurement takes place in the string; otherwise the current document
       is used.
 
(requires macro file extensions.nm)

pos_to_column
pos_to_column(pos [, tabSize [, string]]): returns the column number (counted
       from 0) of the position pos in its line. If pos is too large, this
       returns the last column of the last line for the document (so the
       minimum value is 1). If string is present, measurements are taken
       within string; otherwise within the current document.
 
(requires macro file extensions.nm)

longest_line_len
longest_line_len(strs): returns the length of the longest line in the string
       strs.
 
(requires macro file extensions.nm)

longest_line
longest_line(strs): returns the longest line in the string strs.
 
(requires macro file extensions.nm)

rjust_s
rjust_s(strs [, maxstr]): returns a string holding each line of str padded
       with spaces to the left so that it is as long as maxstr, or as long as
       the longest line in strs.
 
(requires macro file extensions.nm)

rjust
rjust(strs [, minlen]): returns a string holding each line of str padded with
       spaces to the left so that it is minlen long, or as long as the longest
       line in strs. Calls rjust_s().
 
(requires macro file extensions.nm)

ljust_s
ljust_s(strs [, maxstr]): returns a string holding each line of str padded
       with spaces to the right so that it is as long as maxstr, or as long as
       the longest line in strs.
 
(requires macro file extensions.nm)

ljust
ljust(strs [, minlen]): returns a string holding each line of str padded with
       spaces to the ightt so that it is minlen long, or as long as the longest
       line in strs. Calls ljust_s().
 
(requires macro file extensions.nm)

trim
trim(strs[, re[, nlSense]]): returns a string holding each line of strs with
       ends matching "(?"nlSense"^(?:"re"))" and "(?"nlSense"(?:"re")$)"
       removed. The default value of re is "\\s+", and of nlSense is "N".
 
(requires macro file extensions.nm)

compress
compress(strs[, re[, repl[, nlSense]]]): returns a string holding each line of
       strs with each sequence identified as "(?"nlSense"(?:"re")+)" replaced
       with repl. The default value of re is "\\s", of repl is " ", and of
       nlSense is "N".
 
(requires macro file extensions.nm)

repeat
repeat(str, n): returns a string built by repeating str n times. It uses
       string doubling to reduce concatenation operations.
 
(requires macro file extensions.nm)

number
number(string [, "strict"|defval]): returns the numeric value read from the
       front of the string argument. Fails if no leading number was found, with
       defval (which defaults to zero), or, if "strict" is present, with an
       invalid function call. [IDENTICAL TO THE to_number() FUNCTION]
 
(requires macro file extensions.nm)

to_number
to_number(string [, "strict"|defval]): returns the numeric value read from the
       front of the string argument. Fails if no leading number was found, with
       defval (which defaults to zero), or, if "strict" is present, with an
       invalid function call. [IDENTICAL TO THE number() FUNCTION]
 
(requires macro file extensions.nm)

nuls
nuls(a): returns true if string a == ""
 
(requires macro file extensions.nm)

nz
nz(a): returns true if string a != "" (in fact this returns length(a))
 
(requires macro file extensions.nm)

eqs
eqs(a, b): returns true if scalars a and b compare as equal strings
 
(requires macro file extensions.nm)

nes
nes(a, b): returns true if scalars a and b compare as non-equal strings
 
(requires macro file extensions.nm)

lts
lts(a, b): returns true if scalars a and b string-compare as a < b
 
(requires macro file extensions.nm)

les
les(a, b): returns true if scalars a and b string-compare as a <= b
 
(requires macro file extensions.nm)

gts
gts(a, b): returns true if scalars a and b string-compare as a > b
 
(requires macro file extensions.nm)

ges
ges(a, b): returns true if scalars a and b string-compare as a >= b
 
(requires macro file extensions.nm)

eqsi
eqsi(a, b): true if strings a and b compare as a == b (case insignificant)
 
(requires macro file extensions.nm)

nesi
nesi(a, b): true if strings a and b compare as a != b (case insignificant)
 
(requires macro file extensions.nm)

ltsi
ltsi(a, b): true if strings a and b compare as a < b (case insignificant)
 
(requires macro file extensions.nm)

lesi
lesi(a, b): true if strings a and b compare as a <= b (case insignificant)
 
(requires macro file extensions.nm)

gtsi
gtsi(a, b): true if strings a and b compare as a > b (case insignificant)
 
(requires macro file extensions.nm)

gesi
gesi(a, b): true if scalars a and b compare as a >= b (case insignificant)
 
(requires macro file extensions.nm)

eq
eq(a, b): true if strings a and b compare as a == b (numerically)
 
(requires macro file extensions.nm)

ne
ne(a, b): true if strings a and b compare as a != b (numerically)
 
(requires macro file extensions.nm)

lt
lt(a, b): true if strings a and b compare as a < b (numerically)
 
(requires macro file extensions.nm)

le
le(a, b): true if strings a and b compare as a <= b (numerically)
 
(requires macro file extensions.nm)

gt
gt(a, b): true if strings a and b compare as a > b (numerically)
 
(requires macro file extensions.nm)

ge
ge(a, b): true if scalars a and b compare as a >= b (numerically)
 
(requires macro file extensions.nm)

match_as
match_as(text, pattern, type): returns true if pattern is found in the text.
       If so, it sets the $MATCH array. Otherwise, if the pattern is not found,
       $MATCH is empty, and the function returns false (0).
       Matching is done using search_string() with type passed as the search
       type.
 
(requires macro file extensions.nm)

matched_prefix
matched_prefix(): returns prefix of matched text in previously scanned string.
       Fails if previous call to match_as() returned false.
 
(requires macro file extensions.nm)

matched_suffix
matched_suffix(): returns suffix of matched text in previously scanned string.
       Fails if previous call to match_as() returned false.
 
(requires macro file extensions.nm)

matched_text
matched_text(): returns matched text from previously scanned string.
       Fails if previous call to match_as() returned false.
 
(requires macro file extensions.nm)

match_re
match_re(str, pat): return true if regular expression pat is found in str.
 
(requires macro file extensions.nm)

match_rei
match_rei(str, pat): return true if regular expression pat is found in str.
       (case insignificant)
 
(requires macro file extensions.nm)

match_ren
match_ren(str, pat): return true if regular expression pat is found in str.
       (newline insignificant)
 
(requires macro file extensions.nm)

match_reni
(str, pat): return true if regular expression pat is found in str.
       (case insignificant, newline insignificant)
 
(requires macro file extensions.nm)

match_w
match_w(str, pat): return true if word(s) pat is found in str.
 
(requires macro file extensions.nm)

match_wi
match_wi(str, pat): return true if word(s) pat is found in str.
       (case insignificant)
 
(requires macro file extensions.nm)

match_s
match_s(str, pat): return true if string pat is found in str.
 
(requires macro file extensions.nm)

match_si
match_si(str, pat): return true if string pat is found in str.
       (case insignificant)
 
(requires macro file extensions.nm)

sub_re
sub_re(str, pat, replace): returns the result of calling
       replace_in_string(str, pat, replace, "regex", "copy")
 
(requires macro file extensions.nm)

sub_s
sub_s(str, pat, replace): returns the result of calling
       replace_in_string(str, pat, replace, "case", "copy")
 
(requires macro file extensions.nm)

background_is_dark
background_is_dark(override): attempts to determine whether the standard NEdit
       background is dark, to help select good values for rangeset colors.
       If a parameter is given, it should be one of the following values:
       - "ask": ask the user whether background is dark with a dialog box
       - "reset": clear all values and process from scratch
       - "yes" or 1: set the return value to true
       - "no" or 0: set the return value to false
       Returns 1 (true) if the background is dark, 0 (false) otherwise.
 
(requires macro file extensions.nm)

extensions.nm
Functions in file extensions.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
tochar(int)
toascii(char)
isinstring(ch, str)
tolowercase(string)
touppercase(string)
islowercase(string)
islower(string)
isuppercase(string)
isupper(string)
isalpha(string)
isasciialpha(string)
isdigit(string)
isxdigit(string)
isalnum(string)
isspace(string)
ispunct(string)
isgraph(string)
isprint(string)
iscntrl(string)
isascii(string)
isblank(string)
isword(string)
togglecase(string)
substr(string, [startpos, [endpos]])
replace_in_str(string, search_for, replace_with, [type])
hex_to_int(hex_str)
hex_to_char(hex_str)
hex2_to_str(hex_str)
int_to_hex(int, mindigits)
char_to_hex(chars)
start_of_line_pos([pos [, string]])
end_of_line_pos([pos [, string]])
line_of_pos([pos [, string]])
break_lines_over(maxchars, string [, pref])
quote_literal_as_regex(string)
quote_literal_as_subst(string)
regex_to_quoted_string(regex)
line_col_to_pos(lineNum [, colNum [, tabSize [, string]]])
str_line_col_to_pos(string, lineNum [, colNum [, tabSize]])
pos_to_line_forwardNlines(pos, nLines [, string])
pos_to_line(pos [, string])
pos_to_column(pos [, tabSize [, string]])
longest_line_len(strs)
longest_line(strs)
rjust_s(strs [, maxstr])
rjust(strs [, minlen])
ljust_s(strs [, maxstr])
ljust(strs [, minlen])
trim(strs[, re[, nlSense]])
compress(strs[, re[, repl[, nlSense]]])
repeat(str, n)
number(string [, "strict"|defval])
to_number(string [, "strict"|defval])
nuls(a)
nz(a)
eqs(a, b)
nes(a, b)
lts(a, b)
les(a, b)
gts(a, b)
ges(a, b)
eqsi(a, b)
nesi(a, b)
ltsi(a, b)
lesi(a, b)
gtsi(a, b)
gesi(a, b)
eq(a, b)
ne(a, b)
lt(a, b)
le(a, b)
gt(a, b)
ge(a, b)
match_as(text, pattern, type)
matched_prefix()
matched_suffix()
matched_text()
match_re(str, pat)
match_rei(str, pat)
match_ren(str, pat)
match_w(str, pat)
match_wi(str, pat)
match_s(str, pat)
match_si(str, pat)
sub_re(str, pat, replace)
sub_s(str, pat, replace)
background_is_dark(override)
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Globals:
 
       $MATCH[]: an array set by the match functions. It is empty if a match
       failed; otherwise:
           $MATCH["begin"]     starting position of the match
           $MATCH["end"]       end position of the match
           $MATCH["before"]    text prefixing the found match
           $MATCH["matched"]   text that matched the pattern
           $MATCH["after"]     text following the found match
See also match_as(), matched_prefix(), matched_suffix(), matched_text(),
          match_re(), match_rei(), match_ren(), match_reni,
          match_w(), match_wi(), match_s(), match_si()

* comment *
fold.nm ------------------------------------------------------------------------

fold_infold
fold_infold(): checks whether the position passed lies within previously
	folded text, returning zero if not
Parameters
	$1 - position to test for inclusion in a fold
Returns
	fold nesting level at the position to test
 
(requires macro file fold.nm)

fold_infoldline
fold_infoldline(): checks whether the position passed indicates a position
	which is contained in a fold on the position's line (a cheaper test
	than fold_infold(), which checks the whole file), returning zero if
	not in a fold
Parameters
	$1 - position to test for inclusion in a fold
Returns
	fold nesting level at the position to test
 
(requires macro file fold.nm)

fold_expand
fold_expand(): expands the first fold forward, starting from the start of the
	current line, preserving nested folds. If no folds exist forward from
	the start position, the search will wrap around to the first fold in
	the file. The cursor is left at the start of the unfolded text, if any.
Parameters
	None - searches from the current position in the file for the start
	     of the fold to expand.
Returns
	Nothing
 
(requires macro file fold.nm)

fold_comment
fold_comment(): uses the current language to select a comment type and find
	appropriate text for a fold comment. Returns the comment text, if any.
Parameters:
	$1 - the selected text from which to take the comments
	$2 - initial length to ignore in the search
Returns:
	The comment string to use.
 
(requires macro file fold.nm)

fold_selection
fold_selection(): collapses the current selection into a fold. The cursor is
	left at the start of the folded text.
Parameters
	$1 - skip this number of characters before looking for fold comments.
	     Defaults to zero.
Returns
	Nothing. No folding is performed if either extreme of the selection is
	inside a fold.
 
(requires macro file fold.nm)

fold_bracket_match
fold_bracket_match(): collapses from the current open bracket to the matched
	close bracket, found using the match() function.
Parameters
	None - takes the current cursor position and attempts to find a match()
	     to fold.
Returns
	True if successful. Calls fold_selection() on match()ed text, if any.
 
(requires macro file fold.nm)

fold_custom_match
fold_custom_match(): searches forward for a language-specific start-fold
	comment marker, then tries to find a matching end-fold marker, taking
	fold depth into account. Selects the text between, and folds.
Parameters
	None - takes the current cursor position and attempts to find a match
	     to fold.
Returns
	True if successful. Calls fold_selection() on matched text, if any.
Warning
	The custom matching does NOT take into account the presence of folds: it
	may match a start-fold marker with an end-fold marker, either or both of
	which may already be in folds. If this is the case, hopefully
	fold_selection() will fail.
 
(requires macro file fold.nm)

fold_bracket_or_custom_match
fold_bracket_or_custom_match(): attempts a bracket match - if that fails,
	attempts a custom comment match.
Parameters
	None - takes the current cursor position and attempts to find a match()
	     to fold.
Returns
	True if successful. Calls fold_selection() on match()ed text, if any.
 
(requires macro file fold.nm)

fold.nm
Functions in file fold.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
fold_infold()
fold_infoldline()
fold_expand()
fold_comment()
fold_selection()
fold_bracket_match()
fold_custom_match()
fold_bracket_or_custom_match()

* comment *
grepfiles.nm -------------------------------------------------------------------

grepfiles
grepfiles(file_pattern, search_string[, grep_cmd]): greps all files matching
       the given filename pattern for the given search string (if any): those
       files found to be containing the string are listed in a list dialog
       box; selecting one opens the file in question and searches for the
       string within that file.
 
Parameters:
       $1 - file name pattern (used by the shell)
       $2 - string for which to search (optional: selected text will be used
            if this is not supplied)
       $3 - string holding the grep command (optional:
            default "grep -F -l \"`cat`\"")
       $4 - type of final search in opened file (default "case")
 
(requires macro file grepfiles.nm)

grepfiles_from_prompt
grepfiles_from_prompt(file_pattern): prompts (using a dialog) for a search
       string and search type for use with grepfiles(), which is called to
       find the files.
 
Parameters:
       $1 - file name pattern (used by the shell)
 
(requires macro file grepfiles.nm)

greplines
greplines(file_pattern, search_string[, grep_cmd]): greps all files matching
       the given filename pattern for the given search string (if any): those
       lines found to be containing the string are listed in a list dialog
       box; selecting one opens the file in question and searches for the line
       within that file.
 
Parameters:
       $1 - file name pattern (used by the shell)
       $2 - string for which to search (optional: selected text will be used
            if this is not supplied)
       $3 - string holding the grep command (optional:
            default "grep -F -n -e \"`cat`\"")
       $4 - type of final search in opened file (default "case")
 
(requires macro file grepfiles.nm)

greplines_from_prompt
greplines_from_prompt(file_pattern): prompts (using a dialog) for a search
       string and search type for use with grepfiles(), which is called to
       find the files.
 
Parameters:
       $1 - file name pattern (used by the shell)
 
(requires macro file grepfiles.nm)

greplines_from_prompt_r
greplines_from_prompt_r(str, file_pattern [, base_dir]): searches for a string
       str using greplines(), with a shell command built around find(1) and
       grep(1) for files whose names match the pattern(s) int file_pattern. If
       a base directory base_dir is supplied, the find(1) command will be
       issued from that directory. If str is empty the current selection is
       used, if any; otherwise the user is prompted. The grep(1) search style
       is requested using a dialog.
 
Parameters:
       $1 - find: the string value to search (if any) or the empty string
       $2 - file name pattern (used by the shell)
       $3 - base_dir: base directory from which to search
 
(requires macro file grepfiles.nm)

grepfiles.nm
Functions in file grepfiles.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
grepfiles(file_pattern, search_string[, grep_cmd])
grepfiles_from_prompt(file_pattern)
greplines(file_pattern, search_string[, grep_cmd])
greplines_from_prompt(file_pattern)
greplines_from_prompt_r(str, file_pattern [, base_dir])

* comment *
html.nm ------------------------------------------------------------------------

html_add_markup_brackets
html_add_markup_brackets(): uses the string parameter to either surround
	the current selection with markup (if there is a selection) or to
	insert the markup as an open/close markup bracket pair. The first word
	of the markup string is used to generate the markup terminator.
Parameters:
	$1	The markup text (without <>).
 
(requires macro file html.nm)

html_convert_to_markup
html_convert_to_markup(): converts the selection "word1 word2 ..." to
	"", leaving the cursor between the two markup
	brackets.
 
(requires macro file html.nm)

html_ask_for_markup
html_ask_for_markup(): requests a markup directive in a dialog box: the user
	should enter the leading directive such as "word1 word2 ...". This is
	converted to "" and placed before the selected text.
	The terminator, "", is added at the end of the selection,
	leaving the cursor at the end of the terminator.
 
(requires macro file html.nm)

html_make_A_NAME
html_make_A_NAME(): converts the selected text into an HTML anchor, such that
	text like "hi there" becomes "hi there".
 
(requires macro file html.nm)

html_make_A_HREF
html_make_A_HREF(): converts the selected text into an HTML local reference,
	such that text like "hello" becomes "hello".
 
(requires macro file html.nm)

html_entities
html_entities(): converts invalid characters in the selected region to the
	equivalent character entities.
 
(requires macro file html.nm)

html.nm
Functions in file html.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
html_add_markup_brackets()
html_convert_to_markup()
html_ask_for_markup()
html_make_A_NAME()
html_make_A_HREF()
html_entities()

* comment *
multichoice.nm -----------------------------------------------------------------

multichoice
multichoice(choices, n_opts, label_type): lists the choice text in choices
	(each line is a choice) with a button per choice, in a series of dialog
	boxes. The lines can be numbered (default), with the line numbers used
	for button labels, or the first word (contiguous non-space characters)
	can be used as button labels. Up to 7 buttons can be displayed per
	dialog. Returns the contents of the line chosen, or "".
 
Parameters:
	$1 - the choices text
	$2 - maximum buttons per dialog (default and maximum 7)
	$3 - label type ("word" or "number", default "number")
 
(requires macro file multichoice.nm)

multichoice_old
multichoice_old(???)
 
(requires macro file multichoice.nm)

multichoice.nm
Functions in file multichoice.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
multichoice(choices, n_opts, label_type)
multichoice_old(???)

* comment *
multitags.nm -------------------------------------------------------------------

multitags_search_path
multitags_search_path(): returns the contents of the $multitags_search_path
	("NEDIT_MULTITAGS_PATH") environment variable or "." if empty or
	undefined.
 
Parameters:
	none
 
(requires macro file multitags.nm)

multitags_load_multitags_file_simple
multitags_load_multitags_file_simple(tagfile): rather simplistic tag file
	loader. It looks for the given tags file (using $file_path for relative
	file access and $multitags_filename as the default file name if none
	supplied), and reads it. It also calls the standard load_tags_file() for
	good measure. Returns the tags file contents.
 
Parameters:
	$1 - the name of a tag file to find (defaults to $multitags_filename or
	     to "tags")
 
(requires macro file multitags.nm)

multitags_load_multitags_file
multitags_load_multitags_file(tagfile): calls
	multitags_load_multitags_file_simple() to load a tags file, then assigns
	tags contents to $multitags, and the latest directory to $multitag_path.
 
Parameters:
	$1 - the name of a tag file to find (defaults to $multitags_filename or
	     to "tags")
 
(requires macro file multitags.nm)

multitags_add_multitags_file
multitags_add_multitags_file(tagfile): calls
	multitags_load_multitags_file_simple() to load a tags file, then the
	result is appended to $multitags.
 
Parameters:
	$1 - the name of a tag file to find (defaults to $multitags_filename or
	     to "tags")
 
(requires macro file multitags.nm)

multitags_load_all_multitags_file
multitags_load_all_multitags_file(tagfile): loads all tags files found
	on the $multitags_search_path.
 
Parameters:
	$1 - the name of a tag file to find in each directory.
 
(requires macro file multitags.nm)

multitags_postprocess_multitags_file
multitags_postprocess_multitags_file(tags, dir):  post-processes the tags file
	contents in tags to add the full file paths.
 
Parameters:
	$1 - the contents of a tags file
	$2 - the directory of the tags file
 
(requires macro file multitags.nm)

multitags_load_multitags_file_post
multitags_load_multitags_file_post(tagfile): calls
	multitags_load_multitags_file_simple() to load a tags file, then
	post-processes it to add the full file paths. Assigns tags contents
	to $multitags, and the latest directory to $multitag_path.
 
Parameters:
	$1 - the name of a tag file to find (defaults to $multitags_filename or
	     to "tags")
 
(requires macro file multitags.nm)

multitags_add_multitags_file_post
multitags_add_multitags_file_post(tagfile): calls
	multitags_load_multitags_file_simple() to load a tags file, then
	post-processes it to add the full file paths. The result is appended
	to $multitags.
 
Parameters:
	$1 - the name of a tag file to find (defaults to $multitags_filename or
	     to "tags")
 
(requires macro file multitags.nm)

multitags_load_all_multitags_file_post
multitags_load_all_multitags_file_post(tagfile): loads all tags files found
	on the $multitags_search_path.
 
Parameters:
	$1 - the name of a tag file to find in each directory.
 
(requires macro file multitags.nm)

multitags_forget_multitags_file
multitags_forget_multitags_file(): empties the tag file global variables.
 
(requires macro file multitags.nm)

multitags_find_lines
multitags_find_lines(symbol, multitags): returns all lines in multitags
	holding the given symbol. The symbol must be of the form
	"([A-Za-z0-9_$]+::)*[~]?[A-Za-z0-9_$]+" (ie C, C++ identifiers, also
	allowing for "$"s as a letter).
 
Parameters:
	$1 - symbol to find
	$2 - multitags text (defaults to $multitags)
 
(requires macro file multitags.nm)

multitags_goto_tag_entry
multitags_goto_tag_entry(tag_entry, directory): takes a tag entry, a string
	whose elements are separated by tabs of the form
 
		tag_id	filename	find_or_line_position_spec
 
	to open the appropriate file at the appropriate position. (This
	corresponds to the old ctags(1) utility and the "Exuberant CTAGS"
	program by Darren Hiebert (mailto:darren@hiebert.com,
	http://home.hiwaay.net/~darren/ctags)). An extension
	has been added for an internal repositioning directive, of form
 
		line_no,pos_in_line	filename	=find_spec
 
	used for position stack manipulation.
 
Parameters:
	$1 - symbol to find
	$2 - directory for relative file names (default $multitag_path)
 
(requires macro file multitags.nm)

multitags_choice
multitags_choice(lines): allows a user to select a tags file line.
 
(requires macro file multitags.nm)

multitags_choose_from
multitags_choose_from(lines, dir): presents multiple positioning entries to
	the user in a dialog, and positions to the selected entry.
 
Parameters:
	$1 - multitag style entries (defaults to $multitags)
	$2 - directory for relative file names (default $multitag_path)
 
(requires macro file multitags.nm)

multitags_choose
multitags_choose(symbol, multitags, multitag_path): returns all lines in
	multitags holding the given symbol. The symbol must be of the form
	"([A-Za-z0-9_$]+::)*[~]?[A-Za-z0-9_$]+" (ie C, C++ identifiers, also
	allowing for "$"s as a letter). The the lines are shown to the user,
	and the selected line is used for repositioning.
 
Parameters:
	$1 - symbol to find
	$2 - multitags text (defaults to $multitags)
	$3 - directory for relative file names (default $multitag_path)
 
(requires macro file multitags.nm)

multitags_choose_quick
multitags_choose_quick(symbol, multitags): identical to multitags_choose(),
	but does not provide choice if only one entry is present.
 
(requires macro file multitags.nm)

multitags_choose_in_file
multitags_choose_in_file(file, multitags, multitag_path): returns all lines in
	multitags whose file name matches that passed. This matching is lazy:
	the end of the file name string from the line must match the file name
	parameter - this means that relative references in the tags file may
	not work.
 
Parameters:
	$1 - file to find
	$2 - multitags text (defaults to $multitags)
	$3 - directory for relative file names (default $multitag_path)
 
(requires macro file multitags.nm)

multitags_push_curpos
multitags_push_curpos(): puts the current file position on the stack.
 
(requires macro file multitags.nm)

multitags_push_curpos_cheap
multitags_push_curpos_cheap(): puts the current file position on the stack.
	If the position was already there, removes the old entry first.
 
(requires macro file multitags.nm)

multitags_pop_curpos
multitags_pop_curpos(): removes the current file position on the stack, then
	uses multitags_goto_tag_entry() to go there.
 
(requires macro file multitags.nm)

multitags_pop_curpos_quiet
multitags_pop_curpos_quiet(): removes the current file position on the stack,
	without repositioning.
 
(requires macro file multitags.nm)

multitags_empty_stack
multitags_empty_stack(): forgets the contents of the positioning stack.
 
(requires macro file multitags.nm)

multitags_set_stack_length
multitags_set_stack_length(): sets the maximum length of the return stack
 
(requires macro file multitags.nm)

multitags_get_all_symbols
multitags_get_all_symbols(): returns a list of all symbols in a multitags
	string by stripping off anything following the first tab and removing
	lines beginning with '!', '#', and removing prefixes of the form xxx::
 
(requires macro file multitags.nm)

multitags_load_symbols
multitags_load_symbols(): calls multitags_get_all_symbols() for the current
	$multitags table and stores the result in $multitags_symbols.
 
(requires macro file multitags.nm)

multitags_add_symbols
multitags_add_symbols(): adds symbols from the passed string to
	$multitags_symbols; the string is assumed to be a tags table.
 
(requires macro file multitags.nm)

multitags_forget_symbols
multitags_forget_symbols(): sets $multitags_symbols to "".
 
(requires macro file multitags.nm)

multitags.nm
Functions in file multitags.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
multitags_search_path()
multitags_load_multitags_file_simple(tagfile)
multitags_load_multitags_file(tagfile)
multitags_add_multitags_file(tagfile)
multitags_load_all_multitags_file(tagfile)
multitags_postprocess_multitags_file(tags, dir)
multitags_load_multitags_file_post(tagfile)
multitags_add_multitags_file_post(tagfile)
multitags_load_all_multitags_file_post(tagfile)
multitags_forget_multitags_file()
multitags_find_lines(symbol, multitags)
multitags_goto_tag_entry(tag_entry, directory)
multitags_choice(lines)
multitags_choose_from(lines, dir)
multitags_choose(symbol, multitags, multitag_path)
multitags_choose_quick(symbol, multitags)
multitags_choose_in_file(file, multitags, multitag_path)
multitags_push_curpos()
multitags_push_curpos_cheap()
multitags_pop_curpos()
multitags_pop_curpos_quiet()
multitags_empty_stack()
multitags_set_stack_length()
multitags_get_all_symbols()
multitags_load_symbols()
multitags_add_symbols()
multitags_forget_symbols()
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Globals:
 
$multitags: last tags file read for multiply-defined tags access
$multitag_path: directory path to this file (used for relative file access)
$multitags_filename: default file name for tag files
$multitags_stack: a position return stack
$multitags_stack_limit: max stack length (entries) if any
$multitags_stack_len: current stack length (entries)
$multitags_symbols: a list of all symbols mentioned in the tags file
$multitags_search_path: a search path for loading multiple tag files
$multitags_files: paths of tag files loaded (newline-separated list)

* comment *
open_incl.nm -------------------------------------------------------------------

open_ModeStringInterpret
open_ModeStringInterpret(filename, search_path): opens the file somewhere on
	the given search path and checks its content for tabstop directives. It
	then sets tabbing accordingly.
 
(requires macro file open_incl.nm)

open_include_errorMsg
open_include_errorMsg(include_path, [expected]): returns an error string.
 
(requires macro file open_incl.nm)

open_include
open_include([filename]): attempts to find an "#include"d file name in the
	current line and search for it in the global include path, as
	appropriate to C and C++ source files. If a filename is supplied as a
	parameter, use it, otherwise examine the current line.
 
	Filenames are expected to be between < and > (in which case the
	$open_include_path is used "as is") or between " and " (in which case
	the current file's directory path, given by $file_path, is added to the
	front of the $open_include_path before searching).
 
(requires macro file open_incl.nm)

open_include_addPath
open_include_addPath([path]): adds a path to $open_include_path. If no
	parameter is supplied, a string dialog prompts for one. The path is
	added at the end of the list (if not already there).
 
(requires macro file open_incl.nm)

open_include_changePath
open_include_changePath([path]): allows reordering of $open_include_path.
 
(requires macro file open_incl.nm)

open_incl.nm
Functions in file open_incl.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
open_ModeStringInterpret(filename, search_path)
open_include_errorMsg(include_path, [expected])
open_include([filename])
open_include_addPath([path])
open_include_changePath([path])
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Globals:
 
$open_include_path_default: a useful default path, "/usr/include"
$open_include_path: the contents of the $NEDIT_INCLUDE_PATH environment
	variable, or the value of $open_include_path_default.

* comment *
pers.nm ------------------------------------------------------------------------

PERS_beginOfLine
PERS_beginOfLine(pos): Returns the position of the beginning of the line of
	the position pos.
 
(requires macro file pers.nm)

PERS_endOfLine
PERS_endOfLine(pos): Returns the position of the ending of the line of the
                      position pos.
 
(requires macro file pers.nm)

PERS_firstNonSpace
PERS_firstNonSpace(pos): Returns the position of the first non space/tab
	character after the position pos.
 
(requires macro file pers.nm)

PERS_prevBreakPos
PERS_prevBreakPos(pos): Returns the position of the previous break position
	before the position pos.
 
(requires macro file pers.nm)

PERS_isEmptyLine
PERS_isEmptyLine(pos): Returns 1 if the line of the position pos is an
	empty line.
 
(requires macro file pers.nm)

PERS_beginOfParagraph
PERS_beginOfParagraph(pos): Returns the position of the beginning of the
	paragraph at the position pos.
 
(requires macro file pers.nm)

PERS_endOfParagraph
PERS_endOfParagraph(pos): Returns the position of the ending of the
	paragraph at the position pos.
 
(requires macro file pers.nm)

PERS_columns
PERS_columns(str): Returns the number of columns the string str has. Tab
	characters are correctly handled.
 
(requires macro file pers.nm)

PERS_autonewlineMacro
PERS_autonewlineMacro(pos, char): This macro should be called as a type-in
        macro. It requires that the $column variable is set up properly. This
        macro inserts a newline character if the cursor is right of the
        $wrap_margin.
 
(requires macro file pers.nm)

PERS_refill
PERS_refill(startpos, endpos): Refills the text between the  two positions.
 
(requires macro file pers.nm)

PERS_refillParagraph
PERS_refillParagraph(pos): Refills the paragraph at the position pos.
	Returns the position of the next paragraph's beginning.
 
(requires macro file pers.nm)

PERS_makeParagraph
PERS_makeParagraph(startpos, endpos): Sets paragraph delimiters properly so
	that the text between the two position is recognized as one paragraph.
	Returns the pos of the paragraph's beginning.
 
(requires macro file pers.nm)

pers.nm
Functions in file pers.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
PERS_beginOfLine(pos)
PERS_endOfLine(pos)
PERS_firstNonSpace(pos)
PERS_prevBreakPos(pos)
PERS_isEmptyLine(pos)
PERS_beginOfParagraph(pos)
PERS_endOfParagraph(pos)
PERS_columns(str)
PERS_autonewlineMacro(pos, char)
PERS_refill(startpos, endpos)
PERS_refillParagraph(pos)
PERS_makeParagraph(startpos, endpos)

* comment *
redetab.nm ---------------------------------------------------------------------

detab
detab(text, leftcol, startcol, keeptrailing, tabwidth): expands tabs to spaces
	in the text, returning the converted text. If leftcol is specified, it
	designates the start position of the conversion. If startcol is
	specified, it designates the start column of the text. If keeptrailing
	is "keeptrailing", tab conversion continues upto the right hand newline,
	even if this contains just spaces; otherwise, trailing tabs and spaces
	are removed. Tab width is given by tabwidth. By default, leftcol is 0,
	keeptrailing is false and tabwidth is set to the NEdit $tab_dist value.
	Note that if the text does not terminate with a newline, trailing tabs
	and spaces will be converted up to the end of the text.
 
(requires macro file redetab.nm)

retab_get_endcol
retab_get_endcol(text, leftcol, prevcol, tabwidth): determines the end column
	of a piece of text which cannot be retabbed. This function is to be
	called from retab() only.
 
(requires macro file redetab.nm)

retab_retab_line
retab_retab_line(text, col, keeptrailing, tabwidth, minspaces, leadingonly):
	returns the converted, retabbed line. This function is to be called from
	retab_retab() only. text must not contain newlines.
 
(requires macro file redetab.nm)

retab_retab
retab_retab(text, leftcol, prevcol, keeptrailing, tabwidth, minspaces,
	leadingonly): returns the converted, retabbed text. This function is to
	be called from retab() only.
 
(requires macro file redetab.nm)

retab
retab(text, leftcol, startcol, keeptrailing, tabwidth, minspaces, leadingonly,
	avoidRE): replaces sequences of spaces and tabs to the equivalent
	minimal sequences of tabs. If leftcol is specified, it designates the
	start position of the conversion. If keeptrailing is "keeptrailing", tab
	conversion continues upto the right hand edge, even if this contains
	just spaces; otherwise, trailing tabs and spaces are removed. Tab width
	is given by tabwidth. minspaces indicates the minimal length of a
	sequence of spaces that can be considered for conversion. If leadingonly
	is "leadingonly", only space sequences at the left hand edge of each
	line will be converted. If avoidRE is set, it is supposed to consist of
	a regular expression for a part of a line which must not be converted
	(for example, within C strings). By default, leftcol is 0, keeptrailing
	is false, tabwidth is set to the NEdit $tab_dist value, minspaces is set
	to 2, and avoidRE is "".
 
(requires macro file redetab.nm)

redetab_selection
redetab_selection(tab_fn, avoidRE): converts the selected text to change
	spaces to tabs, or tabs to spaces, depending on whether tab_fn contains
	the word "retab" or "detab". If neither "retab" nor "detab" is present
	in tab_fn, nothing is done. If tab_fn also contains "trailing",
	space/tab characters after the last non-space character will be
	converted. If tab_fn contains "leading", only leading spaces will be
	transformed. Otherwise, defaults are used. avoidRE is as in retab().
 
(requires macro file redetab.nm)

converttabspace
converttabspace(text, tabwidth, space, tabbeg, tabfill, tabend, newl, cret):
	replaces sequences of spaces, tabs, newlines and carriage returns with
	the space, tabbeg, tabfill, tabend, newl and cret characters for
	visualisation.
converttabspace(text, "default"): replaces spaces, tabs and newlines with
	themselves.
converttabspace(text, "display"): replaces spaces, tabs and newlines with
	suitable characters form iso8859-1.
 
(requires macro file redetab.nm)

showtabspace
showtabspace(tabwidth, space, tabbeg, tabfill, tabend, newl, cret): replaces
	sequences of spaces, tabs, newlines and carriage returns with the space,
	tabbeg, tabfill, tabend, newl and cret characters for visualisation.
showtabspace("default"): replaces spaces, tabs and newlines with themselves.
showtabspace("display"): replaces spaces, tabs and newlines with suitable
	characters form iso8859-1.
 
(requires macro file redetab.nm)

redetab.nm
Functions in file redetab.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
detab(text, leftcol, startcol, keeptrailing, tabwidth)
retab_get_endcol(text, leftcol, prevcol, tabwidth)
retab_retab_line(text, col, keeptrailing, tabwidth, minspaces, leadingonly)
retab_retab(text, leftcol, prevcol, keeptrailing, tabwidth, minspaces, leadingonly)
retab(text, leftcol, startcol, keeptrailing, tabwidth, minspaces, leadingonly, avoidRE)
redetab_selection(tab_fn, avoidRE)
converttabspace(text, tabwidth, space, tabbeg, tabfill, tabend, newl, cret)
showtabspace(tabwidth, space, tabbeg, tabfill, tabend, newl, cret)

* comment *
tabDelete.nm -------------------------------------------------------------------

tabDeleteArea
tabDeleteArea(pos [, "backward"|forward"][, tabstop]) evaluates the number
       of space and tab characters to be deleted infront of or following pos so
       that the (non-space) text at or after pos shifts to the left by one tab
       stop. Returns that number; fails with an invalid function all.
 
(requires macro file tabDelete.nm)

tabDeleteArea_backward
tabDeleteArea_backward(cursor, tabsize): scans the line holding position
       cursor, determining the position of the previous tab or space+tab
       sequence making up a tab width. If the character before cursor is not
       a space, the position of that character is used. Returns the distance
       from this calculated position to cursor.
 
(requires macro file tabDelete.nm)

tabDeleteArea_forward
tabDeleteArea_forward(cursor, tabsize): scans the line holding position
       cursor, determining the position of the previous tab or space+tab
       sequence making up a tab width. If the character before cursor is not a
       space, the position of that character is used. It then examines
       characters following cursor which, if contiguous spaces or spaces and
       tab, advance to the next tab stop or non-space character. Returns the
       distance upto that point if spaces/tab, or 1 if not spaces/tab.
 
(requires macro file tabDelete.nm)

tab_delete
tab_delete(): deletes the previous character; if this was a space character,
       further space characters in front of the cursor will be deleted until a
       tab-stop position is reached. (The tab width used is the physical tab
       distance, as given by $tab_dist.)
 
(requires macro file tabDelete.nm)

tab_delete_forward
tab_delete_forward(): deletes the next character; if this was a space
       character, further space characters following the cursor up to the next
       tab-stop will be deleted, or until non-space characters are reached.
       (The tab width used is the physical tab distance, as given by
       $tab_dist.)
 
(requires macro file tabDelete.nm)

tabDelete.nm
Functions in file tabDelete.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
tabDeleteArea(pos [, "backward"|forward"][, tabstop])
tabDeleteArea_backward(cursor, tabsize)
tabDeleteArea_forward(cursor, tabsize)
tab_delete()
tab_delete_forward()

* comment *
win_nextprev.nm ----------------------------------------------------------------

win_next
win_next(): move to next document in order of opening, looping back to the
       last.
 
(requires macro file win_nextprev.nm)

win_prev
win_prev(): move to previous document in order of opening, looping back to the
       first.
 
(requires macro file win_nextprev.nm)

win_first_name
win_first_name(): returns the name of the first opened document.
 
(requires macro file win_nextprev.nm)

win_prev_name
win_prev_name(): returns the name of the previously opened document.
 
(requires macro file win_nextprev.nm)

win_nextprev.nm
Functions in file win_nextprev.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
win_next()
win_prev()
win_first_name()
win_prev_name()

* comment *
wordfinish.nm ------------------------------------------------------------------

wordfinish_max_common_prefix
wordfinish_max_common_prefix(list): returns the prefix of maximal length which
	starts all elements in list.
 
(requires macro file wordfinish.nm)

wordfinish_reduce_to_valid_suffixes
wordfinish_reduce_to_valid_suffixes(list, prefix, direction): returns a list
	of just the suffixes of all words in list starting with prefix. The
	result is built in the direction indicated.
 
(requires macro file wordfinish.nm)

wordfinish
wordfinish(wordlist, direction, nextchars): attempts to finish a word, given
	something already. The word to be completed is that before or under the
	cursor. The wordlist gives the list of previous words. If direction is
	given, it indicates in which direction ("forward" or "backward") the
	list is to be read.
 
(requires macro file wordfinish.nm)

wordfinish_typein_macro
wordfinish_typein_macro(pos, newchars): attempts to finish a word (for use
	with the smart-indent mechanism).
 
(requires macro file wordfinish.nm)

wordfinishrecent
wordfinishrecent(lines): attempts to finish a word, given something already.
	The word to be completed is that before or under the cursor. The words
	used are taken from the previous lines.
 
(requires macro file wordfinish.nm)

wordfinish_add_symfiles
wordfinish_add_symfiles(): adds symbols from symbols files; either the file
	whose name is passed, if any, or all files of name $wordfinish_sym_file
	in the search path given by $wordfinish_sym_env
 
(requires macro file wordfinish.nm)

wordfinish_add_symbols
wordfinish_add_symbols(): adds symbols from a newline separated list of
	symbols.
 
(requires macro file wordfinish.nm)

wordfinish.nm
Functions in file wordfinish.nm:
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
wordfinish_max_common_prefix(list)
wordfinish_reduce_to_valid_suffixes(list, prefix, direction)
wordfinish(wordlist, direction, nextchars)
wordfinish_typein_macro(pos, newchars)
wordfinishrecent(lines)
wordfinish_add_symfiles()
wordfinish_add_symbols()