elpa2nix: inline string-empty-p to support Emacs 26

Fixes https://github.com/NixOS/nixpkgs/issues/352907
This commit is contained in:
Lin Jian 2024-11-02 00:27:38 +08:00
parent f2b00cb5ef
commit 3c433c9144
No known key found for this signature in database
GPG Key ID: A6698D36434F75A5

View File

@ -34,9 +34,10 @@ The file can either be a tar file or an Emacs Lisp file."
(let ((flag (getenv "turnCompilationWarningToError")))
(when (and flag
(not (string-empty-p flag)))
;; we do not use `string-empty-p' because it requires subr-x in Emacs <= 26
(not (string= flag "")))
(setq byte-compile-error-on-warn t)))
(let ((flag (getenv "ignoreCompilationError")))
(when (string-empty-p flag)
(when (string= flag "")
(setq byte-compile-debug t)))