InterpretDebug-mods: calculate OpName length
[nedit-bw.git] / load_macro_file-nowarn-option.patch
blob2a703929c370d09f40231a6c1afbb60ccf671ebf
1 ---
3 doc/help.etx | 2 ++
4 source/menu.c | 13 ++++++++++++-
5 2 files changed, 14 insertions(+), 1 deletion(-)
7 diff --quilt old/doc/help.etx new/doc/help.etx
8 --- old/doc/help.etx
9 +++ new/doc/help.etx
10 @@ -3139,10 +3139,12 @@ Action Routines
12 **goto_mark**( ~mark-letter~ )
14 **include_file**( ~filename~ )
16 + **load_macro_file**( ~filename~ [, "nowarn"])
18 **load_tags_file**( ~filename~ )
20 **macro_menu_command**( ~macro-menu-item-name~ )
22 **mark**( ~mark-letter~ )
23 diff --quilt old/source/menu.c new/source/menu.c
24 --- old/source/menu.c
25 +++ new/source/menu.c
26 @@ -2936,15 +2936,26 @@ static void loadMacroDialogAP(Widget w,
27 XtCallActionProc(window->lastFocus, "load_macro_file", event, params, 1);
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,
52 Cardinal *nArgs)