* language * NEdit Macro * comment * NEDIT_LOADED.nm ---------------------------------------------------------------- * alias * NEDIT NEDIT_ $NEDIT $NEDIT_ NEDIT_LOADED.nm NEDIT NEDIT_LOADED.nm __________________________________________________________________________ File path manipulation: bool = NEDIT_readable_file_exists(filename) string = NEDIT_reduce_filename(filename) string = NEDIT_remove_dotdot(filename) string = NEDIT_find_file_in_pathlist(filename, list) __________________________________________________________________________ Include file functionality: bool = NEDIT_require_macro_file(macro_filename [, search_prefix, search_suffix]) bool = NEDIT_reload_macro_file(macro_filename [, search_prefix, search_suffix]) __________________________________________________________________________ Display settings: NEDIT_display_settings() NEDIT_show_macro_files() NEDIT_show_macro_file_names() __________________________________________________________________________ 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 $NEDIT_HOME_DIR: path of user home directory (default destination of cd) $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_readable_file_exists bool = NEDIT_readable_file_exists(filename) Tests filename to see if it refers to an existing file. Returns zero on failure. The current directory of the subshell will be used. NEDIT_reduce_filename string = NEDIT_reduce_filename(filename) Returns the filename without "//" or "/./". NEDIT_remove_dotdot string = NEDIT_remove_dotdot(filename) Returns the filename without "/../", removing necessary path elements preceding "../"s. NEDIT_find_file_in_pathlist string = 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. NEDIT_display_settings NEDIT_display_settings() Display the values of various NEDIT loader settings in a dialog box. NEDIT_require_macro_file bool = NEDIT_require_macro_file(macro_filename [, search_prefix, search_suffix]) 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.  If search_prefix, search_suffix are supplied, these are interpreted as newline-separated directory path lists added at the front and back of $NEDIT_MACRO_SEARCH_PATH before searching.  Returns non-zero if (already?) loaded. NEDIT_reload_macro_file bool = NEDIT_reload_macro_file(macro_filename [, search_prefix, search_suffix]) 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, even if already loaded. It searches along the path in $NEDIT_MACRO_SEARCH_PATH. Using this function sets up a sort of "include" mechanism which avoids circular dependencies.  If search_prefix, search_suffix are supplied, these are interpreted as newline-separated directory path lists added at the front and back of $NEDIT_MACRO_SEARCH_PATH before searching.  Returns non-zero if successfully loaded. NEDIT_show_macro_files NEDIT_show_macro_files() Lists full macro file loading information in a dialog. 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().) * comment * DEBUG.nm ----------------------------------------------------------------------- * alias * DEBUG_ $DEBUG DEBUG.nm DEBUG_ $DEBUG_ENABLE $DEBUG_WINDOW_UNDOS DEBUG DEBUG_clear_all DEBUG_mark_to DEBUG_undo_to DEBUG_s DEBUG_s_nl DEBUG_s_col DEBUG_s_nl_col $DEBUG_ENABLE $DEBUG_ENABLE If non-zero, enables debugging macros. Otherwise they are disabled. DEBUG DEBUG(text) Writes text to the debug window. Use the utility function DEBUG_s_nl_col(string) to display visual tabs, spaces, etc. as follows: DEBUG(DEBUG_s_nl_col(string)) DEBUG_clear_all DEBUG_clear_all() Calls undo() on the debug window until all undone. DEBUG_mark_to DEBUG_mark_to() Returns the current $DEBUG_WINDOW_UNDOS value. DEBUG_undo_to DEBUG_undo_to(undo_mark) Calls undo() until $DEBUG_WINDOW_UNDOS == undo_mark. DEBUG_s string = DEBUG_s(string) Returns the text string for "display", with newlines. See also: string = DEBUG_s_col(string) string = DEBUG_s_nl_col(string) DEBUG_s_col string = DEBUG_s_col(string) Returns the text string for "display", flattening newlines. We use $column as a length specifying start column, preserving tabstop settings. See also: string = DEBUG_s(string) string = DEBUG_s_nl_col(string) DEBUG_s_nl_col string = DEBUG_s_nl_col(string) Returns the text string for "display", with newlines. We use $column as a length specifying start column, preserving tabstop settings. See also: string = DEBUG_s(string) string = DEBUG_s_col(string)