emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111829: Make cl-floatp-safe just an


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111829: Make cl-floatp-safe just an alias for floatp
Date: Tue, 19 Feb 2013 21:07:07 -0500
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111829
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2013-02-19 21:07:07 -0500
message:
  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.
modified:
  doc/misc/cl.texi
  lisp/ChangeLog
  lisp/emacs-lisp/cl-lib.el
  lisp/emacs-lisp/cl-macs.el
=== modified file 'doc/misc/cl.texi'
--- a/doc/misc/cl.texi  2013-02-13 04:31:09 +0000
+++ b/doc/misc/cl.texi  2013-02-20 02:07:07 +0000
@@ -703,14 +703,6 @@
 The type symbols @code{character} and @code{string-char} match
 integers in the range from 0 to 255.
 
address@hidden No longer relevant, so covered by first item above (float -> 
floatp).
address@hidden
address@hidden
-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.
address@hidden 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 @@
 error if the argument is not an integer.
 @end defun
 
address@hidden
address@hidden 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}.
address@hidden defun
address@hidden ignore
-
 @node Numerical Functions
 @section Numerical Functions
 

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-02-19 15:17:55 +0000
+++ b/lisp/ChangeLog    2013-02-20 02:07:07 +0000
@@ -1,3 +1,9 @@
+2013-02-20  Glenn Morris  <address@hidden>
+
+       * 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  <address@hidden>
 
        * net/tramp-cache.el (tramp-get-hash-table): New defun.

=== modified file 'lisp/emacs-lisp/cl-lib.el'
--- a/lisp/emacs-lisp/cl-lib.el 2013-01-02 16:13:04 +0000
+++ b/lisp/emacs-lisp/cl-lib.el 2013-02-20 02:07:07 +0000
@@ -271,11 +271,7 @@
 
 ;;; 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."

=== modified file 'lisp/emacs-lisp/cl-macs.el'
--- a/lisp/emacs-lisp/cl-macs.el        2013-01-02 16:13:04 +0000
+++ b/lisp/emacs-lisp/cl-macs.el        2013-02-20 02:07:07 +0000
@@ -2520,7 +2520,7 @@
            ((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 @@
     (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 @@
   (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 @@
 
 ;;; 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))
 
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]