From e2d9a218f4bd2a9e53422123280ca428c03abbc4 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 4 Aug 2022 10:54:22 +0200 Subject: [PATCH] Make trivial convenience defsubst notzerop obsolete * lisp/leim/quail/hangul.el (notzerop): Make obsolete. Adjust callers. --- lisp/leim/quail/hangul.el | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/lisp/leim/quail/hangul.el b/lisp/leim/quail/hangul.el index 0ef5b2d5c72..ef44e04a233 100644 --- a/lisp/leim/quail/hangul.el +++ b/lisp/leim/quail/hangul.el @@ -103,6 +103,7 @@ (make-vector 6 0)) (defsubst notzerop (number) + (declare (obsolete "use `(not (zerop ...))'." "29.1")) (not (zerop number))) (defsubst alphabetp (char) @@ -191,10 +192,10 @@ and insert CHAR to new `hangul-queue'." (aset hangul-queue 0 char)) ((and (zerop (aref hangul-queue 1)) (zerop (aref hangul-queue 2)) - (notzerop (hangul-djamo 'cho (aref hangul-queue 0) char))) + (not (zerop (hangul-djamo 'cho (aref hangul-queue 0) char)))) (aset hangul-queue 1 char)) ((and (zerop (aref hangul-queue 4)) - (notzerop (aref hangul-queue 2)) + (not (zerop (aref hangul-queue 2))) (/= char 8) (/= char 19) (/= char 25) @@ -213,7 +214,7 @@ and insert CHAR to new `hangul-queue'." char))) (aset hangul-queue 4 char)) ((and (zerop (aref hangul-queue 5)) - (notzerop (hangul-djamo 'jong (aref hangul-queue 4) char)) + (not (zerop (hangul-djamo 'jong (aref hangul-queue 4) char))) (numberp (hangul-character (+ (aref hangul-queue 0) @@ -246,14 +247,14 @@ Other parts are the same as a `hangul2-input-method-jaum'." (aset hangul-queue 2 char)) ((and (zerop (aref hangul-queue 3)) (zerop (aref hangul-queue 4)) - (notzerop (hangul-djamo 'jung (aref hangul-queue 2) char))) + (not (zerop (hangul-djamo 'jung (aref hangul-queue 2) char)))) (aset hangul-queue 3 char))) (hangul-insert-character hangul-queue) (let ((next-char (vector 0 0 char 0 0 0))) - (cond ((notzerop (aref hangul-queue 5)) + (cond ((not (zerop (aref hangul-queue 5))) (aset next-char 0 (aref hangul-queue 5)) (aset hangul-queue 5 0)) - ((notzerop (aref hangul-queue 4)) + ((not (zerop (aref hangul-queue 4))) (aset next-char 0 (aref hangul-queue 4)) (aset hangul-queue 4 0))) (hangul-insert-character hangul-queue @@ -271,7 +272,7 @@ Other parts are the same as a `hangul2-input-method-jaum'." (aset hangul-queue 0 char)) ((and (zerop (aref hangul-queue 1)) (zerop (aref hangul-queue 2)) - (notzerop (hangul-djamo 'cho (aref hangul-queue 0) char))) + (not (zerop (hangul-djamo 'cho (aref hangul-queue 0) char)))) (aset hangul-queue 1 char))) (hangul-insert-character hangul-queue) (hangul-insert-character hangul-queue @@ -287,7 +288,7 @@ Other parts are the same as a `hangul3-input-method-cho'." (zerop (aref hangul-queue 4))) (aset hangul-queue 2 char)) ((and (zerop (aref hangul-queue 3)) - (notzerop (hangul-djamo 'jung (aref hangul-queue 2) char))) + (not (zerop (hangul-djamo 'jung (aref hangul-queue 2) char)))) (aset hangul-queue 3 char))) (hangul-insert-character hangul-queue) (hangul-insert-character hangul-queue @@ -300,8 +301,8 @@ This function processes a Hangul 3-Bulsik Jongseong. The Jongseong can be located in a Jongseong position. Other parts are the same as a `hangul3-input-method-cho'." (if (cond ((and (zerop (aref hangul-queue 4)) - (notzerop (aref hangul-queue 0)) - (notzerop (aref hangul-queue 2)) + (not (zerop (aref hangul-queue 0))) + (not (zerop (aref hangul-queue 2))) (numberp (hangul-character (+ (aref hangul-queue 0) @@ -317,7 +318,7 @@ Other parts are the same as a `hangul3-input-method-cho'." char))) (aset hangul-queue 4 char)) ((and (zerop (aref hangul-queue 5)) - (notzerop (hangul-djamo 'jong (aref hangul-queue 4) char)) + (not (zerop (hangul-djamo 'jong (aref hangul-queue 4) char))) (numberp (hangul-character (+ (aref hangul-queue 0) @@ -349,7 +350,7 @@ Other parts are the same as a `hangul3-input-method-cho'." (while (and (> i 0) (zerop (aref hangul-queue i))) (setq i (1- i))) (aset hangul-queue i 0)) - (if (notzerop (apply #'+ (append hangul-queue nil))) + (if (not (zerop (apply #'+ (append hangul-queue nil)))) (hangul-insert-character hangul-queue) (delete-char -1))) -- 2.39.2