flycheck / flycheck-pos-tip

Flycheck errors display in tooltip
GNU General Public License v3.0
122 stars 10 forks source link

Make hooks local #22

Closed errx closed 7 years ago

errx commented 7 years ago

Probably LOCAL argument should be set when adding/removing hooks because flycheck-pos-tip-hide-messages executes even when flycheck-mode is not enabled.

I've found this problem when I tried to debug pos-tip-show function in scratch buffer. For example: (pos-tip-show "test") C-x C-e Popup shows for a moment and then closes immediately because flycheck-pos-tip-hide-messages was added globally to the post-command-hook

swsnr commented 7 years ago

@errx I'm not sure whether that's the right thing to do… flycheck-pos-tip-mode is a global minor mode. How do local hooks make sense for global minor modes?

errx commented 7 years ago

Yes. I agree this is actually doesn't work correctly. I'll close this PR.

But at the same time it's really confusing that pos-tip-show popup hides after post-command-hook even if flycheck-mode isn't enabled in current buffer.

As workaround for myself I removed post-command-hook from hooks list. As for now everything is working ok.

swsnr commented 7 years ago

@errx I'd welcome better approaches to hide tooltips again.