From mboxrd@z Thu Jan 1 00:00:00 1970 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes Date: Thu, 28 Jan 1999 18:06:20 +0100 (MET) Message-Id: <199901281706.SAA06951@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk Subject: PATCH: sfcontext for completion widgets X-Mailing-List: 5092 Thanks to Bart's last question I realised that I forgot to define a shell function context for completion widgets. Bye Sven --- os/zsh.h Thu Jan 28 15:49:19 1999 +++ Src/zsh.h Thu Jan 28 18:03:03 1999 @@ -780,6 +780,7 @@ #define SFC_HOOK 2 /* one of the special functions */ #define SFC_WIDGET 3 /* user defined widget */ #define SFC_COMPLETE 4 /* called from completion code */ +#define SFC_CWIDGET 5 /* new style completion widget */ /* node in list of function call wrappers */ --- os/Zle/zle_tricky.c Thu Jan 28 15:49:26 1999 +++ Src/Zle/zle_tricky.c Thu Jan 28 18:04:57 1999 @@ -3199,7 +3199,7 @@ if ((list = getshfunc(fn)) != &dummy_list) { LinkList args = newlinklist(); char **p, *tmp; - int aadd = 0, usea = 1, icf = incompfunc; + int aadd = 0, usea = 1, icf = incompfunc, osc = sfcontext; addlinknode(args, fn); @@ -3276,9 +3276,11 @@ incompfunc = 1; startparamscope(); makecompparamsptr(); + sfcontext = SFC_CWIDGET; NEWHEAPS(compheap) { doshfunc(fn, list, args, 0, 1); } OLDHEAPS; + sfcontext = osc; endparamscope(); lastcmd = 0; incompfunc = icf; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de