Make trivial convenience defsubst notzerop obsolete

* lisp/leim/quail/hangul.el (notzerop): Make obsolete.  Adjust
callers.
This commit is contained in:
Stefan Kangas 2022-08-04 10:54:22 +02:00
parent f39a220c95
commit e2d9a218f4

View file

@ -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)))