interpret menu and nomenu in the ctl file to set resp. unset filemenu which controls whether or not the automagic Undo, Redo, Put are in the tag. this is needed to allow automagic Undo/Redo/Put for acme Wiki -- because all files edited in the wiki look like directories to acme the automagic Undo/Redo/Put are switched off there. a separate patch (acme-wiki-filemenu-in-tag) depends on this one. Axel. Reference: /n/sources/patch/applied/acme-enable-menu-via-ctl Date: Mon Aug 15 00:55:24 CES 2005 --- /sys/src/cmd/acme/xfid.c Mon Aug 15 00:49:28 2005 +++ /sys/src/cmd/acme/xfid.c Mon Aug 15 00:49:23 2005 @@ -734,6 +734,14 @@ settag = TRUE; m = 4; }else + if(strncmp(p, "nomenu", 6) == 0){ /* turn off automatic menu */ + w->filemenu = FALSE; + m = 6; + }else + if(strncmp(p, "menu", 4) == 0){ /* enable automatic menu */ + w->filemenu = TRUE; + m = 4; + }else if(strncmp(p, "noscroll", 8) == 0){ /* turn off automatic scrolling */ w->noscroll = TRUE; m = 8; --- /sys/man/4/acme Mon Aug 15 00:49:42 2005 +++ /sys/man/4/acme Mon Aug 15 00:49:38 2005 @@ -230,6 +230,15 @@ returning the window to the usual state wherein each modification to the body must be undone individually. .TP +.B menu +Enable the automatic showing of +.BR Undo , +.B Redo +and +.B Put +commands to the left of the bar in the tag. +This is the default for plain files. +.TP .BI name " name Set the name of the window to .IR name . @@ -239,6 +248,15 @@ may be undone in a single .B Undo interactive command. +.TP +.B nomenu +Turn off automatic showing of +.BR Undo , +.B Redo +and +.B Put +commands to the left of the bar in the tag. +This is the default for directory and error windows. .TP .B noscroll Turn off automatic `scrolling' of the window to show text written to the body.