From: Lars Ingebrigtsen Date: Sat, 25 Jun 2022 10:20:05 +0000 (+0200) Subject: Re-fix build warnings about subr-x defsubsts X-Git-Tag: emacs-29.0.90~1447^2~1473 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2f346b0ab10a8777ff5629af30a224b4f0ea16a6;p=emacs.git Re-fix build warnings about subr-x defsubsts * lisp/term/haiku-win.el (require): * lisp/progmodes/elisp-mode.el (require): * lisp/isearch.el (require): Require subr-x at compile time, since these use defsubsts/macros from there. * lisp/emacs-lisp/subr-x.el (string-empty-p): Move from here... * lisp/simple.el (string-empty-p): ... to here. This is to help with a build problem where files.el is using the defsubst, but requiring subr-x.el at compile time leads to load errors. --- diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index b0de5d155ac..390e505f009 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -97,10 +97,6 @@ threading." (maphash (lambda (_ v) (push v values)) hash-table) values)) -(defsubst string-empty-p (string) - "Check whether STRING is empty." - (string= string "")) - (defsubst string-join (strings &optional separator) "Join all STRINGS using SEPARATOR. Optional argument SEPARATOR must be a string, a vector, or a list of diff --git a/lisp/isearch.el b/lisp/isearch.el index 7650ebcfcea..0624858993d 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -54,6 +54,7 @@ ;;; Code: (eval-when-compile (require 'cl-lib)) +(eval-when-compile (require 'subr-x)) ;; Some additional options and constants. diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 332488e6d41..fc257679340 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -31,6 +31,7 @@ (require 'cl-generic) (require 'lisp-mode) (eval-when-compile (require 'cl-lib)) +(eval-when-compile (require 'subr-x)) (define-abbrev-table 'emacs-lisp-mode-abbrev-table () "Abbrev table for Emacs Lisp mode. diff --git a/lisp/simple.el b/lisp/simple.el index 8f82ff3a8e8..2b11a6362fd 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -10620,6 +10620,10 @@ If the buffer doesn't exist, create it first." (save-buffer))) t))) +(defsubst string-empty-p (string) + "Check whether STRING is empty." + (string= string "")) + (provide 'simple) diff --git a/lisp/term/haiku-win.el b/lisp/term/haiku-win.el index 5443904a733..024459e6475 100644 --- a/lisp/term/haiku-win.el +++ b/lisp/term/haiku-win.el @@ -24,6 +24,7 @@ ;;; Code: (eval-when-compile (require 'cl-lib)) +(eval-when-compile (require 'subr-x)) (unless (featurep 'haiku) (error "%s: Loading haiku-win without having Haiku" invocation-name))