aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBasil L. Contovounesios2018-07-10 23:08:58 -0700
committerPaul Eggert2018-07-10 23:08:58 -0700
commitbabe0d4508273c5fe0a3228b3d2b4d3dcb72cd58 (patch)
tree333043b33dfeb8c810aebedee9a23f3d8b931b2c
parentf8b1e40fb63b0a6bc6692cc0bc84e5f5e65c2644 (diff)
downloademacs-babe0d4508273c5fe0a3228b3d2b4d3dcb72cd58.tar.gz
emacs-babe0d4508273c5fe0a3228b3d2b4d3dcb72cd58.zip
; Rearrange definition of zerop in subr.el
* lisp/subr.el (zerop): Move from under 'List functions' heading to under 'Basic Lisp functions' heading.
-rw-r--r--lisp/subr.el14
1 files changed, 7 insertions, 7 deletions
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."
359 (lambda (&rest args2) 359 (lambda (&rest args2)
360 (apply fun (append args args2)))) 360 (apply fun (append args args2))))
361 361
362(defun zerop (number)
363 "Return t if NUMBER is zero."
364 ;; Used to be in C, but it's pointless since (= 0 n) is faster anyway because
365 ;; = has a byte-code.
366 (declare (compiler-macro (lambda (_) `(= 0 ,number))))
367 (= 0 number))
368
362 369
363;;;; List functions. 370;;;; List functions.
364 371
@@ -548,13 +555,6 @@ If N is omitted or nil, remove the last element."
548 (if (> n 0) (setcdr (nthcdr (- (1- m) n) list) nil)) 555 (if (> n 0) (setcdr (nthcdr (- (1- m) n) list) nil))
549 list)))) 556 list))))
550 557
551(defun zerop (number)
552 "Return t if NUMBER is zero."
553 ;; Used to be in C, but it's pointless since (= 0 n) is faster anyway because
554 ;; = has a byte-code.
555 (declare (compiler-macro (lambda (_) `(= 0 ,number))))
556 (= 0 number))
557
558(defun proper-list-p (object) 558(defun proper-list-p (object)
559 "Return OBJECT's length if it is a proper list, nil otherwise. 559 "Return OBJECT's length if it is a proper list, nil otherwise.
560A proper list is neither circular nor dotted (i.e., its last cdr 560A proper list is neither circular nor dotted (i.e., its last cdr