[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calc/calc-prog.el
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calc/calc-prog.el |
Date: |
Sun, 02 Jan 2005 02:01:43 -0500 |
Index: emacs/lisp/calc/calc-prog.el
diff -c emacs/lisp/calc/calc-prog.el:1.17 emacs/lisp/calc/calc-prog.el:1.18
*** emacs/lisp/calc/calc-prog.el:1.17 Sun Jan 2 04:51:06 2005
--- emacs/lisp/calc/calc-prog.el Sun Jan 2 06:48:17 2005
***************
*** 474,480 ****
(let ((lang calc-language))
(calc-edit-mode (list 'calc-finish-user-syntax-edit (list 'quote lang))
t
! (format "Editing %s-Mode Syntax Table"
(cond ((null lang) "Normal")
((eq lang 'tex) "TeX")
(t (capitalize (symbol-name lang))))))
--- 474,480 ----
(let ((lang calc-language))
(calc-edit-mode (list 'calc-finish-user-syntax-edit (list 'quote lang))
t
! (format "Editing %s-Mode Syntax Table. "
(cond ((null lang) "Normal")
((eq lang 'tex) "TeX")
(t (capitalize (symbol-name lang))))))
***************
*** 684,693 ****
(eq (car-safe (nth 3 cmd)) 'calc-execute-kbd-macro)))
(let* ((mac (elt (nth 1 (nth 3 cmd)) 1))
(str (edmacro-format-keys mac t))
! (macbeg))
(calc-edit-mode
! (list 'calc-edit-macro-finish-edit cmdname (nth 3 (nth 3 cmd)))
! t "Calc Macro Edit Mode")
(goto-char (point-max))
(insert "Original keys: " (elt (nth 1 (nth 3 cmd)) 0) "\n" )
(setq macbeg (point))
--- 684,695 ----
(eq (car-safe (nth 3 cmd)) 'calc-execute-kbd-macro)))
(let* ((mac (elt (nth 1 (nth 3 cmd)) 1))
(str (edmacro-format-keys mac t))
! (macbeg)
! (kys (nth 3 (nth 3 cmd))))
(calc-edit-mode
! (list 'calc-edit-macro-finish-edit cmdname kys)
! t (format "Editing keyboard macro (%s, bound to %s).\n"
! cmdname kys))
(goto-char (point-max))
(insert "Original keys: " (elt (nth 1 (nth 3 cmd)) 0) "\n" )
(setq macbeg (point))
***************
*** 700,715 ****
(t (let* ((func (calc-stack-command-p cmd))
(defn (and func
(symbolp func)
! (get func 'calc-user-defn))))
(if (and defn (calc-valid-formula-func func))
(progn
(calc-wrapper
! (calc-edit-mode (list 'calc-finish-formula-edit
! (list 'quote func)))
(insert (math-showing-full-precision
(math-format-nice-expr defn (frame-width)))
"\n"))
! (calc-show-edit-buffer))
(error "That command's definition cannot be edited")))))))
;; Formatting the macro buffer
--- 702,725 ----
(t (let* ((func (calc-stack-command-p cmd))
(defn (and func
(symbolp func)
! (get func 'calc-user-defn)))
! (kys (concat "z" (char-to-string (car def))))
! (intcmd (symbol-name (cdr def)))
! (algcmd (substring (symbol-name func) 9)))
(if (and defn (calc-valid-formula-func func))
(progn
(calc-wrapper
! (calc-edit-mode
! (list 'calc-finish-formula-edit (list 'quote func))
! nil
! (format "Editing formula (%s, %s, bound to %s).\n"
! intcmd algcmd kys))
(insert (math-showing-full-precision
(math-format-nice-expr defn (frame-width)))
"\n"))
! (calc-show-edit-buffer)
! (goto-char (point-min))
! (forward-line 2))
(error "That command's definition cannot be edited")))))))
;; Formatting the macro buffer
***************
*** 822,828 ****
match)
(goto-char (line-beginning-position))
(kill-line 1)
! (if (string-equal line "1")
(insert line "\t\t\t;; calc quick variable\n")
(setq curline (calc-edit-macro-command))
(while (and curline
--- 832,838 ----
match)
(goto-char (line-beginning-position))
(kill-line 1)
! (if (member line '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9"))
(insert line "\t\t\t;; calc quick variable\n")
(setq curline (calc-edit-macro-command))
(while (and curline
***************
*** 936,941 ****
--- 946,953 ----
'arg key)))))))
(defun calc-finish-formula-edit (func)
+ (goto-char (point-min))
+ (forward-line 2)
(let ((buf (current-buffer))
(str (buffer-substring (point) (point-max)))
(start (point))