1 Subject: load_macro_file(): "nowarn" option
3 The internal ReadMacroFile() function has a warnNotExist option, the
4 load_macro_file() macro calls this always with True. This patch gives this
5 option also to the macro function.
10 source/menu.c | 13 ++++++++++++-
11 2 files changed, 14 insertions(+), 1 deletion(-)
13 diff --quilt old/doc/help.etx new/doc/help.etx
16 @@ -3141,6 +3141,8 @@ Action Routines
18 **include_file**( ~filename~ )
20 + **load_macro_file**( ~filename~ [, "nowarn"])
22 **load_tags_file**( ~filename~ )
24 **macro_menu_command**( ~macro-menu-item-name~ )
25 diff --quilt old/source/menu.c new/source/menu.c
28 @@ -2938,11 +2938,22 @@ static void loadMacroDialogAP(Widget w,
30 static void loadMacroAP(Widget w, XEvent *event, String *args, Cardinal *nArgs)
32 + Boolean warnNotExist = True;
35 fprintf(stderr,"nedit: load_macro_file action requires file argument\n");
38 - ReadMacroFile(WidgetToWindow(w), args[0], True);
41 + if (0 != strCaseCmp(args[1], "nowarn")) {
42 + fprintf(stderr,"nedit: load_macro_file unknown argument: \"%s\"\n", args[1]);
45 + warnNotExist = False;
48 + ReadMacroFile(WidgetToWindow(w), args[0], warnNotExist);
51 static void loadTagsDialogAP(Widget w, XEvent *event, String *args,