This adds a file name hook to some of NEdit's file open
procedures. If a macro function named file_name_hook()
exists, it is executed before the filename is handed
over to the low-level file functions. The filename is
handed to the hook. The hook is expected to return the
filename after whatever manipulations are done. NEdit
will open the returned filename.
Note: This is a very rough hack, more like a proof of
concept. Use it at your own risk, but if you do, tell
me how the handling could be improved from the
point-of-view of the user/hook author.
Note: The patch includes C++ comments (to make
absolutely sure that they will not trickle into
released code). If your compiler chokes on them,
replace ^(\s*)//(.*)$ with \1/*\2*/ to replace them
with C comments.
For the developers, please have a look at the FIXME
comments in menu.c.
Log in to post a comment.