|
addOrUpdateIf you only need this macro because it is required by another package that you want to install, you can skip the following explanations, and continue with "Installation". NameaddOrUpdate — add, update or delete custom entries in existing macro files DescriptionThis macro inserts, updates or deletes tagged
code fragments in any sort
of macro but makes especially sense in shortcut macros and of course also in GDI settings. For
the moment, the macro checks the tags
" The macro is able to insert new code fragments before the
" This behavior is essential, because a setup routine has to respect customizations made by other mode contributors (who perhaps used this macro in their setup routines too). Simply copying new versions over existing ones is not a solution! UsageSuppose you have a macro file (eg. // @DEFAULT CMD("Complete Word"); End; You want to insert a custom macro fragment, that should only react in a specific mode,
in this example
" // @BEGIN: XML // @DATE: 2003-02-06 // @AUTHOR: Georges Schmitz // ------------------------------------------------------------- IfisMode("XML","%!m","Exe('%b\Config\XML\macros\xmlTagCompletion.edt');Exit;"); // ------------------------------------------------------------- // @END: XML The second form resembles RCS/CVS tags: // $Begin: XML $ // $Date: 2003/03/20 10:00:04 $ // $Author: schmitz $ // ------------------------------------------------------------- IfisMode("XML","%!m","Exe('%b\Config\XML\macros\xmlTagCompletion.edt');Exit;"); // ------------------------------------------------------------- // $End: XML $ You do not know
Incorporating the following instructions into your setup will do the job. Assign('extensionKey', 'XML'); Assign('extensionFile', 'extensions\tagCompletion.edt'); Assign('localTargetFile', '%b\Menus\Tools\completeWord.edt'); Assign('globalTargetFile', '%B\Menus\Tools\completeWord.edt'); Exe('%b\Macros\macro\addORupdate.edt');
Used Local Variables
DownloadMacro contributed by
Georges Schmitz <georges.schmitz Revision and extensions by Robert <w.m.l
|