[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/xpm 9f3fd68 23/37: [xpm int] Use ‘cl-assert’, not ‘ass

From: Stefan Monnier
Subject: [elpa] externals/xpm 9f3fd68 23/37: [xpm int] Use ‘cl-assert’, not ‘assert’; drop ‘cl’ requirement.
Date: Sat, 28 Nov 2020 14:15:34 -0500 (EST)

branch: externals/xpm
commit 9f3fd683622a734999c8ef1075547be2a52b8c43
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>

    [xpm int] Use ‘cl-assert’, not ‘assert’; drop ‘cl’ requirement.
    * packages/xpm/xpm-m2z.el: No longer require ‘cl’.
    (xpm-m2z-ellipse): Combine center coord components
    ‘integerp’ check; use ‘cl-assert’ instead of ‘assert’.
 xpm-m2z.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/xpm-m2z.el b/xpm-m2z.el
index 39b45d2..d8a5e9c 100644
--- a/xpm-m2z.el
+++ b/xpm-m2z.el
@@ -34,7 +34,6 @@
 (require 'artist)
 (require 'cl-lib)
-(eval-when-compile (require 'cl))
 (defun xpm-m2z-ellipse (cx cy rx ry)
@@ -55,8 +54,10 @@ RX and RY, respectively.  For example:
 The span is always an even number.  As a special case,
 if RX or RY is less than 1, the value is nil."
-  (assert (not (integerp cx)))
-  (assert (not (integerp cy)))
+  (cl-assert (and (not (integerp cx))
+                  (not (integerp cy)))
+             nil "Integer component in center coordinate: (%S,%S)"
+             cx cy)
   (unless (or (> 1 (abs rx))
               (> 1 (abs ry)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]