crux icon indicating copy to clipboard operation
crux copied to clipboard

Use `derived-mode-p` for functions to also work for derived modes

Open meliache opened this issue 3 years ago • 0 comments

In my case I recently started using dirvish, which is an enhanced dired-mode, and I was surprised that crux-open-with didn't work, but I fixed it by using derived-mode-p.

Then, I searched for other occurrences of major-mode and also replaced there

(equal major-mode '<mode>)

by

(derived-mode-p '<mode>)

I'm still not sure whether I should also do that in crux-cleanup-buffer-or-region, where in checking the membership in crux-untabify-sensitive-modes and crux-indent-sensitive-modes, derived modes are note considered. These variables are customizable and I think not considering derived modes there adds control. But here I would be happy on feedback.


  • [X] The commits are consistent with our contribution guidelines
  • [X] The new code is not generating bytecode or M-x checkdoc warnings
  • [X] You've updated the changelog (if adding/changing user-visible functionality)
  • [X] You've updated the readme (if adding/changing user-visible functionality)

meliache avatar Mar 22 '22 15:03 meliache