From 3c433c914456d4bca2eaf5b0a3e71bd20f20a6c5 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sat, 2 Nov 2024 00:27:38 +0800 Subject: [PATCH] elpa2nix: inline string-empty-p to support Emacs 26 Fixes https://github.com/NixOS/nixpkgs/issues/352907 --- pkgs/applications/editors/emacs/build-support/elpa2nix.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)))