Hi,

* Bert Wesarg wrote (2007-12-24 10:46):
>On Dec 23, 2007 12:49 PM, Thorsten Haude <[EMAIL PROTECTED]> wrote:
>> * Bert Wesarg wrote (2007-06-29 14:53):
>> >Bert Wesarg wrote:
>> >> I'm currently experimenting with the file_open_hook from Thorsten Haude
>> >> Patch Collection. But files given on the command line from nedit (not nc)
>> >> fire not this hook. That is because the ReadMacroInitFile() function is
>> >> called after the EditExistingFile() function. and the autoload.nm file is
>> >> the only way to define this file_open_hook function early enough. Now my
>> >> question: can I move the call to ReadMacroInitFile() out of the
>> >> argumenting parsing loop and call this unconditionaly before this loop?
>> >After a first test, it is not safe. because there exits no document to run
>> >the macros, so I also move the open-an-"Untitled" code up in front of the
>> >loop. lets see if this works.
>>
>> Did it work? Do you have a patch?
>Yes. Yes:
>http://bert.wesarg.googlepages.com/neditpatches

Ok, someone is standing on my tube (to get back with the anglicism a
bit), but I don' get the last hunk:
- - - Schnipp - - -
@@ -777,8 +773,7 @@ int main(int argc, char **argv)
 
     /* If no file to edit was specified, open a window to edit "Untitled" */
     if (!fileSpecified) {
-       EditNewFile(NULL, geometry, iconic, langMode, NULL);
-       ReadMacroInitFile(WindowList);
+        CloseWindow(dummy_untitled);
        CheckCloseDim();
        if (toDoCommand != NULL)
            DoMacro(WindowList, toDoCommand, "-do macro");
- - - Schnapp - - -

Why don't you want the Untitled to be opened?


Anyway, I do think it's rather a hack, forced by NEdit's insistence to
run macros in a window. Pending the point above I would like to
include it in the Collection with a proper warning, if you don't mind.


Thorsten                                    Melissa Ferrick: The other Side
-- 
The privacy of correspondence, posts and telecommunications shall be inviolable.
    - German Grundgesetz, Article 10, Sec. 1 

Attachment: pgpYx3IFFS6Ma.pgp
Description: PGP signature

-- 
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop

Reply via email to