• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/calc/

Lines Matching +defs:new +defs:table

39 ;;; Units table last updated 9-Jan-91 by Ulrich Mueller (ulm@vsnhd1.cern.ch)
252 "*Additional units table for user-defined units.
254 If this is changed, be sure to set math-units-table to nil to ensure
255 that the combined units table will be rebuilt.")
288 (defvar math-units-table nil
289 "Internal units table derived from math-defined-units.
292 (defvar math-units-table-buffer-valid nil)
324 (defun calc-convert-units (&optional old-units new-units)
345 (unless new-units
346 (setq new-units (read-string (if uoldname
349 ", new units: ")
351 (when (string-match "\\` */" new-units)
352 (setq new-units (concat "1" new-units)))
353 (setq units (math-read-expr new-units))
378 (defun calc-convert-temperature (&optional old-units new-units)
401 (setq unew (or new-units
406 ", new units: ")
511 (defun calc-view-units-table (n)
513 (and n (setq math-units-table-buffer-valid nil))
516 math-units-table
517 math-units-table-buffer-valid)
524 (math-build-units-table-buffer nil))))
526 (defun calc-enter-units-table (n)
528 (and n (setq math-units-table-buffer-valid nil))
529 (math-build-units-table-buffer t)
541 math-units-table nil))
548 (calc-invalidate-units-table))
559 math-units-table nil)))
560 (calc-invalidate-units-table))
562 (defun calc-invalidate-units-table ()
563 (setq math-units-table nil)
577 (math-build-units-table)
578 (let ((unit (assq uname math-units-table)))
638 ;; The variable math-cu-unit-list is local to math-build-units-table,
640 ;; by math-build-units-table.
645 (defun math-build-units-table ()
646 (or math-units-table
651 (message "Building units table...")
652 (setq math-units-table-buffer-valid nil)
661 (error "Format error in definition of %s in units table: %s"
670 (let ((math-units-table tab))
672 (message "Building units table...done")
673 (setq math-units-table tab))))
775 (or (assq (nth 1 v) (or math-units-table (math-build-units-table)))
779 (or (assq (intern (substring name 1)) math-units-table)
785 math-units-table))))))))
828 (let ((new 0)
837 new (math-add new (math-mul value (car (car ulist))))
840 (math-add new (math-mul (math-div expr (nth 1 (car ulist)))
907 ;; The variables math-cu-new-units and math-cu-pure are local to
910 (defvar math-cu-new-units)
913 (defun math-convert-units (expr math-cu-new-units &optional math-cu-pure)
914 (if (eq (car-safe math-cu-new-units) 'var)
915 (let ((unew (assq (nth 1 math-cu-new-units)
916 (math-build-units-table))))
918 (setq math-cu-new-units (nth 1 unew)))))
921 (math-find-compatible-unit expr math-cu-new-units)))
929 (math-pow math-cu-new-units (cdr compat)))
932 (math-pow (math-div (car compat) math-cu-new-units)
935 (when (setq math-cu-unit-list (math-decompose-units math-cu-new-units))
936 (setq math-cu-new-units (nth 2 (car math-cu-unit-list))))
942 (list '/ expr math-cu-new-units) nil)
943 math-cu-new-units math-cu-unit-list math-cu-pure))))))
948 (list '/ expr math-cu-new-units) nil)
949 math-cu-new-units math-cu-unit-list math-cu-pure)
955 (defun math-convert-temperature (expr old new &optional pure)
963 (unew (math-check-unit-name new)))
987 (list '* expr new))))
1070 math-units-table)))))
1316 (defun math-build-units-table-buffer (enter-buffer)
1317 (if (not (and math-units-table math-units-table-buffer-valid
1320 (uptr (math-build-units-table))
1329 (message "Formatting units table...")
1344 (unless (eq uptr math-units-table)
1390 (message "Formatting units table...done"))
1391 (setq math-units-table-buffer-valid t)