comparison lisp/calc/calc.el @ 58467:4a905282edbb

(math-stack-value-offset): Replace variables c, wid and off with math-svo-c, math-svo-wid and math-svo-off.
author Jay Belanger <jay.p.belanger@gmail.com>
date Wed, 24 Nov 2004 06:01:45 +0000
parents 5fb84c291168
children f7508bb6a284
comparison
equal deleted inserted replaced
58466:bf2edad57436 58467:4a905282edbb
3014 (when calc-line-numbering 3014 (when calc-line-numbering
3015 (setq s (concat "1:" (substring s 2))))) 3015 (setq s (concat "1:" (substring s 2)))))
3016 (setcar (cdr entry) (calc-count-lines s)) 3016 (setcar (cdr entry) (calc-count-lines s))
3017 s)) 3017 s))
3018 3018
3019 (defun math-stack-value-offset (c) 3019 ;; The variables math-svo-c, math-svo-wid and math-svo-off are local
3020 ;; to math-stack-value-offset, but are used by math-stack-value-offset-fancy
3021 ;; in calccomp.el.
3022
3023 (defun math-stack-value-offset (math-svo-c)
3020 (let* ((num (if calc-line-numbering 4 0)) 3024 (let* ((num (if calc-line-numbering 4 0))
3021 (wid (calc-window-width)) 3025 (math-svo-wid (calc-window-width))
3022 off) 3026 math-svo-off)
3023 (if calc-display-just 3027 (if calc-display-just
3024 (progn 3028 (progn
3025 (calc-extensions) 3029 (calc-extensions)
3026 (math-stack-value-offset-fancy)) 3030 (math-stack-value-offset-fancy))
3027 (setq off (or calc-display-origin 0)) 3031 (setq math-svo-off (or calc-display-origin 0))
3028 (when (integerp calc-line-breaking) 3032 (when (integerp calc-line-breaking)
3029 (setq wid calc-line-breaking))) 3033 (setq math-svo-wid calc-line-breaking)))
3030 (cons (max (- off (length calc-left-label)) 0) 3034 (cons (max (- math-svo-off (length calc-left-label)) 0)
3031 (+ wid num)))) 3035 (+ math-svo-wid num))))
3032 3036
3033 (defun calc-count-lines (s) 3037 (defun calc-count-lines (s)
3034 (let ((pos 0) 3038 (let ((pos 0)
3035 (num 1)) 3039 (num 1))
3036 (while (setq pos (string-match "\n" s pos)) 3040 (while (setq pos (string-match "\n" s pos))