From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: reverse-menu-complete
Date: Sat, 27 Jun 2015 23:34:56 +0200 [thread overview]
Message-ID: <29698.1435440896@thecus.kiddle.eu> (raw)
In-Reply-To: <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);
}
/**/
next prev parent reply other threads:[~2015-06-27 21:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-27 6:52 reverse-menu-complete Oliver Kiddle
2015-06-27 16:37 ` reverse-menu-complete Peter Stephenson
2015-06-27 18:03 ` reverse-menu-complete Bart Schaefer
2015-06-27 21:34 ` Oliver Kiddle [this message]
2015-06-27 23:35 ` reverse-menu-complete Bart Schaefer
2015-06-28 14:22 ` reverse-menu-complete Oliver Kiddle
2015-06-28 18:47 ` reverse-menu-complete Bart Schaefer
2016-02-26 20:55 ` reverse-menu-complete Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29698.1435440896@thecus.kiddle.eu \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).