add listDialogKeyWords.diff and fix splitMS()
[nedit-bw.git] / load_macro_file-nowarn-option.patch
blobe0160ce24d50bc2cd15c306d8f6ea87f6d6f58dd
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.
7 ---
9 doc/help.etx | 2 ++
10 source/menu.c | 13 ++++++++++++-
11 2 files changed, 14 insertions(+), 1 deletion(-)
13 diff --quilt old/doc/help.etx new/doc/help.etx
14 --- old/doc/help.etx
15 +++ 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
26 --- old/source/menu.c
27 +++ 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;
34 if (*nArgs == 0) {
35 fprintf(stderr,"nedit: load_macro_file action requires file argument\n");
36 return;
38 - ReadMacroFile(WidgetToWindow(w), args[0], True);
40 + if (*nArgs >= 2) {
41 + if (0 != strCaseCmp(args[1], "nowarn")) {
42 + fprintf(stderr,"nedit: load_macro_file unknown argument: \"%s\"\n", args[1]);
43 + return;
44 + }
45 + warnNotExist = False;
46 + }
48 + ReadMacroFile(WidgetToWindow(w), args[0], warnNotExist);
51 static void loadTagsDialogAP(Widget w, XEvent *event, String *args,