(error): Remove support for old calling convention

* lisp/subr.el (error): Remove support for the Emacs 22 calling
convention '(error &rest args)'.
This commit is contained in:
Stefan Kangas 2024-07-24 23:41:39 +02:00
parent baf9f1210a
commit a6a4ad13e4
2 changed files with 6 additions and 5 deletions

View file

@ -155,6 +155,9 @@ positives.
* Incompatible Lisp Changes in Emacs 31.1
** The obsolete calling convention of 'error' has been removed.
That convention was: '(error &rest ARGS)'.
* Lisp Changes in Emacs 31.1

View file

@ -463,8 +463,7 @@ Also see `ignore'."
(declare (pure t) (side-effect-free error-free))
t)
;; Signal a compile-error if the first arg is missing.
(defun error (&rest args)
(defun error (string &rest args)
"Signal an error, making a message by passing ARGS to `format-message'.
Errors cause entry to the debugger when `debug-on-error' is non-nil.
This can be overridden by `debug-ignored-errors'.
@ -481,9 +480,8 @@ for the sake of consistency.
To alter the look of the displayed error messages, you can use
the `command-error-function' variable."
(declare (ftype (function (&rest t) nil))
(advertised-calling-convention (string &rest args) "23.1"))
(signal 'error (list (apply #'format-message args))))
(declare (ftype (function (string &rest t) nil)))
(signal 'error (list (apply #'format-message string args))))
(defun user-error (format &rest args)
"Signal a user error, making a message by passing ARGS to `format-message'.