beacon icon indicating copy to clipboard operation
beacon copied to clipboard

Error (use-package): beacon/:config: Symbol’s value as variable is void: after-focus-change-function

Open montaropdf opened this issue 3 years ago • 4 comments

Hello,

Since a few weeks, if not a month or two, I get this message in the *Warnings* buffer. Beacon seems still to work properly, however, that warning popping up at every start is a bit annoying.

I use the latest stable version of the official package on GNU ELPA.

montaropdf avatar Aug 24 '22 07:08 montaropdf

Yep, seeing this too in my broken CI builds for some Emacs versions. Specifically, beacon.el has

        (add-function :after after-focus-change-function
                      #'beacon--blink-on-focus)

but in Emacs < 27.1, there's no such variable as after-focus-change-function, so dereferencing it in Emacs 26.1 (for example) will naturally fail, despite beacon.el declaring Emacs 25.1 as its minimal compatible version.

purcell avatar Aug 26 '22 15:08 purcell

The culprit here is 0cf8b60f62876f3e75653a5fb30d5d5cdd74c586. You can either use after-focus-change-function and require Emacs >= 27.1, or use the previous obsolete focus-{in,out}-hook. Probably an (if (boundp 'after-focus-change-function) ... ...) form could allow you to support either if that's desired.

purcell avatar Aug 26 '22 15:08 purcell

I also get it on Emacs 26.3 (but not on Emacs >= 27).

philipp-classen avatar Aug 29 '22 09:08 philipp-classen

^ I filed a simple fix for this in #89.

purcell avatar Nov 25 '22 12:11 purcell