Specify lexical-binding?
Using native comp in modern emacs is triggering a silly warning about lexical-binding not being specified, which gets emacs to complain about it on every startup.
```text
Compiling file $SPACEMACS_DIR/core/libs/spacemacs-theme/spacemacs-theme.el at Thu May 29 11:16:16 2025
Entering directory ‘$SPACEMACS_DIR/core/libs/spacemacs-theme/’
Warning (bytecomp): file has no ‘lexical-binding’ directive on its first line
```
Now, looking at the [`no-byte-compile: t`](https://github.com/nashamri/spacemacs-theme/blob/master/spacemacs-theme.el#L1099) line at the end of the file, it seems like bytecomp shouldn't even be running, so it seems like the issue is that native comp is still trying to compile the theme.
I tried the `;; -*-no-byte-compile: t -*-` marker at the top and it still spits the same warning, so it seems the file is parsed, checked, but not compiled (no `.elc` sibling file).
One of these is needed to get rid of the warning. I'm not sure if dynamic binding is needed to allow changing the theme interactively.
``` elisp
;;; -*- lexical-binding: t -*-
;;; -*- lexical-binding: nil -*-
```
关闭于 2025-06-03 3 条评论