comparison lisp/calculator.el @ 110533:b799d38f522a

Merge changes from emacs-23 branch
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 23 Sep 2010 15:00:31 -0400
parents 904ccd8f2acb e950143ab9e0
children 6e613fbf73d7
comparison
equal deleted inserted replaced
110506:2cac83f5f8bc 110533:b799d38f522a
367 (defvar calculator-last-opXY nil 367 (defvar calculator-last-opXY nil
368 "The last binary operation and its arguments. 368 "The last binary operation and its arguments.
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
376 "Saved global key map.") 377 "Saved global key map.")
377 378
1298 (fset 'F (function 1299 (fset 'F (function
1299 (lambda (&optional x y) 1300 (lambda (&optional x y)
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)))))
1307 (error 0))) 1308 (error 0)))
1308 1309