diff options
| author | Stefan Monnier | 2010-09-19 11:49:21 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-09-19 11:49:21 +0200 |
| commit | 9e0d4f9ef1cd4d7149c84475df5cef4d408743b6 (patch) | |
| tree | 2723dc7513591123264d50be0b48c19cc6bcc405 | |
| parent | a2930e438b2a70726e6d5b09de8b2a9658505c4e (diff) | |
| download | emacs-9e0d4f9ef1cd4d7149c84475df5cef4d408743b6.tar.gz emacs-9e0d4f9ef1cd4d7149c84475df5cef4d408743b6.zip | |
* lisp/emacs-lisp/float-sup.el (float-pi): New name for `pi'.
(float-e): New name for `e'.
(degrees-to-radians, radians-to-degrees):
* lisp/calendar/solar.el (solar-longitude):
* lisp/calculator.el (calculator-registers, calculator-funcall):
* lisp/textmodes/artist.el (artist-spray-random-points):
* lisp/play/bubbles.el (bubbles--initialize-images): Use new names.
| -rw-r--r-- | etc/NEWS | 2 | ||||
| -rw-r--r-- | lisp/ChangeLog | 16 | ||||
| -rw-r--r-- | lisp/calculator.el | 5 | ||||
| -rw-r--r-- | lisp/calendar/solar.el | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/float-sup.el | 16 | ||||
| -rw-r--r-- | lisp/play/bubbles.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/artist.el | 2 |
7 files changed, 31 insertions, 18 deletions
| @@ -40,6 +40,8 @@ This can be used in place of the default appt-message-warning-time. | |||
| 40 | 40 | ||
| 41 | * Lisp changes in Emacs 23.3 | 41 | * Lisp changes in Emacs 23.3 |
| 42 | 42 | ||
| 43 | ** `e' and `pi' are now called `float-e' and `float-pi'. | ||
| 44 | The old names are obsolete. | ||
| 43 | ** The use of unintern without an obarray arg is declared obsolete. | 45 | ** The use of unintern without an obarray arg is declared obsolete. |
| 44 | 46 | ||
| 45 | ** New function byte-to-string, like char-to-string but for bytes. | 47 | ** New function byte-to-string, like char-to-string but for bytes. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 647ccd42ada..a411d7e9c72 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,9 +1,19 @@ | |||
| 1 | 2010-09-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/float-sup.el (float-pi): New name for `pi'. | ||
| 4 | (float-e): New name for `e'. | ||
| 5 | (degrees-to-radians, radians-to-degrees): | ||
| 6 | * calendar/solar.el (solar-longitude): | ||
| 7 | * calculator.el (calculator-registers, calculator-funcall): | ||
| 8 | * textmodes/artist.el (artist-spray-random-points): | ||
| 9 | * play/bubbles.el (bubbles--initialize-images): Use new names. | ||
| 10 | |||
| 1 | 2010-09-19 Eric M. Ludlam <zappo@gnu.org> | 11 | 2010-09-19 Eric M. Ludlam <zappo@gnu.org> |
| 2 | 12 | ||
| 3 | Update to CEDET 1.0's version of EIEIO. | 13 | Update to CEDET 1.0's version of EIEIO. |
| 4 | 14 | ||
| 5 | * emacs-lisp/eieio.el (eieio-specialized-key-to-generic-key): New | 15 | * emacs-lisp/eieio.el (eieio-specialized-key-to-generic-key): |
| 6 | function. | 16 | New function. |
| 7 | (eieio-defmethod, eieio-generic-form, eieio-generic-call): Use it. | 17 | (eieio-defmethod, eieio-generic-form, eieio-generic-call): Use it. |
| 8 | (eieio-default-eval-maybe): Eval val instead of unquoting only. | 18 | (eieio-default-eval-maybe): Eval val instead of unquoting only. |
| 9 | (class-precedence-list): If class is nil, return nil. | 19 | (class-precedence-list): If class is nil, return nil. |
| @@ -25,7 +35,7 @@ | |||
| 25 | dfs algorithm. | 35 | dfs algorithm. |
| 26 | (eieio-class-precedence-bfs): Compute class precedence list using | 36 | (eieio-class-precedence-bfs): Compute class precedence list using |
| 27 | bfs algorithm. | 37 | bfs algorithm. |
| 28 | (eieio-class-precedence-c3): compute class precedence list using | 38 | (eieio-class-precedence-c3): Compute class precedence list using |
| 29 | c3 algorithm. | 39 | c3 algorithm. |
| 30 | (class-precedence-list): New function. | 40 | (class-precedence-list): New function. |
| 31 | (eieiomt-method-list, eieiomt-sym-optimize): Use it. | 41 | (eieiomt-method-list, eieiomt-sym-optimize): Use it. |
diff --git a/lisp/calculator.el b/lisp/calculator.el index d1b9b517e5f..3d865fba0ef 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el | |||
| @@ -369,7 +369,8 @@ documentation for an example.") | |||
| 369 | Used for repeating operations in calculator-repR/L.") | 369 | Used for repeating operations in calculator-repR/L.") |
| 370 | 370 | ||
| 371 | (defvar calculator-registers ; use user-bindings first | 371 | (defvar calculator-registers ; use user-bindings first |
| 372 | (append calculator-user-registers (list (cons ?e e) (cons ?p pi))) | 372 | (append calculator-user-registers |
| 373 | (list (cons ?e float-e) (cons ?p float-pi))) | ||
| 373 | "The association list of calculator register values.") | 374 | "The association list of calculator register values.") |
| 374 | 375 | ||
| 375 | (defvar calculator-saved-global-map nil | 376 | (defvar calculator-saved-global-map nil |
| @@ -1300,7 +1301,7 @@ arguments." | |||
| 1300 | (calculator-funcall __f__ x y)))) | 1301 | (calculator-funcall __f__ x y)))) |
| 1301 | (fset 'D (function | 1302 | (fset 'D (function |
| 1302 | (lambda (x) | 1303 | (lambda (x) |
| 1303 | (if calculator-deg (/ (* x 180) pi) x)))) | 1304 | (if calculator-deg (/ (* x 180) float-pi) x)))) |
| 1304 | (unwind-protect (eval f) | 1305 | (unwind-protect (eval f) |
| 1305 | (if Fbound (fset 'F Fsave) (fmakunbound 'F)) | 1306 | (if Fbound (fset 'F Fsave) (fmakunbound 'F)) |
| 1306 | (if Dbound (fset 'D Dsave) (fmakunbound 'D))))) | 1307 | (if Dbound (fset 'D Dsave) (fmakunbound 'D))))) |
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index 3d6ab73e778..8116597ad02 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el | |||
| @@ -752,12 +752,12 @@ The values of `calendar-daylight-savings-starts', | |||
| 752 | (sin (mod | 752 | (sin (mod |
| 753 | (+ (cadr x) | 753 | (+ (cadr x) |
| 754 | (* (nth 2 x) U)) | 754 | (* (nth 2 x) U)) |
| 755 | (* 2 pi))))) | 755 | (* 2 float-pi))))) |
| 756 | solar-data-list))))) | 756 | solar-data-list))))) |
| 757 | (aberration | 757 | (aberration |
| 758 | (* 0.0000001 (- (* 17 (cos (+ 3.10 (* 62830.14 U)))) 973))) | 758 | (* 0.0000001 (- (* 17 (cos (+ 3.10 (* 62830.14 U)))) 973))) |
| 759 | (A1 (mod (+ 2.18 (* U (+ -3375.70 (* 0.36 U)))) (* 2 pi))) | 759 | (A1 (mod (+ 2.18 (* U (+ -3375.70 (* 0.36 U)))) (* 2 float-pi))) |
| 760 | (A2 (mod (+ 3.51 (* U (+ 125666.39 (* 0.10 U)))) (* 2 pi))) | 760 | (A2 (mod (+ 3.51 (* U (+ 125666.39 (* 0.10 U)))) (* 2 float-pi))) |
| 761 | (nutation (* -0.0000001 (+ (* 834 (sin A1)) (* 64 (sin A2)))))) | 761 | (nutation (* -0.0000001 (+ (* 834 (sin A1)) (* 64 (sin A2)))))) |
| 762 | (mod (radians-to-degrees (+ longitude aberration nutation)) 360.0))) | 762 | (mod (radians-to-degrees (+ longitude aberration nutation)) 360.0))) |
| 763 | 763 | ||
diff --git a/lisp/emacs-lisp/float-sup.el b/lisp/emacs-lisp/float-sup.el index 6a05bda82ae..f98e452e343 100644 --- a/lisp/emacs-lisp/float-sup.el +++ b/lisp/emacs-lisp/float-sup.el | |||
| @@ -34,25 +34,25 @@ | |||
| 34 | 34 | ||
| 35 | ;; provide an easy hook to tell if we are running with floats or not. | 35 | ;; provide an easy hook to tell if we are running with floats or not. |
| 36 | ;; define pi and e via math-lib calls. (much less prone to killer typos.) | 36 | ;; define pi and e via math-lib calls. (much less prone to killer typos.) |
| 37 | (defconst pi (* 4 (atan 1)) "The value of Pi (3.1415926...).") | 37 | (defconst float-pi (* 4 (atan 1)) "The value of Pi (3.1415926...).") |
| 38 | (defconst pi float-pi "Obsolete since Emacs-23.3. Use `float-pi' instead.") | ||
| 38 | 39 | ||
| 39 | ;; It's too inconvenient to make `e' a constant because it's used as | 40 | (defconst float-e (exp 1) "The value of e (2.7182818...).") |
| 40 | ;; a temporary variable all the time. | 41 | (defvar e float-e "Obsolete since Emacs-23.3. Use `float-e' instead.") |
| 41 | (defvar e (exp 1) "The value of e (2.7182818...).") | ||
| 42 | 42 | ||
| 43 | (defconst degrees-to-radians (/ pi 180.0) | 43 | (defconst degrees-to-radians (/ float-pi 180.0) |
| 44 | "Degrees to radian conversion constant.") | 44 | "Degrees to radian conversion constant.") |
| 45 | (defconst radians-to-degrees (/ 180.0 pi) | 45 | (defconst radians-to-degrees (/ 180.0 float-pi) |
| 46 | "Radian to degree conversion constant.") | 46 | "Radian to degree conversion constant.") |
| 47 | 47 | ||
| 48 | ;; these expand to a single multiply by a float when byte compiled | 48 | ;; these expand to a single multiply by a float when byte compiled |
| 49 | 49 | ||
| 50 | (defmacro degrees-to-radians (x) | 50 | (defmacro degrees-to-radians (x) |
| 51 | "Convert ARG from degrees to radians." | 51 | "Convert ARG from degrees to radians." |
| 52 | (list '* (/ pi 180.0) x)) | 52 | (list '* degrees-to-radians x)) |
| 53 | (defmacro radians-to-degrees (x) | 53 | (defmacro radians-to-degrees (x) |
| 54 | "Convert ARG from radians to degrees." | 54 | "Convert ARG from radians to degrees." |
| 55 | (list '* (/ 180.0 pi) x)) | 55 | (list '* radians-to-degrees x)) |
| 56 | 56 | ||
| 57 | (provide 'lisp-float-type) | 57 | (provide 'lisp-float-type) |
| 58 | 58 | ||
diff --git a/lisp/play/bubbles.el b/lisp/play/bubbles.el index 91968b02bc8..69620aeaca2 100644 --- a/lisp/play/bubbles.el +++ b/lisp/play/bubbles.el | |||
| @@ -1377,7 +1377,7 @@ Return t if new char is non-empty." | |||
| 1377 | (g (nth 1 crgb)) | 1377 | (g (nth 1 crgb)) |
| 1378 | (b (nth 2 crgb)) | 1378 | (b (nth 2 crgb)) |
| 1379 | (brightness (/ (+ r g b) 3.0 256 256)) | 1379 | (brightness (/ (+ r g b) 3.0 256 256)) |
| 1380 | (val (sin (* brightness (/ pi 2)))) | 1380 | (val (sin (* brightness (/ float-pi 2)))) |
| 1381 | (rr (* red val)) | 1381 | (rr (* red val)) |
| 1382 | (gg (* green val)) | 1382 | (gg (* green val)) |
| 1383 | (bb (* blue val)) | 1383 | (bb (* blue val)) |
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 41145afb766..bca7eed00d2 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el | |||
| @@ -2939,7 +2939,7 @@ Blanks in the rendered text overwrite any text in the buffer." | |||
| 2939 | Returns a list of points. Each point is on the form (X1 . Y1)." | 2939 | Returns a list of points. Each point is on the form (X1 . Y1)." |
| 2940 | (let ((points)) | 2940 | (let ((points)) |
| 2941 | (while (> n 0) | 2941 | (while (> n 0) |
| 2942 | (let* ((angle (* (random 359) (/ pi 180))) | 2942 | (let* ((angle (* (random 359) (/ float-pi 180))) |
| 2943 | (dist (random radius)) | 2943 | (dist (random radius)) |
| 2944 | (point (cons (round (* dist (cos angle))) | 2944 | (point (cons (round (* dist (cos angle))) |
| 2945 | (round (* dist (sin angle)))))) | 2945 | (round (* dist (sin angle)))))) |