Commit 1dfcc79e authored by Glenn Morris's avatar Glenn Morris
Browse files

Make cl-floatp-safe just an alias for floatp

* lisp/emacs-lisp/cl-lib.el (cl-floatp-safe): Make it an alias for floatp.

* lisp/emacs-lisp/cl-macs.el (cl--make-type-test)
(cl--compiler-macro-assoc): Use floatp rather than cl-floatp-safe.

* doc/misc/cl.texi: Remove commented out sections about cl-floatp-safe.
parent 81ed22e4
......@@ -703,14 +703,6 @@ The type symbol @code{real} is a synonym for @code{number}, and
The type symbols @code{character} and @code{string-char} match
integers in the range from 0 to 255.
@c No longer relevant, so covered by first item above (float -> floatp).
@ignore
@item
The type symbol @code{float} uses the @code{cl-floatp-safe} predicate
defined by this package rather than @code{floatp}, so it will work
correctly even in Emacs versions without floating-point support.
@end ignore
@item
The type list @code{(integer @var{low} @var{high})} represents all
integers between @var{low} and @var{high}, inclusive. Either bound
......@@ -2921,14 +2913,6 @@ This predicate tests whether @var{integer} is even. It is an
error if the argument is not an integer.
@end defun
@ignore
@defun cl-floatp-safe object
This predicate tests whether @var{object} is a floating-point
number. On systems that support floating-point, this is equivalent
to @code{floatp}. On other systems, this always returns @code{nil}.
@end defun
@end ignore
@node Numerical Functions
@section Numerical Functions
......
2013-02-20 Glenn Morris <rgm@gnu.org>
* emacs-lisp/cl-lib.el (cl-floatp-safe): Make it an alias for floatp.
* emacs-lisp/cl-macs.el (cl--make-type-test)
(cl--compiler-macro-assoc): Use floatp rather than cl-floatp-safe.
2013-02-19 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-cache.el (tramp-get-hash-table): New defun.
......
......@@ -271,11 +271,7 @@ so that they are registered at compile-time as well as run-time."
;;; Numbers.
(defun cl-floatp-safe (object)
"Return t if OBJECT is a floating point number.
On Emacs versions that lack floating-point support, this function
always returns nil."
(and (numberp object) (not (integerp object))))
(define-obsolete-function-alias 'cl-floatp-safe 'floatp "24.4")
(defsubst cl-plusp (number)
"Return t if NUMBER is positive."
......
......@@ -2520,7 +2520,7 @@ The type name can then be used in `cl-typecase', `cl-check-type', etc."
((memq type '(nil t)) type)
((eq type 'null) `(null ,val))
((eq type 'atom) `(atom ,val))
((eq type 'float) `(cl-floatp-safe ,val))
((eq type 'float) `(floatp ,val))
((eq type 'real) `(numberp ,val))
((eq type 'fixnum) `(integerp ,val))
;; FIXME: Should `character' accept things like ?\C-\M-a ? --Stef
......@@ -2739,7 +2739,7 @@ surrounded by (cl-block NAME ...).
(cond ((eq test 'eq) `(assq ,a ,list))
((eq test 'equal) `(assoc ,a ,list))
((and (macroexp-const-p a) (or (null keys) (eq test 'eql)))
(if (cl-floatp-safe (cl--const-expr-val a))
(if (floatp (cl--const-expr-val a))
`(assoc ,a ,list) `(assq ,a ,list)))
(t form))))
......@@ -2776,7 +2776,7 @@ surrounded by (cl-block NAME ...).
(put y 'side-effect-free t))
;;; Things that are inline.
(cl-proclaim '(inline cl-floatp-safe cl-acons cl-map cl-concatenate cl-notany
(cl-proclaim '(inline cl-acons cl-map cl-concatenate cl-notany
cl-notevery cl--set-elt cl-revappend cl-nreconc gethash))
;;; Things that are side-effect-free.
......@@ -2787,7 +2787,7 @@ surrounded by (cl-block NAME ...).
;;; Things that are side-effect-and-error-free.
(mapc (lambda (x) (put x 'side-effect-free 'error-free))
'(eql cl-floatp-safe cl-list* cl-subst cl-acons cl-equalp
'(eql cl-list* cl-subst cl-acons cl-equalp
cl-random-state-p copy-tree cl-sublis))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment