From a5d142e8301c3dfb193e89eda9caf50ee2a92d28 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 6 May 2023 20:42:22 +0800 Subject: [PATCH 1/4] Fix portability problem in toplevel Makefile * Makefile.in (sanity-check, preferred-branch-is-current): Avoid POSIX command substitution, to make Makefile work with the SVR4 shell. --- Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 0b7c9680fe5..729cd4140e5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -417,9 +417,9 @@ advice-on-failure: sanity-check: @[ -f .no-advice-on-failure ] && exit 0; true - @v=$$(src/emacs${EXEEXT} --batch --eval \ + @v=`src/emacs${EXEEXT} --batch --eval \ '(progn (defun f (n) (if (= 0 n) 1 (* n (f (- n 1))))) (princ (f 10)))' \ - 2> /dev/null); \ + 2> /dev/null`; \ [ "X$$v" = "X3628800" ] && exit 0; \ echo >&2 '***'; \ echo >&2 '*** '"\"make ${make-target}\" succeeded, but Emacs is not functional."; \ @@ -1287,7 +1287,7 @@ PREFERRED_BRANCH = emacs-28 preferred-branch-is-current: git branch | grep -q '^\* $(PREFERRED_BRANCH)$$' unchanged-history-files: - x=$$(git diff-files --name-only $(CHANGELOG_N) $(emacslog)) && \ + x=`git diff-files --name-only $(CHANGELOG_N) $(emacslog)` && \ test -z "$$x" # Regular expression that matches the newest commit covered by a ChangeLog. From 31a66dc8918e81470dc35be7c489108fbbfbce01 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 6 May 2023 20:43:22 +0800 Subject: [PATCH 2/4] Fix portability problem in lisp/Makefile.in * lisp/Makefile.in (check-defun-dups): Avoid POSIX command substitutions. --- lisp/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/Makefile.in b/lisp/Makefile.in index c90237615c6..fbe502cec6d 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -490,8 +490,8 @@ check-declare: ## This finds a lot of duplicates between foo.el and obsolete/foo.el. check-defun-dups: sed -n -e '/^(defun /s/\(.\)(.*/\1/p' \ - $$(find . -name '*.el' ! -name '.*' -print | \ - grep -Ev '(loaddefs|ldefs-boot)\.el|obsolete') | sort | uniq -d + `find . -name '*.el' ! -name '.*' -print | \ + grep -Ev '(loaddefs|ldefs-boot)\.el|obsolete'` | sort | uniq -d # Dependencies From ab5258b19255ebff04df01d6f55888f43c42dcb9 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 6 May 2023 22:17:19 +0200 Subject: [PATCH 3/4] Simplify check for non-empty list * lisp/gnus/nntp.el (nntp-with-open-group): Simplify check for non-empty list. --- lisp/gnus/nntp.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 20c176f2269..a57fd200599 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -643,8 +643,7 @@ connection timeouts (which may be several minutes) or `nntp-with-open-group', opens a new connection then re-issues the NNTP command whose response triggered the error." (declare (indent 2) (debug (form form [&optional symbolp] def-body))) - (when (and (listp connectionless) - (not (eq connectionless nil))) + (when (consp connectionless)) (setq forms (cons connectionless forms) connectionless nil)) `(nntp-with-open-group-function ,group ,server ,connectionless From d5ab8b6f2459b0c0111edc1ac7da20e1452c1f33 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 6 May 2023 22:27:55 +0200 Subject: [PATCH 4/4] ; Fix last change --- lisp/gnus/nntp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index a57fd200599..a36bce2dbfa 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -643,7 +643,7 @@ connection timeouts (which may be several minutes) or `nntp-with-open-group', opens a new connection then re-issues the NNTP command whose response triggered the error." (declare (indent 2) (debug (form form [&optional symbolp] def-body))) - (when (consp connectionless)) + (when (consp connectionless) (setq forms (cons connectionless forms) connectionless nil)) `(nntp-with-open-group-function ,group ,server ,connectionless