[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a6a4ad13e48: (error): Remove support for old calling convention
From: |
Stefan Kangas |
Subject: |
master a6a4ad13e48: (error): Remove support for old calling convention |
Date: |
Wed, 24 Jul 2024 17:41:50 -0400 (EDT) |
branch: master
commit a6a4ad13e48c656a530bea37d251a2dc55cc47d8
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
(error): Remove support for old calling convention
* lisp/subr.el (error): Remove support for the Emacs 22 calling
convention '(error &rest args)'.
---
etc/NEWS | 3 +++
lisp/subr.el | 8 +++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index d683db606ec..d5cee7b7372 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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
diff --git a/lisp/subr.el b/lisp/subr.el
index 1389f446d35..fc847049332 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -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'.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a6a4ad13e48: (error): Remove support for old calling convention,
Stefan Kangas <=