Re: editor_command and file not modified message
"J.B. Nicholson-Owens" <[email protected]>
| Newsgroups | gmane.network.slrn.user |
|---|---|
| Organization | Forest Field Omnimedia |
| Message-ID | <[email protected]> |
Christian Ebert wrote: > You could do the same with your editor_command and signature > variable, so you don't have to change your script when you decide > a configure change. Indeed; I'd suggest doing this in such a way that the proper preferences are restored even if an error is raised -- if some function you call could possibly generate an error, reset these configuration settings before your code loses control. Thus when your code finishes you will have restored as much state as you modified and you'll hand control to some other code expects to see this configuration set up as it was before it called your code. In S-Lang 1.x you can define ERROR_BLOCKs to implement this, in S-Lang 2.x try-catch blocks. The same logic would apply if your code is returning any value to a caller (probably using EXIT_BLOCK). ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/