Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: reverse-menu-complete
- X-seq: zsh-workers 35637
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: reverse-menu-complete
- Date: Sat, 27 Jun 2015 23:34:56 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1435440897; bh=T430f2esgaEXu8rAVwISydgAmfGy4dMO2u/zGZWZBsY=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=t4rCs9aXPnvTG3nfX01ukJuRd5mWFC4hI/7yyNrJDNXudABbGT/FO8md1dL0rgNApouGFS9R4A756x06S2HEYMPwzn6BCE4zZrxldcJaA8npj3CHhaUpv4n9NZUz1Xb2P703pHNVa859fbpE0ZIMDHAslvZd4fx5JkmTn8WBIFViJe8qZIvmH3psGTmWPIv4kyPpp+raNwwj5S8hujabcYMEw09x10lZa+gRRAj2E07LUVAuaacv25OkZKUnWkJgCKpnV2YadyhBNUaRW0d8/WnmxTHZAjI8P9rBihpXvY8NzQo2Lbyyg/xlOhV3CGrj6vymbAT3PVkMAJ6P+78yug==
- In-reply-to: <150627110311.ZM3603@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <26732.1435387972@thecus.kiddle.eu> <150627110311.ZM3603@torch.brasslantern.com>
Bart wrote:
> } reversemenucomplete(char **args)
> } {
> } wouldinstab = 0;
> } + zmult = -zmult;
> } + menucomplete(args);
> }
> } runhookdef(REVERSEMENUHOOK, NULL);
> } return 0;
>
> So what does the REVERSEMENUHOOK do, now that the reverse_menu function
> is gone?
Essentially nothing.
As the development guide says, "Modules can also define function hooks.
Other modules can then add functions to these hooks to make the first
module call these functions instead of the default."
The fact that even complist didn't need to add a function to
REVERSEMENUHOOK is perhaps good evidence that it isn't useful.
So shall I bin it?
Oliver
diff --git a/Src/Zle/zle.h b/Src/Zle/zle.h
index 3c65290..ab2428e 100644
--- a/Src/Zle/zle.h
+++ b/Src/Zle/zle.h
@@ -352,8 +352,7 @@ struct brinfo {
#define BEFORECOMPLETEHOOK (zlehooks + 2)
#define AFTERCOMPLETEHOOK (zlehooks + 3)
#define ACCEPTCOMPHOOK (zlehooks + 4)
-#define REVERSEMENUHOOK (zlehooks + 5)
-#define INVALIDATELISTHOOK (zlehooks + 6)
+#define INVALIDATELISTHOOK (zlehooks + 5)
/* complete hook data struct */
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 7ccfb68..fe561fc 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1992,8 +1992,6 @@ mod_export struct hookdef zlehooks[] = {
HOOKDEF("after_complete", NULL, 0),
/* ACCEPTCOMPHOOK */
HOOKDEF("accept_completion", NULL, 0),
- /* REVERSEMENUHOOK */
- HOOKDEF("reverse_menu", NULL, 0),
/* INVALIDATELISTHOOK */
HOOKDEF("invalidate_list", NULL, 0),
};
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 81a2395..937b910 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -346,10 +346,7 @@ reversemenucomplete(char **args)
{
wouldinstab = 0;
zmult = -zmult;
- menucomplete(args);
-
- runhookdef(REVERSEMENUHOOK, NULL);
- return 0;
+ return menucomplete(args);
}
/**/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author