Skip to content

Commit

Permalink
Rename 'LANG' variable in script/compile to avoid bug.
Browse files Browse the repository at this point in the history
If 'LANG' is set to 'pascal' in script/compile, when `emacs -Q ...` is launcher
emacs will exit with the following error:

    Language environment not defined: "Punjabi"

This is because 'LANG' is a locale setting variable so 'pascal' is interpreted
as 'pa' which is code for the Punjabi locale.
  • Loading branch information
0x6d6e647a authored and jcs090218 committed Dec 2, 2023
1 parent 5eb2455 commit cb805e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions script/compile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set -euo pipefail
here=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
PROJECT_ROOT=$(cd "$here/.."; pwd)

LANG=$1
PROGLANG=$1

# Parse named parameters.
POSITIONAL=()
Expand All @@ -39,15 +39,15 @@ if [ "$target" == "'" ]; then
target=nil
fi

case $LANG in
case $PROGLANG in
(all)
code="(tree-sitter-langs-create-bundle nil $target)"
;;
(changed)
code="(tree-sitter-langs-compile-changed-or-all \"${POSITIONAL[1]:-origin/master}\" $target)"
;;
(*)
code="(tree-sitter-langs-compile '$LANG nil $target)"
code="(tree-sitter-langs-compile '$PROGLANG nil ${target})"
esac

(
Expand Down

0 comments on commit cb805e0

Please sign in to comment.