From: Basil L. Contovounesios Date: Wed, 11 Jul 2018 06:08:58 +0000 (-0700) Subject: ; Rearrange definition of zerop in subr.el X-Git-Tag: emacs-27.0.90~4690 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=babe0d4508273c5fe0a3228b3d2b4d3dcb72cd58;p=emacs.git ; Rearrange definition of zerop in subr.el * lisp/subr.el (zerop): Move from under 'List functions' heading to under 'Basic Lisp functions' heading. --- diff --git a/lisp/subr.el b/lisp/subr.el index c1d90e3fb18..10343e69db8 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -359,6 +359,13 @@ was called." (lambda (&rest args2) (apply fun (append args args2)))) +(defun zerop (number) + "Return t if NUMBER is zero." + ;; Used to be in C, but it's pointless since (= 0 n) is faster anyway because + ;; = has a byte-code. + (declare (compiler-macro (lambda (_) `(= 0 ,number)))) + (= 0 number)) + ;;;; List functions. @@ -548,13 +555,6 @@ If N is omitted or nil, remove the last element." (if (> n 0) (setcdr (nthcdr (- (1- m) n) list) nil)) list)))) -(defun zerop (number) - "Return t if NUMBER is zero." - ;; Used to be in C, but it's pointless since (= 0 n) is faster anyway because - ;; = has a byte-code. - (declare (compiler-macro (lambda (_) `(= 0 ,number)))) - (= 0 number)) - (defun proper-list-p (object) "Return OBJECT's length if it is a proper list, nil otherwise. A proper list is neither circular nor dotted (i.e., its last cdr