Skip to content

Commit 05b4224

Browse files
authored
bin/editorconfig-el: Fix test failure with snapshot (#384)
The tests don't like the "missing lexical-binding" warnings we get from Emacs-31. It's actually difficult to fix those warnings because the `lexical-binding` cookie has to be on the first line or on the second line but only if that second line starts with ";", and I don't know of a way to satisfy those constraints are still have a runnable shell script. There are various possible workarounds, such as cutting the first few lines before we pass the content of `$0` to Emacs, but it seemed simpler to just stamp out the function that emits the warning.
1 parent 4af1044 commit 05b4224

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/editorconfig-el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
2-
:;#-*-Emacs-Lisp-*-
2+
:;#-*- mode: emacs-lisp; lexical-binding:t -*-
33
:;test -n "$EMACS_BIN" || EMACS_BIN=emacs
4-
:;exec "$EMACS_BIN" -batch -Q --eval '(setq debug-on-error t)' -l "$0" -- "$@"
4+
:;exec "$EMACS_BIN" -batch -Q --eval '(setq debug-on-error t internal--get-default-lexical-binding-function `always)' -l "$0" -- "$@"
55

66
;; editorconfig-el --- EditorConfig Core executable in Emacs Lisp
77

0 commit comments

Comments
 (0)