[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calc/calccomp.el,v
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calc/calccomp.el,v |
Date: |
Wed, 26 Dec 2007 17:33:29 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Jay Belanger <jpb> 07/12/26 17:33:29
Index: calccomp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/calc/calccomp.el,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- calccomp.el 2 Dec 2007 20:00:36 -0000 1.23
+++ calccomp.el 26 Dec 2007 17:33:29 -0000 1.24
@@ -71,7 +71,7 @@
(defvar math-comp-comma)
(defun math-compose-var (a)
- (let (v)
+ (let (v sn)
(if (and math-compose-hash-args
(let ((p calc-arg-values))
(setq v 1)
@@ -82,9 +82,12 @@
(if (eq math-compose-hash-args 1)
"#"
(format "#%d" v))
+ (setq sn (symbol-name (nth 1 a)))
+ (if (memq calc-language calc-lang-allow-percentsigns)
+ (setq sn (math-to-percentsigns sn)))
(if (memq calc-language calc-lang-allow-underscores)
- (math-to-underscores (symbol-name (nth 1 a)))
- (symbol-name (nth 1 a))))))
+ (setq sn (math-to-underscores sn)))
+ sn)))
(defun math-compose-expr (a prec)
(let ((math-compose-level (1+ math-compose-level))
@@ -805,6 +808,8 @@
(symbol-name func))
(math-match-substring (symbol-name func) 1)
(symbol-name func))))
+ (if (memq calc-language calc-lang-allow-percentsigns)
+ (setq func (math-to-percentsigns func)))
(if (memq calc-language calc-lang-allow-underscores)
(setq func (math-to-underscores func)))
(if (setq spfn (get calc-language 'math-func-formatter))
@@ -939,6 +944,14 @@
(concat (math-match-substring x 1) "_" (math-match-substring x 2)))
x))
+(defun math-to-percentsigns (x)
+ (if (string-match "^I#'" x)
+ (setq x (concat "%" (substring x 3))))
+ (if (string-match "\\`\\(.*\\)'\\(.*\\)\\'" x)
+ (math-to-percentsigns
+ (concat (math-match-substring x 1) "%" (math-match-substring x 2)))
+ x))
+
(defun math-tex-expr-is-flat (a)
(or (Math-integerp a)
(memq (car a) '(float var))
- [Emacs-diffs] Changes to emacs/lisp/calc/calccomp.el,v, Jay Belanger, 2007/12/01
- [Emacs-diffs] Changes to emacs/lisp/calc/calccomp.el,v, Jay Belanger, 2007/12/02
- [Emacs-diffs] Changes to emacs/lisp/calc/calccomp.el,v,
Jay Belanger <=
- [Emacs-diffs] Changes to emacs/lisp/calc/calccomp.el,v, Jay Belanger, 2007/12/27
- [Emacs-diffs] Changes to emacs/lisp/calc/calccomp.el,v, Jay Belanger, 2007/12/28