Function: math-comp-width

math-comp-width is an autoloaded and byte-compiled function defined in calccomp.el.gz.

Signature

(math-comp-width C)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calccomp.el.gz
(defun math-comp-width (c)
  (cond ((not (consp c))
         (or (and (stringp c)
                  (ceiling (string-pixel-width c)
                           (string-pixel-width "-")))
             (length c)))
	((memq (car c) '(horiz subscr supscr))
	 (let ((accum 0))
	   (while (setq c (cdr c))
	     (setq accum (+ accum (math-comp-width (car c)))))
	   accum))
	((memq (car c) '(vcent vleft vright))
	 (setq c (cdr c))
	 (let ((accum 0))
	   (while (setq c (cdr c))
	     (setq accum (max accum (math-comp-width (car c)))))
	   accum))
	((eq (car c) 'tag)
	 (math-comp-width (nth 2 c)))
	(t 0)))