branch: elpa/editorconfig
commit 05b42243ee09cf7ad62deeab17e91cbbf0d2adca
Author: monnier <[email protected]>
Commit: GitHub <[email protected]>

    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.
---
 bin/editorconfig-el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/editorconfig-el b/bin/editorconfig-el
index 781cba80830..d6bde585af6 100755
--- a/bin/editorconfig-el
+++ b/bin/editorconfig-el
@@ -1,7 +1,7 @@
 #!/bin/sh
-:;#-*-Emacs-Lisp-*-
+:;#-*- mode: emacs-lisp; lexical-binding:t -*-
 :;test -n "$EMACS_BIN" || EMACS_BIN=emacs
-:;exec "$EMACS_BIN" -batch -Q --eval '(setq debug-on-error t)' -l "$0" -- "$@"
+:;exec "$EMACS_BIN" -batch -Q --eval '(setq debug-on-error t 
internal--get-default-lexical-binding-function `always)' -l "$0" -- "$@"
 
 ;; editorconfig-el --- EditorConfig Core executable in Emacs Lisp
 

Reply via email to