comparison lisp/calc/calc-prog.el @ 58614:eba1cd703531

(calc-user-define-formula, calc-do-defmath): Replace calc-need-macros by appropriate require.
author Jay Belanger <jay.p.belanger@gmail.com>
date Mon, 29 Nov 2004 05:58:45 +0000
parents 2c8f55b9ef8a
children 827d00badeb5
comparison
equal deleted inserted replaced
58613:3eb7a394510d 58614:eba1cd703531
269 (or (cdr (assq x '((nil . arg-nil) 269 (or (cdr (assq x '((nil . arg-nil)
270 (t . arg-t)))) 270 (t . arg-t))))
271 x))) calc-user-formula-alist)) 271 x))) calc-user-formula-alist))
272 (if cmd 272 (if cmd
273 (progn 273 (progn
274 (calc-need-macros) 274 (require 'calc-macs)
275 (fset cmd 275 (fset cmd
276 (list 'lambda 276 (list 'lambda
277 '() 277 '()
278 '(interactive) 278 '(interactive)
279 (list 'calc-wrapper 279 (list 'calc-wrapper
1709 ;;;; User-programmability. 1709 ;;;; User-programmability.
1710 1710
1711 ;;; Compiling Lisp-like forms to use the math library. 1711 ;;; Compiling Lisp-like forms to use the math library.
1712 1712
1713 (defun math-do-defmath (func args body) 1713 (defun math-do-defmath (func args body)
1714 (calc-need-macros) 1714 (require 'calc-macs)
1715 (let* ((fname (intern (concat "calcFunc-" (symbol-name func)))) 1715 (let* ((fname (intern (concat "calcFunc-" (symbol-name func))))
1716 (doc (if (stringp (car body)) (list (car body)))) 1716 (doc (if (stringp (car body)) (list (car body))))
1717 (clargs (mapcar 'math-clean-arg args)) 1717 (clargs (mapcar 'math-clean-arg args))
1718 (body (math-define-function-body 1718 (body (math-define-function-body
1719 (if (stringp (car body)) (cdr body) body) 1719 (if (stringp (car body)) (cdr body) body)