やるきなし

2022/08/20 13:22 / Emacs 28.1 Error: Wrong number of arguments: (3 . 4), 2

Debian GNU/Linux unstable (sid) で Emacs が .el の compile に(以下のように)失敗して upgrade 失敗する.

In toplevel form:
ess-r-package.el:560:1: Error: Wrong number of arguments: (3 . 4), 2
Eager macro-expansion failure: (wrong-number-of-arguments (3 . 4) 2)
Eager macro-expansion failure: (wrong-number-of-arguments (3 . 4) 2)

Emacs が 1:27.1+1-3.1 から 1:28.1+1-1 になった際に define-obsolete-function-alias に仕様変更があったのが原因.

emacs-28.1/etc/NEWS:

** The WHEN argument of 'make-obsolete' and related functions is mandatory.
The use of those functions without a WHEN argument was marked obsolete
back in Emacs 23.1.  The affected functions are: 'make-obsolete',
'define-obsolete-function-alias', 'make-obsolete-variable',
'define-obsolete-variable-alias'.

/usr/share/emacs/27.1/lisp/emacs-lisp/byte-run.el.gz:

(defmacro define-obsolete-function-alias (obsolete-name current-name
                           &optional when docstring)

/usr/share/emacs/28.1/lisp/emacs-lisp/byte-run.el.gz:

(defmacro define-obsolete-function-alias ( obsolete-name current-name when
                                           &optional docstring)

手元でこれの影響を受けるのは elpa-ess (Emacs Speaks Statistics (ESS))のみだった様子で,かつ引数 2つだった箇所は1箇所(ess-r-package.el 内にある).ということで,elpa-ess 側に手動でパッチを当てればなんとなかる.以下.

--- /usr/share/emacs/site-lisp/elpa-src/ess-18.10.2/ess-r-package.el.orig       2022-08-20 13:25:40.649872918 +0900
+++ /usr/share/emacs/site-lisp/elpa-src/ess-18.10.2/ess-r-package.el    2022-08-20 13:25:47.654118456 +0900
@@ -557,7 +557,7 @@
   (error "As of ESS 16.04, `ess-developer' is deprecated. Use `ess-r-set-evaluation-env' instead"))
 
 (defalias 'ess-toggle-developer 'ess-developer)
-(define-obsolete-function-alias 'ess-r-devtools-check-package-buildwin 'ess-r-devtools-check-with-winbuilder)
+(define-obsolete-function-alias 'ess-r-devtools-check-package-buildwin 'ess-r-devtools-check-with-winbuilder "")
 (define-obsolete-function-alias 'ess-r-devtools-ask 'ess-r-devtools-execute-command "18.04")
 
 (make-obsolete-variable 'ess-developer "Please use `ess-developer-select-package' and `ess-r-set-evaluation-env' instead." "16.04")

追記(2022/8/20)

ということで Emacs 28.1 になったのだが