elp-revive / auto-highlight-symbol

Automatic highlighting current symbol minor mode.
GNU General Public License v3.0
52 stars 13 forks source link

install/update: void: ahs-focus-out and void ahs-focus-in #8

Closed duianto closed 3 years ago

duianto commented 3 years ago

After installing or updating: auto-highlight-symbol

When the Emacs frame loses/gains focus when switching to/from another application.

Then the messages buffer shows:

if: Symbol’s function definition is void: ahs-focus-out
if: Symbol’s function definition is void: ahs-focus-in

Restarting Emacs after the install/update fixes it. But is it possible to handle it without having to restart?

System info auto-highlight-symbol-20210705.1351 GNU Emacs 27.2 (build 1, x86_64-w64-mingw32) of 2021-03-26 Windows 21H1

jcs090218 commented 3 years ago

Make sure you require auto-higlight-symbol before calling these functions. These functions aren't autoload.

duianto commented 3 years ago

The functions are called automatically when the Emacs frame is un/focused. Before any ahs function has been called.

Maybe it should check that auto-highlight-symbol-mode is enabled, here: https://github.com/jcs-elpa/auto-highlight-symbol/blob/e8809909565ec0184920eb4236709581a607fafe/auto-highlight-symbol.el#L1726-L1733

jcs090218 commented 3 years ago

I have removed eval-and-compile. Would this work?

duianto commented 3 years ago

I don't know. I can check when melpa has the latest version.

duianto commented 3 years ago

I just updated to: auto-highlight-symbol-20210708.1057

The void messages do not appear anymore, when updating or installing from scratch:

Thanks