Support derived modes in zoom-ignored-major-modes #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Foreword
First of all thank you for this incredible tool, its been a few years
since I've been using it, and I've never looked back.
I ran into an issue that I lived with for a while but figured I could
try to improve it. Hopefully this PR finds you well.
Problem
Emacs has a concept of derived and parent modes. The relationship
between these modes is often used to share configuration or show a
shared purpose.
zoom-mode
does not support the use of these "parent" modes inzoom-ignored-major-modes
, instead it checks whether the current modeis in that list of modes. One example would be a user who wants to
ignore all
gnus-mode
child modes; currently they would need to addgnus-summary-mode
,gnus-group-mode
, and some of the other 20 odd^gnus-.*-mode$
modes. This is difficult to track and error prone.Solution
Instead of checking if the
major-mode
is in thezoom-ignored-major-modes
list check if it is a child of one of thosemodes.
Testing
I've tested with
gnus-mode
and found it to work as expected