/[emacs]/emacs/lisp/calc/calc-ext.el
ViewVC logotype

Diff of /emacs/lisp/calc/calc-ext.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by jpb, Tue Nov 9 20:29:34 2004 UTC revision 1.21 by jpb, Thu Nov 11 05:50:09 2004 UTC
# Line 2887  calc-kill calc-kill-region calc-yank)))) Line 2887  calc-kill calc-kill-region calc-yank))))
2887    
2888  (defvar math-expr-data)  (defvar math-expr-data)
2889    
2890  (defun math-read-expr (exp-str)  (defun math-read-expr (math-exp-str)
2891    (let ((exp-pos 0)    (let ((math-exp-pos 0)
2892          (exp-old-pos 0)          (math-exp-old-pos 0)
2893          (exp-keep-spaces nil)          (math-exp-keep-spaces nil)
2894          exp-token math-expr-data)          math-exp-token math-expr-data)
2895      (while (setq exp-token (string-match "\\.\\.\\([^.]\\|.[^.]\\)" exp-str))      (while (setq math-exp-token (string-match "\\.\\.\\([^.]\\|.[^.]\\)" math-exp-str))
2896        (setq exp-str (concat (substring exp-str 0 exp-token) "\\dots"        (setq math-exp-str (concat (substring math-exp-str 0 math-exp-token) "\\dots"
2897                              (substring exp-str (+ exp-token 2)))))                              (substring math-exp-str (+ math-exp-token 2)))))
2898      (math-build-parse-table)      (math-build-parse-table)
2899      (math-read-token)      (math-read-token)
2900      (let ((val (catch 'syntax (math-read-expr-level 0))))      (let ((val (catch 'syntax (math-read-expr-level 0))))
2901        (if (stringp val)        (if (stringp val)
2902            (list 'error exp-old-pos val)            (list 'error math-exp-old-pos val)
2903          (if (equal exp-token 'end)          (if (equal math-exp-token 'end)
2904              val              val
2905            (list 'error exp-old-pos "Syntax error"))))))            (list 'error math-exp-old-pos "Syntax error"))))))
2906    
2907  (defun math-read-plain-expr (exp-str &optional error-check)  (defun math-read-plain-expr (exp-str &optional error-check)
2908    (let* ((calc-language nil)    (let* ((calc-language nil)

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26