Hi there,

I'm running the latest version of emms on Emacs 31 (build from source) and I have witnessed this warning when I run |emms-all|:

   |⛔ Warning (files): Missing ‘lexical-binding’ cookie in
   "~/.config/emacs/var/emms/cache".|
   |You can add one with ‘M-x elisp-enable-lexical-binding RET’.|
   |See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to
   Lexical Binding’|
   |for more information.|

Lexical binding seems to be the default since Emacs 31, see here: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74145.

Would it be a quickwin to just enable lexical-binding in the cache file, like the attached patch does? Or are there more things to consider? I'm pretty new to emms and emacs related mailing lists.


Kind regards

Bastian

diff --git a/emms-cache.el b/emms-cache.el
index 0b52bbb..7deb9c9 100644
--- a/emms-cache.el
+++ b/emms-cache.el
@@ -134,7 +134,7 @@ This is used to cache over emacs sessions.")
       (insert
        (concat ";;; .emms-cache -*- mode: emacs-lisp; coding: "
                (symbol-name emms-cache-file-coding-system)
-               "; -*-\n"))
+               "; lexical-binding: t; -*-\n"))
       (maphash (lambda (k v)
                 (insert (format
                           "(puthash %S '%S emms-cache-db)\n" k v)))

Reply via email to