k-talo / volatile-highlights.el

Minor mode for visual feedback on some operations in Emacs. STATUS: *STABLE*
135 stars 18 forks source link

installing extensions when `volatile-highlight-mode` is already enabled #14

Closed donm closed 8 years ago

donm commented 8 years ago

This package is great. Thank you for writing it.

If you define and install an extension (vhl/define-extension and vhl/install-extension) but volatile-highlight-mode is already running, then the new vhl/ext/whatever/on function is not called. Should (vhl/install-extension 'whatever) also call (vhl/load-extension 'whatever') when vhl is turned on?

If so, that would be easy enough to add. If not, it might be helpful to add that to the README. For example, the code that I'm using to add vhl to evil-mode is

(use-package volatile-highlights
  :config
  (progn
    (volatile-highlights-mode t)
    (vhl/define-extension 'evil 'evil-paste-after 'evil-paste-before 'evil-paste-pop 'evil-move)
    (with-eval-after-load 'evil
      (vhl/install-extension 'evil)
      (vhl/load-extension 'evil))))

(Here it would also work to put (volatile-highlights-mode t) last, but that's not always a solution.)

k-talo commented 8 years ago

I fixed a problem that the fucntion `vhl/install-extension' won't load an extension properly. Thanks for your reporting.