diff options
| author | Glenn Morris | 2013-02-19 21:07:07 -0500 |
|---|---|---|
| committer | Glenn Morris | 2013-02-19 21:07:07 -0500 |
| commit | 1dfcc79e83d3db031b45e9f6b9314dc1f0697b1d (patch) | |
| tree | a2b4c595e8c665d19759bcc0f5a0a8dfa0439f7f | |
| parent | 81ed22e4cad625e297314bc609d146e7e62695db (diff) | |
| download | emacs-1dfcc79e83d3db031b45e9f6b9314dc1f0697b1d.tar.gz emacs-1dfcc79e83d3db031b45e9f6b9314dc1f0697b1d.zip | |
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.
| -rw-r--r-- | doc/misc/cl.texi | 16 | ||||
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-lib.el | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 8 |
4 files changed, 11 insertions, 25 deletions
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index 11f19c8df06..83df411cb23 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi | |||
| @@ -703,14 +703,6 @@ The type symbol @code{real} is a synonym for @code{number}, and | |||
| 703 | The type symbols @code{character} and @code{string-char} match | 703 | The type symbols @code{character} and @code{string-char} match |
| 704 | integers in the range from 0 to 255. | 704 | integers in the range from 0 to 255. |
| 705 | 705 | ||
| 706 | @c No longer relevant, so covered by first item above (float -> floatp). | ||
| 707 | @ignore | ||
| 708 | @item | ||
| 709 | The type symbol @code{float} uses the @code{cl-floatp-safe} predicate | ||
| 710 | defined by this package rather than @code{floatp}, so it will work | ||
| 711 | correctly even in Emacs versions without floating-point support. | ||
| 712 | @end ignore | ||
| 713 | |||
| 714 | @item | 706 | @item |
| 715 | The type list @code{(integer @var{low} @var{high})} represents all | 707 | The type list @code{(integer @var{low} @var{high})} represents all |
| 716 | integers between @var{low} and @var{high}, inclusive. Either bound | 708 | 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 | |||
| 2921 | error if the argument is not an integer. | 2913 | error if the argument is not an integer. |
| 2922 | @end defun | 2914 | @end defun |
| 2923 | 2915 | ||
| 2924 | @ignore | ||
| 2925 | @defun cl-floatp-safe object | ||
| 2926 | This predicate tests whether @var{object} is a floating-point | ||
| 2927 | number. On systems that support floating-point, this is equivalent | ||
| 2928 | to @code{floatp}. On other systems, this always returns @code{nil}. | ||
| 2929 | @end defun | ||
| 2930 | @end ignore | ||
| 2931 | |||
| 2932 | @node Numerical Functions | 2916 | @node Numerical Functions |
| 2933 | @section Numerical Functions | 2917 | @section Numerical Functions |
| 2934 | 2918 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c1e75fcdca8..081583258b0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-02-20 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * emacs-lisp/cl-lib.el (cl-floatp-safe): Make it an alias for floatp. | ||
| 4 | * emacs-lisp/cl-macs.el (cl--make-type-test) | ||
| 5 | (cl--compiler-macro-assoc): Use floatp rather than cl-floatp-safe. | ||
| 6 | |||
| 1 | 2013-02-19 Michael Albinus <michael.albinus@gmx.de> | 7 | 2013-02-19 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 8 | ||
| 3 | * net/tramp-cache.el (tramp-get-hash-table): New defun. | 9 | * net/tramp-cache.el (tramp-get-hash-table): New defun. |
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 2de8260c941..f3bf70b0190 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el | |||
| @@ -271,11 +271,7 @@ so that they are registered at compile-time as well as run-time." | |||
| 271 | 271 | ||
| 272 | ;;; Numbers. | 272 | ;;; Numbers. |
| 273 | 273 | ||
| 274 | (defun cl-floatp-safe (object) | 274 | (define-obsolete-function-alias 'cl-floatp-safe 'floatp "24.4") |
| 275 | "Return t if OBJECT is a floating point number. | ||
| 276 | On Emacs versions that lack floating-point support, this function | ||
| 277 | always returns nil." | ||
| 278 | (and (numberp object) (not (integerp object)))) | ||
| 279 | 275 | ||
| 280 | (defsubst cl-plusp (number) | 276 | (defsubst cl-plusp (number) |
| 281 | "Return t if NUMBER is positive." | 277 | "Return t if NUMBER is positive." |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index b63086d7a5f..e9cc200baaa 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -2520,7 +2520,7 @@ The type name can then be used in `cl-typecase', `cl-check-type', etc." | |||
| 2520 | ((memq type '(nil t)) type) | 2520 | ((memq type '(nil t)) type) |
| 2521 | ((eq type 'null) `(null ,val)) | 2521 | ((eq type 'null) `(null ,val)) |
| 2522 | ((eq type 'atom) `(atom ,val)) | 2522 | ((eq type 'atom) `(atom ,val)) |
| 2523 | ((eq type 'float) `(cl-floatp-safe ,val)) | 2523 | ((eq type 'float) `(floatp ,val)) |
| 2524 | ((eq type 'real) `(numberp ,val)) | 2524 | ((eq type 'real) `(numberp ,val)) |
| 2525 | ((eq type 'fixnum) `(integerp ,val)) | 2525 | ((eq type 'fixnum) `(integerp ,val)) |
| 2526 | ;; FIXME: Should `character' accept things like ?\C-\M-a ? --Stef | 2526 | ;; FIXME: Should `character' accept things like ?\C-\M-a ? --Stef |
| @@ -2739,7 +2739,7 @@ surrounded by (cl-block NAME ...). | |||
| 2739 | (cond ((eq test 'eq) `(assq ,a ,list)) | 2739 | (cond ((eq test 'eq) `(assq ,a ,list)) |
| 2740 | ((eq test 'equal) `(assoc ,a ,list)) | 2740 | ((eq test 'equal) `(assoc ,a ,list)) |
| 2741 | ((and (macroexp-const-p a) (or (null keys) (eq test 'eql))) | 2741 | ((and (macroexp-const-p a) (or (null keys) (eq test 'eql))) |
| 2742 | (if (cl-floatp-safe (cl--const-expr-val a)) | 2742 | (if (floatp (cl--const-expr-val a)) |
| 2743 | `(assoc ,a ,list) `(assq ,a ,list))) | 2743 | `(assoc ,a ,list) `(assq ,a ,list))) |
| 2744 | (t form)))) | 2744 | (t form)))) |
| 2745 | 2745 | ||
| @@ -2776,7 +2776,7 @@ surrounded by (cl-block NAME ...). | |||
| 2776 | (put y 'side-effect-free t)) | 2776 | (put y 'side-effect-free t)) |
| 2777 | 2777 | ||
| 2778 | ;;; Things that are inline. | 2778 | ;;; Things that are inline. |
| 2779 | (cl-proclaim '(inline cl-floatp-safe cl-acons cl-map cl-concatenate cl-notany | 2779 | (cl-proclaim '(inline cl-acons cl-map cl-concatenate cl-notany |
| 2780 | cl-notevery cl--set-elt cl-revappend cl-nreconc gethash)) | 2780 | cl-notevery cl--set-elt cl-revappend cl-nreconc gethash)) |
| 2781 | 2781 | ||
| 2782 | ;;; Things that are side-effect-free. | 2782 | ;;; Things that are side-effect-free. |
| @@ -2787,7 +2787,7 @@ surrounded by (cl-block NAME ...). | |||
| 2787 | 2787 | ||
| 2788 | ;;; Things that are side-effect-and-error-free. | 2788 | ;;; Things that are side-effect-and-error-free. |
| 2789 | (mapc (lambda (x) (put x 'side-effect-free 'error-free)) | 2789 | (mapc (lambda (x) (put x 'side-effect-free 'error-free)) |
| 2790 | '(eql cl-floatp-safe cl-list* cl-subst cl-acons cl-equalp | 2790 | '(eql cl-list* cl-subst cl-acons cl-equalp |
| 2791 | cl-random-state-p copy-tree cl-sublis)) | 2791 | cl-random-state-p copy-tree cl-sublis)) |
| 2792 | 2792 | ||
| 2793 | 2793 | ||