Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support expansion of setup modes for find_hooks() #45

Merged
merged 1 commit into from
Aug 15, 2018

Conversation

uwiger
Copy link
Owner

@uwiger uwiger commented Nov 10, 2017

From the docs:

Using the setup environment variable modes, it is possible to
define a mode that includes all hooks from different modes.
The format is [{M1, [M2,...]}]. The expansion is done recursively,
so a mode entry in the right-hand side of a pair can expand into other
modes. In order to be included in the final list of modes, an expanding
mode needs to include itself in the right-hand side. For example:

  • Applying a to [{a, [b]}] returns [b]
  • Applying a to [{a, [a,b]}] returns [a,b]
  • Applying a to [{a, [a,b]},{b,[c,d]}] returns [a,c,d]

A typical application of this would be [{test, [normal, test]}], where
starting in the test mode would cause all normal and all test hooks
to be executed.

@tolbrino
Copy link
Collaborator

@uwiger :+1 for the test coverage

@tolbrino
Copy link
Collaborator

@uwiger Can be merged from my perspective.

@tolbrino tolbrino self-requested a review August 14, 2018 13:22
@uwiger uwiger merged commit 7ba873d into master Aug 15, 2018
@uwiger uwiger deleted the uw-mode-expansion branch August 15, 2018 11:36
@uwiger
Copy link
Owner Author

uwiger commented Aug 15, 2018

Thanks. Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants