mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix: silence 'missing lexical-binding cookie' warnings
As of recent commits of Emacs 31, elisp files missing a "lexical-binding: t" cookie will emit this warning: Warning (files): Missing ‘lexical-binding’ cookie in "path/to/elisp/file". 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. You can look forward to many of these if you use any old and unmaintained elisp packages, or if you have elisp shell scripts with shebang lines (which make this warning unavoidable). This commit silences these warnings because it's poorly implemented. It's obnoxious to users and they aren't the ones that should be told this. It ought to be emitted during byte-compilation or by linters (e.g. `M-x checkdoc`) at the folks actually in a position to do something about the warning (i.e. the developers). Ref: https://lists.gnu.org/r/emacs-devel/2024-05/msg00283.html
This commit is contained in:
2
bin/doom
2
bin/doom
@ -9,7 +9,7 @@
|
||||
:; export __DOOMGEOM="${__DOOMGEOM:-`tput cols 2>/dev/null`x`tput lines 2>/dev/null`}"
|
||||
:; export __DOOMGPIPE=${__DOOMGPIPE:-$__DOOMPIPE}
|
||||
:; export __DOOMPIPE=; [ -t 0 ] || __DOOMPIPE="${__DOOMPIPE}0"; [ -t 1 ] || __DOOMPIPE="${__DOOMPIPE}1"
|
||||
:; $emacs --load "$0" -- "$@" || exit=$?
|
||||
:; $emacs --eval "(setq warning-inhibit-types '((files missing-lexbind-cookie)))" --load "$0" -- "$@" || exit=$?
|
||||
:; [ "${exit:-0}" -eq 254 ] && { export TMPDIR="${TMPDIR:-${TMP:-${TEMP:-`$emacs -Q --eval '(princ temporary-file-directory)' 2>/dev/null`}}}"; sh "${TMPDIR}/doom.${__DOOMPID}.${__DOOMSTEP}.sh" "$0" "$@" && true; exit="$?"; }
|
||||
:; exit $exit
|
||||
|
||||
|
Reference in New Issue
Block a user