diff options
Diffstat (limited to 'lisp/emacs-lisp/cl-lib.el')
-rw-r--r-- | lisp/emacs-lisp/cl-lib.el | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 226e9607b40..2de8260c941 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el @@ -93,8 +93,8 @@ (require 'macroexp) -(defvar cl-optimize-speed 1) -(defvar cl-optimize-safety 1) +(defvar cl--optimize-speed 1) +(defvar cl--optimize-safety 1) ;;;###autoload (define-obsolete-variable-alias @@ -242,33 +242,31 @@ one value. (equal (buffer-name (symbol-value 'byte-compile--outbuffer)) " *Compiler Output*")))) -(defvar cl-proclaims-deferred nil) +(defvar cl--proclaims-deferred nil) (defun cl-proclaim (spec) "Record a global declaration specified by SPEC." - (if (fboundp 'cl-do-proclaim) (cl-do-proclaim spec t) - (push spec cl-proclaims-deferred)) + (if (fboundp 'cl--do-proclaim) (cl--do-proclaim spec t) + (push spec cl--proclaims-deferred)) nil) (defmacro cl-declaim (&rest specs) "Like `cl-proclaim', but takes any number of unevaluated, unquoted arguments. Puts `(cl-eval-when (compile load eval) ...)' around the declarations so that they are registered at compile-time as well as run-time." - (let ((body (mapcar (function (lambda (x) - (list 'cl-proclaim (list 'quote x)))) - specs))) - (if (cl--compiling-file) (cl-list* 'cl-eval-when '(compile load eval) body) - (cons 'progn body)))) ; avoid loading cl-macs.el for cl-eval-when + (let ((body (mapcar (lambda (x) `(cl-proclaim ',x)) specs))) + (if (cl--compiling-file) `(cl-eval-when (compile load eval) ,@body) + `(progn ,@body)))) ; Avoid loading cl-macs.el for cl-eval-when. ;;; Symbols. -(defun cl-random-time () +(defun cl--random-time () (let* ((time (copy-sequence (current-time-string))) (i (length time)) (v 0)) (while (>= (cl-decf i) 0) (setq v (+ (* v 3) (aref time i)))) v)) -(defvar cl--gensym-counter (* (logand (cl-random-time) 1023) 100)) +(defvar cl--gensym-counter (* (logand (cl--random-time) 1023) 100)) ;;; Numbers. @@ -295,7 +293,8 @@ always returns nil." "Return t if INTEGER is even." (eq (logand integer 1) 0)) -(defvar cl--random-state (vector 'cl-random-state-tag -1 30 (cl-random-time))) +(defvar cl--random-state + (vector 'cl--random-state-tag -1 30 (cl--random-time))) (defconst cl-most-positive-float nil "The largest value that a Lisp float can hold. |