diff --git a/pkgs/applications/editors/emacs/build-support/elpa2nix.el b/pkgs/applications/editors/emacs/build-support/elpa2nix.el index b0b4ecedc360..97cf2fd58a06 100644 --- a/pkgs/applications/editors/emacs/build-support/elpa2nix.el +++ b/pkgs/applications/editors/emacs/build-support/elpa2nix.el @@ -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)))