You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(20) |
Dec
(17) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(39) |
Feb
(21) |
Mar
(33) |
Apr
(135) |
May
(53) |
Jun
(88) |
Jul
(47) |
Aug
(59) |
Sep
(207) |
Oct
(40) |
Nov
(7) |
Dec
(26) |
| 2003 |
Jan
(49) |
Feb
(39) |
Mar
(117) |
Apr
(50) |
May
(62) |
Jun
(6) |
Jul
(19) |
Aug
(24) |
Sep
(11) |
Oct
(11) |
Nov
(49) |
Dec
(9) |
| 2004 |
Jan
(29) |
Feb
(123) |
Mar
(32) |
Apr
(53) |
May
(52) |
Jun
(19) |
Jul
(33) |
Aug
(10) |
Sep
(76) |
Oct
(86) |
Nov
(171) |
Dec
(163) |
| 2005 |
Jan
(147) |
Feb
(121) |
Mar
(120) |
Apr
(126) |
May
(120) |
Jun
(213) |
Jul
(76) |
Aug
(79) |
Sep
(140) |
Oct
(83) |
Nov
(156) |
Dec
(202) |
| 2006 |
Jan
(181) |
Feb
(171) |
Mar
(157) |
Apr
(98) |
May
(96) |
Jun
(97) |
Jul
(193) |
Aug
(76) |
Sep
(130) |
Oct
(63) |
Nov
(196) |
Dec
(253) |
| 2007 |
Jan
(256) |
Feb
(293) |
Mar
(276) |
Apr
(258) |
May
(181) |
Jun
(91) |
Jul
(108) |
Aug
(69) |
Sep
(107) |
Oct
(179) |
Nov
(137) |
Dec
(121) |
| 2008 |
Jan
(124) |
Feb
(129) |
Mar
(192) |
Apr
(201) |
May
(90) |
Jun
(86) |
Jul
(115) |
Aug
(142) |
Sep
(49) |
Oct
(91) |
Nov
(95) |
Dec
(218) |
| 2009 |
Jan
(230) |
Feb
(149) |
Mar
(118) |
Apr
(72) |
May
(77) |
Jun
(68) |
Jul
(102) |
Aug
(72) |
Sep
(89) |
Oct
(76) |
Nov
(125) |
Dec
(86) |
| 2010 |
Jan
(75) |
Feb
(90) |
Mar
(89) |
Apr
(121) |
May
(111) |
Jun
(66) |
Jul
(75) |
Aug
(66) |
Sep
(66) |
Oct
(166) |
Nov
(121) |
Dec
(73) |
| 2011 |
Jan
(74) |
Feb
|
Mar
|
Apr
(14) |
May
(22) |
Jun
(31) |
Jul
(53) |
Aug
(37) |
Sep
(23) |
Oct
(25) |
Nov
(31) |
Dec
(28) |
| 2012 |
Jan
(18) |
Feb
(11) |
Mar
(32) |
Apr
(17) |
May
(48) |
Jun
(37) |
Jul
(23) |
Aug
(54) |
Sep
(15) |
Oct
(11) |
Nov
(19) |
Dec
(22) |
| 2013 |
Jan
(11) |
Feb
(32) |
Mar
(24) |
Apr
(37) |
May
(31) |
Jun
(14) |
Jul
(26) |
Aug
(33) |
Sep
(40) |
Oct
(21) |
Nov
(36) |
Dec
(84) |
| 2014 |
Jan
(23) |
Feb
(20) |
Mar
(27) |
Apr
(24) |
May
(31) |
Jun
(27) |
Jul
(34) |
Aug
(26) |
Sep
(21) |
Oct
(45) |
Nov
(23) |
Dec
(73) |
| 2015 |
Jan
(33) |
Feb
(8) |
Mar
(24) |
Apr
(45) |
May
(27) |
Jun
(19) |
Jul
(21) |
Aug
(51) |
Sep
(43) |
Oct
(29) |
Nov
(61) |
Dec
(86) |
| 2016 |
Jan
(99) |
Feb
(52) |
Mar
(80) |
Apr
(61) |
May
(24) |
Jun
(23) |
Jul
(36) |
Aug
(30) |
Sep
(41) |
Oct
(43) |
Nov
(27) |
Dec
(46) |
| 2017 |
Jan
(57) |
Feb
(34) |
Mar
(40) |
Apr
(31) |
May
(78) |
Jun
(49) |
Jul
(72) |
Aug
(33) |
Sep
(26) |
Oct
(82) |
Nov
(69) |
Dec
(29) |
| 2018 |
Jan
(43) |
Feb
(9) |
Mar
|
Apr
(40) |
May
(34) |
Jun
(49) |
Jul
(45) |
Aug
(8) |
Sep
(51) |
Oct
(75) |
Nov
(103) |
Dec
(80) |
| 2019 |
Jan
(153) |
Feb
(78) |
Mar
(47) |
Apr
(48) |
May
(63) |
Jun
(54) |
Jul
(10) |
Aug
(7) |
Sep
(17) |
Oct
(24) |
Nov
(29) |
Dec
(17) |
| 2020 |
Jan
(22) |
Feb
(74) |
Mar
(47) |
Apr
(48) |
May
(12) |
Jun
(44) |
Jul
(13) |
Aug
(18) |
Sep
(26) |
Oct
(36) |
Nov
(25) |
Dec
(23) |
| 2021 |
Jan
(28) |
Feb
(25) |
Mar
(58) |
Apr
(76) |
May
(72) |
Jun
(70) |
Jul
(25) |
Aug
(67) |
Sep
(17) |
Oct
(24) |
Nov
(30) |
Dec
(30) |
| 2022 |
Jan
(51) |
Feb
(39) |
Mar
(72) |
Apr
(65) |
May
(30) |
Jun
(72) |
Jul
(129) |
Aug
(44) |
Sep
(45) |
Oct
(30) |
Nov
(48) |
Dec
(275) |
| 2023 |
Jan
(235) |
Feb
(232) |
Mar
(68) |
Apr
(16) |
May
(52) |
Jun
(87) |
Jul
(143) |
Aug
(32) |
Sep
(26) |
Oct
(15) |
Nov
(20) |
Dec
(74) |
| 2024 |
Jan
(119) |
Feb
(32) |
Mar
(64) |
Apr
(68) |
May
(30) |
Jun
(50) |
Jul
(37) |
Aug
(32) |
Sep
(10) |
Oct
(27) |
Nov
(47) |
Dec
(36) |
| 2025 |
Jan
(94) |
Feb
(68) |
Mar
(79) |
Apr
(66) |
May
(46) |
Jun
(21) |
Jul
(134) |
Aug
(134) |
Sep
(53) |
Oct
(24) |
Nov
(69) |
Dec
(3) |
|
From: Jay B. <bel...@us...> - 2001-12-09 19:37:41
|
Update of /cvsroot/maxima/maxima-pre59/emacs
In directory usw-pr-cvs1:/tmp/cvs-serv29362/maxima-pre59/emacs
Modified Files:
maxima-font-lock.el
Log Message:
I fixed the way numbers are fontlocked.
Index: maxima-font-lock.el
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/emacs/maxima-font-lock.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** maxima-font-lock.el 2001/11/11 01:47:41 1.2
--- maxima-font-lock.el 2001/12/09 19:37:38 1.3
***************
*** 4,10 ****
;; Author: Jay Belanger <bel...@tr...>
- ;; $Name$
- ;; $Revision$
- ;; $Date$
;; Keywords: maxima, font-lock
--- 4,7 ----
***************
*** 1080,1084 ****
(defvar maxima-match-constants-3
! "[0-9]"
"Regexp to match the Maxima constants.")
--- 1077,1085 ----
(defvar maxima-match-constants-3
! "\\<\\([0-9]+\\)\\>"
! "Regexp to match the Maxima constants.")
!
! (defvar maxima-match-constants-4
! "\\<\\([0-9]+\.\\)?\\([0-9]+B[+-]?[0-9]\\)\\>"
"Regexp to match the Maxima constants.")
***************
*** 1312,1315 ****
--- 1313,1317 ----
(defvar maxima-keywords
`(
+ (,maxima-match-operators (0 maxima-operator-face t))
(,maxima-match-variables-1 (0 maxima-variable-face t))
(,maxima-match-variables-2 (0 maxima-variable-face t))
***************
*** 1325,1330 ****
(,maxima-match-constants-2 (0 maxima-constant-face t))
(,maxima-match-constants-3 (0 maxima-constant-face t))
(,maxima-match-keywords (0 maxima-keyword-face t))
- (,maxima-match-operators (0 maxima-operator-face t))
(,maxima-match-properties (0 maxima-property-face t))
(,maxima-match-macros (0 maxima-macro-face t))
--- 1327,1332 ----
(,maxima-match-constants-2 (0 maxima-constant-face t))
(,maxima-match-constants-3 (0 maxima-constant-face t))
+ (,maxima-match-constants-4 (0 maxima-constant-face t))
(,maxima-match-keywords (0 maxima-keyword-face t))
(,maxima-match-properties (0 maxima-property-face t))
(,maxima-match-macros (0 maxima-macro-face t))
|
|
From: Jay B. <bel...@us...> - 2001-12-09 19:32:59
|
Update of /cvsroot/maxima/maxima-pre59/emacs In directory usw-pr-cvs1:/tmp/cvs-serv28290/Maxima/maxima-pre59/emacs Removed Files: maximadoc.sty Log Message: The abilities of maximadoc were merged into emaxima. --- maximadoc.sty DELETED --- |
|
From: Jay B. <bel...@us...> - 2001-12-09 19:32:25
|
Update of /cvsroot/maxima/maxima-pre59/emacs In directory usw-pr-cvs1:/tmp/cvs-serv28128/Maxima/maxima-pre59/emacs Removed Files: maximadoc.el Log Message: The abilities of maximadoc were merged into emaxima. --- maximadoc.el DELETED --- |
|
From: Jay B. <bel...@us...> - 2001-12-09 19:31:46
|
Update of /cvsroot/maxima/maxima-pre59/emacs
In directory usw-pr-cvs1:/tmp/cvs-serv27836/Maxima/maxima-pre59/emacs
Modified Files:
maxima.el
Log Message:
The keybindings were changed to be more standard.
Various minor changes and bugfixes.
Index: maxima.el
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/emacs/maxima.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** maxima.el 2001/11/11 01:53:21 1.2
--- maxima.el 2001/12/09 19:31:43 1.3
***************
*** 39,44 ****
;; Quick intro
;;
! ;; To install, put this file (as well as maxima-font-lock.el and maxima-symbols.el)
! ;; somewhere in your emacs load path.
;; To make sure that `maxima.el' is loaded when necessary, whether to
;; edit a file in maxima mode or interact with Maxima in an Emacs buffer,
--- 39,44 ----
;; Quick intro
;;
! ;; To install, put this file (as well as maxima-font-lock.el and
! ;; maxima-symbols.el) somewhere in your emacs load path.
;; To make sure that `maxima.el' is loaded when necessary, whether to
;; edit a file in maxima mode or interact with Maxima in an Emacs buffer,
***************
*** 69,81 ****
;; Maxima mode provides the following motion commands:
! ;; C-c C-a: Move to the beginning of the form.
! ;; C-c C-e: Move to the end of the form.
! ;; C-c (: Move to the beginning of the sexp.
! ;; C-c ): Move to the end of the sexp.
;; and the following miscellaneous commands.
! ;; C-c C-f: Mark the current form
! ;; C-c C-p: Check the current region for balanced parentheses.
! ;; C-c C-g: Check the current form for balanced parentheses.
;; Maxima mode has the following completions commands:
--- 69,81 ----
;; Maxima mode provides the following motion commands:
! ;; M-C-a: Move to the beginning of the form.
! ;; M-C-e: Move to the end of the form.
! ;; M-C-b: Move to the beginning of the sexp.
! ;; M-C-f: Move to the end of the sexp.
;; and the following miscellaneous commands.
! ;; M-C-h: Mark the current form
! ;; C-c): Check the current region for balanced parentheses.
! ;; C-cC-): Check the current form for balanced parentheses.
;; Maxima mode has the following completions commands:
***************
*** 86,105 ****
;; Portions of the buffer can be sent to a Maxima process. (If a process is
;; not running, one will be started.)
! ;; C-M-r: Send the region to Maxima.
! ;; C-M-b: Send the buffer to Maxima.
! ;; C-M-l: Send the line to Maxima.
! ;; C-M-f: Send the form to Maxima.
;; C-RET: Send the smallest set of lines which contains
;; the cursor and contains no incomplete forms, and go to the next form.
;; M-RET: As above, but with the region instead of the current line.
;;
;; When something is sent to Maxima, a buffer running an inferior Maxima
;; process will appear. It can also be made to appear by using the command
! ;; C-c C-d.
;; When a command is given to send information to Maxima, the region
;; (buffer, line, form) is first checked to make sure the parentheses
;; are balanced. With an argument, they will not be checked first.
;; The Maxima process can be killed, after asking for confirmation
! ;; with C-M-k. To kill without confirmation, give C-M-k
;; an argument.
--- 86,106 ----
;; Portions of the buffer can be sent to a Maxima process. (If a process is
;; not running, one will be started.)
! ;; C-cC-r: Send the region to Maxima.
! ;; C-cC-b: Send the buffer to Maxima.
! ;; C-cC-c: Send the line to Maxima.
! ;; C-cC-e: Send the form to Maxima.
;; C-RET: Send the smallest set of lines which contains
;; the cursor and contains no incomplete forms, and go to the next form.
;; M-RET: As above, but with the region instead of the current line.
+ ;; C-cC-l: Prompt for a file name to load into Maxima.
;;
;; When something is sent to Maxima, a buffer running an inferior Maxima
;; process will appear. It can also be made to appear by using the command
! ;; C-c C-p.
;; When a command is given to send information to Maxima, the region
;; (buffer, line, form) is first checked to make sure the parentheses
;; are balanced. With an argument, they will not be checked first.
;; The Maxima process can be killed, after asking for confirmation
! ;; with C-cC-k. To kill without confirmation, give C-cC-k
;; an argument.
***************
*** 122,132 ****
;; To get help on a Maxima topic, use:
! ;; C-c C-h.
;; To read the Maxima info manual, use:
! ;; C-c TAB.
;; To get help with the symbol under point, use:
! ;; f12.
;; To get apropos with the symbol under point, use:
! ;; M-f12.
--- 123,133 ----
;; To get help on a Maxima topic, use:
! ;; C-c C-d.
;; To read the Maxima info manual, use:
! ;; C-c C-m.
;; To get help with the symbol under point, use:
! ;; C-cC-h or f12.
;; To get apropos with the symbol under point, use:
! ;; C-cC-a or M-f12.
***************
*** 143,149 ****
;; <C-M-tab> will complete the input line, based on previous input lines.
! ;; C-c C-h will get help on a Maxima topic.
! ;; C-c TAB will bring up the Maxima info manual.
! ;; C-M-k will kill the process and the buffer, after asking for
;; confirmation. To kill without confirmation, give C-M-k an
;; argument.
--- 144,150 ----
;; <C-M-tab> will complete the input line, based on previous input lines.
! ;; C-c C-d will get help on a Maxima topic.
! ;; C-c C-m will bring up the Maxima info manual.
! ;; C-cC-k will kill the process and the buffer, after asking for
;; confirmation. To kill without confirmation, give C-M-k an
;; argument.
***************
*** 179,185 ****
;; buffer.)
- ;; A short help page on debugging can be accessed through
- ;; C-c C-d
-
;;; Code:
--- 180,183 ----
***************
*** 226,229 ****
--- 224,232 ----
:type '(file))
+ (defcustom maxima-command "maxima"
+ "*The command used to start Maxima."
+ :group 'maxima
+ :type 'file)
+
;;;; The other variables
***************
*** 232,237 ****
(defvar inferior-maxima-computing-p nil
! "Status of Maxima process filter: t if enabled, else nil.")
(defvar inferior-maxima-lisp-level-flag nil
"Non-nil means that the inferior Maxima process is in Lisp mode.")
--- 235,248 ----
(defvar inferior-maxima-computing-p nil
! "Non-nil if Maxima process is computing.")
!
! (defvar inferior-maxima-running-p nil
! "Non-nil if Maxima process is alive.")
+ (defvar inferior-maxima-question-p nil)
+
+ (defvar inferior-maxima-result nil
+ "The last output of the Maxima process.")
+
(defvar inferior-maxima-lisp-level-flag nil
"Non-nil means that the inferior Maxima process is in Lisp mode.")
***************
*** 268,271 ****
--- 279,283 ----
(defvar maxima-special-symbol-letters "!:='")
+ (defvar inferior-maxima-exit-hook '())
;;;; Utility functions
***************
*** 1139,1142 ****
--- 1151,1158 ----
(maxima-check-parens beg end)))
+ (defun maxima-load-file (file)
+ "Prompt for a Maxima file to load."
+ (interactive "fMaxima file: ")
+ (maxima-string (concat "load(\"" (expand-file-name file) "\");")))
;;;; Syntax table
***************
*** 1170,1174 ****
(modify-syntax-entry ?' "' " maxima-mode-syntax-table)
(modify-syntax-entry ?, "' " maxima-mode-syntax-table)
! (modify-syntax-entry ?. "' " maxima-mode-syntax-table)
(modify-syntax-entry ?# "' " maxima-mode-syntax-table)
(modify-syntax-entry ?\\ "\\" maxima-mode-syntax-table)
--- 1186,1190 ----
(modify-syntax-entry ?' "' " maxima-mode-syntax-table)
(modify-syntax-entry ?, "' " maxima-mode-syntax-table)
! (modify-syntax-entry ?. "w" maxima-mode-syntax-table)
(modify-syntax-entry ?# "' " maxima-mode-syntax-table)
(modify-syntax-entry ?\\ "\\" maxima-mode-syntax-table)
***************
*** 1199,1212 ****
(let ((map (make-sparse-keymap)))
;; Motion
! (define-key map "\C-c\C-a" 'maxima-beginning-of-form)
! (define-key map "\C-c\C-e" 'maxima-end-of-form)
! (define-key map "\C-c(" 'maxima-beginning-of-sexp)
! (define-key map "\C-c)" 'maxima-end-of-sexp)
;; Process
! (define-key map "\M-\C-p" 'maxima-display-buffer)
! (define-key map "\M-\C-r" 'maxima-send-region)
! (define-key map "\M-\C-b" 'maxima-send-buffer)
! (define-key map "\M-\C-l" 'maxima-send-line)
! (define-key map "\M-\C-f" 'maxima-send-form)
(define-key map [(control return)]
'maxima-send-full-line-and-goto-next-form)
--- 1215,1228 ----
(let ((map (make-sparse-keymap)))
;; Motion
! (define-key map "\M-\C-a" 'maxima-beginning-of-form)
! (define-key map "\M-\C-e" 'maxima-end-of-form)
! (define-key map "\M-\C-b" 'maxima-beginning-of-sexp)
! (define-key map "\M-\C-f" 'maxima-end-of-sexp)
;; Process
! (define-key map "\C-c\C-p" 'maxima-display-buffer)
! (define-key map "\C-c\C-r" 'maxima-send-region)
! (define-key map "\C-c\C-b" 'maxima-send-buffer)
! (define-key map "\C-c\C-c" 'maxima-send-line)
! (define-key map "\C-c\C-e" 'maxima-send-form)
(define-key map [(control return)]
'maxima-send-full-line-and-goto-next-form)
***************
*** 1214,1225 ****
'maxima-send-completed-region-and-goto-next-form)
(define-key map [(control meta return)] 'maxima-send-buffer)
! (define-key map "\M-\C-k" 'maxima-stop)
;; Completion
(define-key map (kbd "M-TAB") 'maxima-complete)
(define-key map [(control tab)] 'maxima-dynamic-complete)
;; Commenting
! (define-key map "\C-c\C-c" 'comment-region)
! (define-key map "\C-c:" 'maxima-insert-short-comment)
! (define-key map "\C-c;" 'maxima-insert-long-comment)
;; Indentation
(define-key map "\t" 'maxima-indent-line)
--- 1230,1243 ----
'maxima-send-completed-region-and-goto-next-form)
(define-key map [(control meta return)] 'maxima-send-buffer)
! (define-key map "\C-c\C-k" 'maxima-stop)
! (define-key map "\C-c\C-l" 'maxima-load-file)
;; Completion
(define-key map (kbd "M-TAB") 'maxima-complete)
(define-key map [(control tab)] 'maxima-dynamic-complete)
;; Commenting
! (define-key map "\C-c;" 'comment-region)
! (define-key map "\C-c:" 'maxima-uncomment-region)
! (define-key map "\M-;" 'maxima-insert-short-comment)
! (define-key map "\C-c*" 'maxima-insert-long-comment)
;; Indentation
(define-key map "\t" 'maxima-indent-line)
***************
*** 1228,1239 ****
; (define-key map [(control tab)] 'maxima-untab)
;; Help
! (define-key map "\C-c\C-h" 'maxima-help)
! (define-key map "\C-c\C-i" 'maxima-info)
(define-key map [(f12)] 'maxima-completion-help)
(define-key map [(meta f12)] 'maxima-apropos-help)
;; Misc
! (define-key map "\C-c\C-f" 'maxima-mark-form)
! (define-key map "\C-c\C-p" 'maxima-check-parens)
! (define-key map "\C-c\C-g" 'maxima-check-form-parens)
(define-key map "\177" 'backward-delete-char-untabify)
(define-key map "\C-x " 'maxima-debug-set-break)
--- 1246,1259 ----
; (define-key map [(control tab)] 'maxima-untab)
;; Help
! (define-key map "\C-c\C-d" 'maxima-help)
! (define-key map "\C-c\C-m" 'maxima-info)
(define-key map [(f12)] 'maxima-completion-help)
+ (define-key map "\C-c\C-h" 'maxima-completion-help)
(define-key map [(meta f12)] 'maxima-apropos-help)
+ (define-key map "\C-c\C-a" 'maxima-apropos-help)
;; Misc
! (define-key map "\M-\C-h" 'maxima-mark-form)
! (define-key map "\C-c\)" 'maxima-check-parens)
! (define-key map "\C-cC-\)" 'maxima-check-form-parens)
(define-key map "\177" 'backward-delete-char-untabify)
(define-key map "\C-x " 'maxima-debug-set-break)
***************
*** 1255,1258 ****
--- 1275,1279 ----
["Send line" maxima-send-line t]
["Send form" maxima-send-form t]
+ ["Load file" maxima-load-file t]
"----"
["Display buffer" maxima-display-buffer t]
***************
*** 1334,1337 ****
--- 1355,1359 ----
\\[maxima-send-completed-region-and-goto-next-form]: As above, but with
the region instead of the current line.
+ \\[maxima-load-file] will prompt for a filename and load it into Maxima
When something is sent to Maxima, a buffer running an inferior Maxima
process will appear. It can also be made to appear by using the command
***************
*** 1397,1405 ****
(unless (processp inferior-maxima-process)
(setq inferior-maxima-computing-p t)
! (let ((mbuf (make-comint "maxima" "maxima")))
(save-excursion
(set-buffer mbuf)
(setq inferior-maxima-process (get-buffer-process mbuf))
! (inferior-maxima-mode)))))
(defun maxima-stop (&optional arg)
--- 1419,1430 ----
(unless (processp inferior-maxima-process)
(setq inferior-maxima-computing-p t)
! (setq inferior-maxima-running-p t)
! (setq inferior-maxima-question-p nil)
! (let ((mbuf (make-comint "maxima" maxima-command)))
(save-excursion
(set-buffer mbuf)
(setq inferior-maxima-process (get-buffer-process mbuf))
! (inferior-maxima-mode)))
! (maxima-wait)))
(defun maxima-stop (&optional arg)
***************
*** 1409,1432 ****
(if arg
(progn
! (delete-process "maxima")
(kill-buffer "*maxima*")
(setq inferior-maxima-process nil))
(if (y-or-n-p "Really quit Maxima? ")
(progn
! (delete-process "maxima")
(kill-buffer "*maxima*")
(setq inferior-maxima-process nil))))))
- (defun maxima-done-computing (string)
- "Tells whether the process is done computing (by looking at the prompt)."
- (if (or
- (string-match inferior-maxima-prompt string)
- (string-match "Inferior Maxima finished"))
- (setq inferior-maxima-computing-p nil)))
-
(defun maxima-wait ()
"Waits until the Maxima process is finished with a computation."
! (while inferior-maxima-computing-p
! (sleep-for 1)))
;;;; Sending information to the process
--- 1434,1469 ----
(if arg
(progn
! (delete-process inferior-maxima-process)
(kill-buffer "*maxima*")
(setq inferior-maxima-process nil))
(if (y-or-n-p "Really quit Maxima? ")
(progn
! (delete-process inferior-maxima-process)
(kill-buffer "*maxima*")
(setq inferior-maxima-process nil))))))
(defun maxima-wait ()
"Waits until the Maxima process is finished with a computation."
! (if (not inferior-maxima-running-p)
! (if running-xemacs
! (sit-for 1)
! (sleep-for 1)))
! (while (and
! inferior-maxima-computing-p
! inferior-maxima-running-p
! (not inferior-maxima-question-p))
! (if running-xemacs
! (sleep-for 1)
! (sleep-for 0 100)))
! (when inferior-maxima-question-p
! (let ((ans (read-string (maxima-question))))
! (unless (string-match "[;$]" ans)
! (setq ans (concat ans ";")))
! (save-excursion
! (set-buffer (process-buffer inferior-maxima-process))
! (insert ans "\n")
! (set-marker (process-mark inferior-maxima-process) (point)))
! (maxima-string-nodisplay ans)
! (maxima-wait))))
;;;; Sending information to the process
***************
*** 1439,1442 ****
--- 1476,1486 ----
(maxima-start)
(setq inferior-maxima-computing-p t)
+ (if (or
+ (string-match "quit();" string)
+ (string-match "" string))
+ (setq inferior-maxima-running-p nil)
+ (setq inferior-maxima-running-p t))
+ ; (setq inferior-maxima-running-p t)
+ (setq inferior-maxima-question-p nil)
(comint-send-string inferior-maxima-process (concat string "\n"))
(maxima-display-buffer))
***************
*** 1446,1455 ****
(maxima-start)
(setq inferior-maxima-computing-p t)
(comint-send-string inferior-maxima-process (concat string "\n")))
!
(defun maxima-region (beg end)
"Send the region to the Maxima process."
(maxima-start)
(setq inferior-maxima-computing-p t)
(comint-send-region inferior-maxima-process beg end)
(comint-send-string inferior-maxima-process "\n")
--- 1490,1508 ----
(maxima-start)
(setq inferior-maxima-computing-p t)
+ (if (or
+ (string-match "quit();" string)
+ (string-match "" string))
+ (setq inferior-maxima-running-p nil)
+ (setq inferior-maxima-running-p t))
+ ; (setq inferior-maxima-running-p t)
+ (setq inferior-maxima-question-p nil)
(comint-send-string inferior-maxima-process (concat string "\n")))
!
(defun maxima-region (beg end)
"Send the region to the Maxima process."
(maxima-start)
(setq inferior-maxima-computing-p t)
+ (setq inferior-maxima-running-p t)
+ (setq inferior-maxima-question-p nil)
(comint-send-region inferior-maxima-process beg end)
(comint-send-string inferior-maxima-process "\n")
***************
*** 1461,1464 ****
--- 1514,1519 ----
(maxima-start)
(setq inferior-maxima-computing-p t)
+ (setq inferior-maxima-running-p t)
+ (setq inferior-maxima-question-p nil)
(comint-send-region inferior-maxima-process beg end)
(comint-send-string inferior-maxima-process "\n"))
***************
*** 1702,1719 ****
(defun maxima-check-level (string)
"Tell when the process is done computing (by looking for the prompt)."
(if (string-match inferior-maxima-prompt string) ;"^(C[0-9]+).*" string)
! (setq inferior-maxima-computing-p nil)
! (cond ((string-match "MAXIMA>>" string)
! (setq inferior-maxima-lisp-level-flag t)
! (setq inferior-maxima-top-level-flag nil)
! (setq inferior-maxima-debug-level-flag nil))
! ((string-match "\(dbm.*" string)
! (setq inferior-maxima-lisp-level-flag nil)
! (setq inferior-maxima-top-level-flag nil)
! (setq inferior-maxima-debug-level-flag t))
! (t
! (setq inferior-maxima-lisp-level-flag nil)
! (setq inferior-maxima-top-level-flag t)
! (setq inferior-maxima-debug-level-flag nil)))))
(defun inferior-maxima-filter (string)
--- 1757,1784 ----
(defun maxima-check-level (string)
"Tell when the process is done computing (by looking for the prompt)."
+ (setq inferior-maxima-result string)
(if (string-match inferior-maxima-prompt string) ;"^(C[0-9]+).*" string)
! (progn
! (setq inferior-maxima-computing-p nil)
! (setq inferior-maxima-question-p nil)
! (cond ((string-match "MAXIMA>>" string)
! (setq inferior-maxima-lisp-level-flag t)
! (setq inferior-maxima-top-level-flag nil)
! (setq inferior-maxima-debug-level-flag nil))
! ((string-match "\(dbm.*" string)
! (setq inferior-maxima-lisp-level-flag nil)
! (setq inferior-maxima-top-level-flag nil)
! (setq inferior-maxima-debug-level-flag t))
! (t
! (setq inferior-maxima-lisp-level-flag nil)
! (setq inferior-maxima-top-level-flag t)
! (setq inferior-maxima-debug-level-flag nil))))
! (if (string-match "?" string)
! (setq inferior-maxima-question-p t)))
! ; (if (string= string "\n")
! ; (setq inferior-maxima-running-p nil)))
! (if (not (and (processp inferior-maxima-process)
! (eq (process-status inferior-maxima-process) 'run)))
! (setq inferior-maxima-running-p nil)))
(defun inferior-maxima-filter (string)
***************
*** 1731,1734 ****
--- 1796,1808 ----
"")
+ (defun maxima-question ()
+ "Return inferior-maxima-result with whitespace trimmed off the ends.
+ For use when the process asks a question."
+ (let ((beg (string-match "[^ \n]" inferior-maxima-result))
+ (end (string-match "?" inferior-maxima-result)))
+ (concat
+ (substring inferior-maxima-result beg (1+ end))
+ " ")))
+
(defun maxima-last-output ()
"Copy the last output from Maxima."
***************
*** 1745,1749 ****
(save-excursion
(end-of-buffer)
! (re-search-backward inferior-maxima-prompt)
(setq out-end (point))
(re-search-backward inferior-maxima-prompt)
--- 1819,1824 ----
(save-excursion
(end-of-buffer)
! (if inferior-maxima-running-p
! (re-search-backward inferior-maxima-prompt))
(setq out-end (point))
(re-search-backward inferior-maxima-prompt)
***************
*** 1758,1790 ****
"Return the last Maxima output, without the prompts"
(interactive)
! (let* ((output (maxima-last-output))
! (newstring)
! (i 0)
! (beg (string-match "\\(^([D][0-9]*) \\)" output))
! (end (1+ (string-match ")" output beg)))
! (k (- end beg)))
;; Replace the output prompt with spaces
! (setq newstring (substring output 0 beg))
! (while (< i k)
! (setq newstring (concat newstring " "))
! (setq i (1+ i)))
! (concat newstring
! (substring output
! end))))
!
! (defun maxima-last-output-tex ()
! "Return the last Maxima output, between the dollar signs."
! (interactive)
! (let* ((output (maxima-last-output))
! (begtex (string-match "\\$\\$" output))
! (endtex (string-match "\\$\\$" output (1+ begtex))))
! (begprompt (string-match "(" output (1+ endtex)))
! (endprompt (string-match ")" output (1+ begprompt))))
! (concat
! "\\texttt{"
! (substring output begprompt (1+ endprompt))
! "}\n"
! (substring output begtex (+ endtex 2))
! "\n"))
(defun maxima-last-output-tex-noprompt ()
--- 1833,1857 ----
"Return the last Maxima output, without the prompts"
(interactive)
! (if (not inferior-maxima-running-p)
! (maxima-last-output)
! (let* ((output (maxima-last-output))
! (newstring)
! (i 0)
! (beg)
! (end)
! (k))
;; Replace the output prompt with spaces
! (setq beg (string-match "\\(^([D][0-9]*) \\)" output))
! (if (not beg)
! output
! (setq end (1+ (string-match ")" output beg)))
! (setq newstring (substring output 0 beg))
! (setq k (- end beg))
! (while (< i k)
! (setq newstring (concat newstring " "))
! (setq i (1+ i)))
! (concat newstring
! (substring output
! end))))))
(defun maxima-last-output-tex-noprompt ()
***************
*** 1798,1868 ****
"\n")))
- (defun maxima-last-output ()
- "Copy the last output from Maxima."
- (interactive)
- (let ((out-start)
- (out-end)
- (old-buffer (current-buffer))
- (maxima-buffer (get-buffer "*maxima*"))
- (output))
- (maxima-wait)
- (if (null maxima-buffer)
- (message "No Maxima output buffer")
- (set-buffer maxima-buffer)
- (save-excursion
- (end-of-buffer)
- (re-search-backward inferior-maxima-prompt)
- (setq out-end (point))
- (re-search-backward inferior-maxima-prompt)
- (forward-line 1)
- (setq out-start (point))
- (setq output
- (buffer-substring-no-properties out-start out-end))))
- (set-buffer old-buffer)
- output))
-
- (defun maxima-last-input-prompt ()
- "Copy the last input-prompt from Maxima."
- (interactive)
- (let ((old-buffer (current-buffer))
- (maxima-buffer (get-buffer "*maxima*"))
- (prompt))
- (maxima-wait)
- (if (null maxima-buffer)
- (message "No Maxima output buffer")
- (set-buffer maxima-buffer)
- (save-excursion
- (end-of-buffer)
- (re-search-backward inferior-maxima-prompt (point-min) nil 2)
- (setq prompt
- (buffer-substring-no-properties (match-beginning 0) (match-end 0))))
- (set-buffer old-buffer)
- prompt)))
-
- ;; (defun maxima-last-input-and-output ()
- ;; "Copy the last input and output from Maxima."
- ;; ;; Since the last input doesn't show up, this isn't terribly
- ;; ;; useful
- ;; (interactive)
- ;; (let ((out-start)
- ;; (out-end)
- ;; (old-buffer (current-buffer))
- ;; (maxima-buffer (get-buffer "*maxima*"))
- ;; (output))
- ;; (maxima-wait)
- ;; (if (null maxima-buffer)
- ;; (message "No Maxima output buffer")
- ;; (set-buffer maxima-buffer)
- ;; (save-excursion
- ;; (end-of-buffer)
- ;; (re-search-backward inferior-maxima-prompt)
- ;; (setq out-end (point))
- ;; (re-search-backward inferior-maxima-prompt)
- ;; (setq out-start (point))
- ;; (setq output
- ;; (buffer-substring-no-properties out-start out-end))))
- ;; (set-buffer old-buffer)
- ;; output))
-
(defun inferior-maxima-filter-accumulate-marker (string)
(setq maxima-debug-filter-accumulator nil)
--- 1865,1868 ----
***************
*** 2308,2313 ****
--- 2308,2317 ----
(progn
(setq inferior-maxima-computing-p t)
+ (setq inferior-maxima-running-p t)
+ (setq inferior-maxima-question-p nil)
(comint-send-input))))
(setq inferior-maxima-computing-p t)
+ (setq inferior-maxima-running-p t)
+ (setq inferior-maxima-question-p nil)
(comint-send-input))))
***************
*** 2316,2319 ****
--- 2320,2325 ----
(interactive)
(setq inferior-maxima-computing-p t)
+ (setq inferior-maxima-running-p t)
+ (setq inferior-maxima-question-p nil)
(comint-send-input))
***************
*** 2400,2408 ****
(define-key map [(meta tab)] 'maxima-complete)
(define-key map [(meta control tab)] 'maxima-smart-complete)
! (define-key map "\C-c\C-h" 'maxima-help)
! (define-key map "\C-c\C-i" 'maxima-info)
! (define-key map "\C-c\C-d" 'maxima-debug-level-help)
(define-key map "\177" 'backward-delete-char-untabify)
! (define-key map "\M-\C-k" 'maxima-stop)
(define-key map "\C-c\C-l" 'maxima-debug-find-and-display-line)
(define-key map "\C-x " 'maxima-debug-set-break)
--- 2406,2414 ----
(define-key map [(meta tab)] 'maxima-complete)
(define-key map [(meta control tab)] 'maxima-smart-complete)
! (define-key map "\C-c\C-d" 'maxima-help)
! (define-key map "\C-c\C-m" 'maxima-info)
! ; (define-key map "\C-c\C-d" 'maxima-debug-level-help)
(define-key map "\177" 'backward-delete-char-untabify)
! (define-key map "\C-c\C-k" 'maxima-stop)
(define-key map "\C-c\C-l" 'maxima-debug-find-and-display-line)
(define-key map "\C-x " 'maxima-debug-set-break)
***************
*** 2517,2521 ****
\\{inferior-maxima-mode-map}
"
! (interactive)
(comint-mode)
(setq comint-prompt-regexp inferior-maxima-prompt)
--- 2523,2527 ----
\\{inferior-maxima-mode-map}
"
! (interactive)
(comint-mode)
(setq comint-prompt-regexp inferior-maxima-prompt)
***************
*** 2535,2539 ****
(add-to-list 'comint-preoutput-filter-functions 'inferior-maxima-filter)
(add-to-list 'comint-output-filter-functions 'maxima-check-level)))
! (set-process-sentinel inferior-maxima-process 'inferior-maxima-sentinel)
(run-hooks 'inferior-maxima-mode-hook))
--- 2541,2553 ----
(add-to-list 'comint-preoutput-filter-functions 'inferior-maxima-filter)
(add-to-list 'comint-output-filter-functions 'maxima-check-level)))
! (unless running-xemacs
! (set-process-sentinel inferior-maxima-process 'inferior-maxima-sentinel))
! (add-hook 'kill-buffer-hook
! (function
! (lambda ()
! (if (processp inferior-maxima-process)
! (delete-process inferior-maxima-process))
! (setq inferior-maxima-process nil)
! (run-hooks 'inferior-maxima-exit-hook))) t t)
(run-hooks 'inferior-maxima-mode-hook))
|
|
From: Jay B. <bel...@us...> - 2001-12-09 19:30:13
|
Update of /cvsroot/maxima/maxima-pre59/emacs In directory usw-pr-cvs1:/tmp/cvs-serv27495/Maxima/maxima-pre59/emacs Added Files: emaxima.lisp Log Message: This is a slightly modified version of imaxima.lisp used for getting TeX output from Maxima. --- NEW FILE: emaxima.lisp --- ;;; This was stolen from imaxima, by Jesper Harder ;;; http://purl.org/harder/imaxima.tar.gz (in-package "MAXIMA") (DEFUN MAIN-PROMPT () (FORMAT () "(~A~D) " (STRIPDOLLAR $INCHAR) $LINENUM)) ;(DEFUN BREAK-PROMPT () ; (declare (special $prompt)) ; (format nil "~A" (STRIPDOLLAR $PROMPT))) (DEFMFUN DISPLA (FORM &aux #+kcl(form form)) (IF (OR (NOT #.TTYOFF) #.WRITEFILEP) (cond #+Franz ($typeset (apply #'$photot (list form))) ((eq $display2d '$emaxima) (latex form)) ($DISPLAY2D (LET ((DISPLAYP T) (LINEARRAY (IF DISPLAYP (MAKE-array 80.) LINEARRAY)) (MRATP (CHECKRAT FORM)) (#.WRITEFILEP #.WRITEFILEP) (MAXHT 1) (MAXDP 0) (WIDTH 0) (HEIGHT 0) (DEPTH 0) (LEVEL 0) (SIZE 2) (BREAK 0) (RIGHT 0) (LINES 1) BKPT (BKPTWD 0) (BKPTHT 1) (BKPTDP 0) (BKPTOUT 0) (BKPTLEVEL 0) IN-P (MOREFLUSH D-MOREFLUSH) MORE-^W (MOREMSG D-MOREMSG)) (UNWIND-PROTECT (PROGN (SETQ FORM (DIMENSION FORM NIL 'MPAREN 'MPAREN 0 0)) (CHECKBREAK FORM WIDTH) (OUTPUT FORM (IF (AND (NOT $LEFTJUST) (= 2 LINES)) (f- LINEL (f- WIDTH BKPTOUT)) 0)) (IF (AND SMART-TTY (NOT (AND SCROLLP (NOT $CURSORDISP))) (> (CAR (CURSORPOS)) (f- TTYHEIGHT 3))) (LET (#.writefilep) (MTERPRI)))) ;; make sure the linearray gets cleared out. (CLEAR-LINEARRAY)))) (T (LINEAR-DISPLA FORM))))) (defun break-dbm-loop (at) (let* ( (*quit-tags* (cons (cons *break-level* *quit-tag*) *quit-tags*)) (*break-level* (if (not at) *break-level* (cons t *break-level*))) (*quit-tag* (cons nil nil)) (*break-env* *break-env*) (*mread-prompt* "") (*diff-bindlist* nil) (*diff-mspeclist* nil) val ) (declare (special *mread-prompt* )) (and (consp at) (set-env at)) (cond ((null at) ($frame 0 nil))) (catch 'step-continue (catch *quit-tag* (unwind-protect (do () (()) (format *debug-io* "~&~@[(~a:~a) ~]" (unless (stringp at) "dbm") (length *quit-tags*)) (setq val (catch 'macsyma-quit (let ((res (dbm-read *debug-io* nil *top-eof* t))) (declare (special *mread-prompt*)) (cond ((and (consp res) (keywordp (car res))) (let ((value (break-call (car res) (cdr res) 'break-command))) (cond ((eq value :resume) (return))) )) (t (setq $__ (nth 2 res)) (setq $% (meval* $__)) (SETQ $_ $__) (displa $%) )) nil ))) (and (eql val 'top) (throw-macsyma-top)) ) (restore-bindings) ))))) (setq $display2d 'true) ;; TeX-printing ;; (c) copyright 1987, Richard J. Fateman ;; Small changes for interfacing with TeXmacs: Andrey Grozin, 2001 ;; Yet more small changes for interfacing with imaxima: Jesper Harder 2001 (declare-top (special lop rop ccol $gcprint $inchar) (*expr tex-lbp tex-rbp)) (defconstant texport t) ;;; myprinc is an intelligent low level printing routine. it keeps track of ;;; the size of the output for purposes of allowing the TeX file to ;;; have a reasonable line-line. myprinc will break it at a space ;;; once it crosses a threshold. ;;; this has nothign to do with breaking the resulting equations. ;- arg: chstr - string or number to princ ;- scheme: This function keeps track of the current location ;- on the line of the cursor and makes sure ;- that a value is all printed on one line (and not divided ;- by the crazy top level os routines) (defun myprinc (chstr) (prog (chlst) (cond ((greaterp (plus (length (setq chlst (exploden chstr))) ccol) 70.) (terpri texport) ;would have exceeded the line length (setq ccol 1.) (myprinc " ") ; lead off with a space for safety )) ;so we split it up. (do ((ch chlst (cdr ch)) (colc ccol (add1 colc))) ((null ch) (setq ccol colc)) (tyo (car ch) texport)))) (defun myterpri nil (cond (texport (terpri texport)) (t (mterpri))) (setq ccol 1)) (defun tex (x l r lop rop) ;; x is the expression of interest; l is the list of strings to its ;; left, r to its right. lop and rop are the operators on the left ;; and right of x in the tree, and will determine if parens must ;; be inserted (setq x (nformat x)) (cond ((atom x) (tex-atom x l r)) ((or (<= (tex-lbp (caar x)) (tex-rbp lop)) (> (tex-lbp rop) (tex-rbp (caar x)))) (tex-paren x l r)) ;; special check needed because macsyma notates arrays peculiarly ((memq 'array (cdar x)) (tex-array x l r)) ;; dispatch for object-oriented tex-ifiying ((get (caar x) 'tex) (funcall (get (caar x) 'tex) x l r)) (t (tex-function x l r nil)))) (defun tex-atom (x l r) ;; atoms: note: can we lose by leaving out {}s ? (append l (list (cond ((numberp x) (texnumformat x)) ((and (symbolp x) (get x 'texword))) ((stringp x) (texstring x)) ((characterp x) (texchar x)) (t (tex-stripdollar x)))) r)) (defun texstring (x) (cond ((equal x "") "") ((eql (elt x 0) #\\) x) ;; (t (concatenate 'string "\\mbox{{}" x "{}}")))) ;; jah: (t (concatenate 'string "\\verb| " x " |")))) (defun texchar (x) (if (eql x #\|) "\\verb/|/" (concatenate 'string "\\verb|" (string x) "|"))) ;; jah: \mbox{\verb} is illegal (defun myquote (str) (let ((var "") (charlist '((#\{ . "\\left\\{\\right.") (#\} . "\\left\\}\\right.") (#\# . "\\#") (#\$ . "\\$") (#\% . "\\%") (#\& . "\\&") (#\_ . "\\_")))) (dotimes (i (length str)) (let ((chari (elt str i))) (setq var (concatenate 'string var (or (cdr (assoc chari charlist)) (string chari)))))) var)) (defun tex-stripdollar (sym) (or (symbolp sym) (return-from tex-stripdollar sym)) (let* ((name (symbol-name sym)) (pname (if (memq (elt name 0) '(#\$ #\&)) (subseq name 1) name)) (l (length pname))) (cond ((eql l 1) (myquote pname)) (t (concatenate 'string "\\mathrm{" (myquote pname) "}"))))) (defun texnumformat(atom) ;; 10/14/87 RJF convert 1.2e20 to 1.2 \cdot 10^{20} (let(r firstpart exponent) (cond ((integerp atom)atom) (t (setq r (explode atom)) (setq exponent (memq 'e r)) ;; is it ddd.ddde+EE (cond ((null exponent) atom); it is not. go with it as given (t (setq firstpart (nreverse (cdr (memq 'e (reverse r))))) (strcat (apply #'strcat firstpart ) "\\cdot 10^{" (apply #'strcat (cdr exponent)) "}"))))))) (defun tex-paren (x l r) (tex x (append l '("\\left(")) (cons "\\right)" r) 'mparen 'mparen)) (defun tex-array (x l r) (let ((f)) (if (eq 'mqapply (caar x)) (setq f (cadr x) x (cdr x)) (setq f (caar x))) (setq l (tex (texword f) l nil lop 'mfunction) r (nconc (tex-list (cdr x) nil (list "}") ",") r)) (nconc l (list "_{") r ))) ;; we could patch this so sin x rather than sin(x), but instead we made sin a prefix ;; operator (defun tex-function (x l r op) op (setq l (tex (texword (caar x)) l nil 'mparen 'mparen) r (tex (cons '(mprogn) (cdr x)) nil r 'mparen 'mparen)) (nconc l r)) ;; set up a list , separated by symbols (, * ...) and then tack on the ;; ending item (e.g. "]" or perhaps ")" (defun tex-list (x l r sym) (if (null x) r (do ((nl)) ((null (cdr x)) (setq nl (nconc nl (tex (car x) l r 'mparen 'mparen))) nl) ; (setq nl (nconc nl (tex (car x) l (list sym) 'mparen 'mparen)) (setq nl (nconc nl (tex (car x) l (list (concat sym "\\linebreak[0]")) 'mparen 'mparen)) x (cdr x) l nil)))) (defun tex-prefix (x l r) (tex (cadr x) (append l (texsym (caar x))) r (caar x) rop)) (defun tex-infix (x l r) ;; check for 2 args (if (or (null (cddr x)) (cdddr x)) (wna-err (caar x))) (setq l (tex (cadr x) l nil lop (caar x))) (tex (caddr x) (append l (texsym (caar x))) r (caar x) rop)) (defun tex-postfix (x l r) (tex (cadr x) l (append (texsym (caar x)) r) lop (caar x))) (defun tex-nary (x l r) (let* ((op (caar x)) (sym (texsym op)) (y (cdr x)) (ext-lop lop) (ext-rop rop)) (cond ((null y) (tex-function x l r t)) ; this should not happen ((null (cdr y)) (tex-function x l r t)) ; this should not happen, too (t (do ((nl) (lop ext-lop op) (rop op (if (null (cdr y)) ext-rop op))) ((null (cdr y)) (setq nl (nconc nl (tex (car y) l r lop rop))) nl) (setq nl (nconc nl (tex (car y) l (list sym) lop rop)) y (cdr y) l nil)))))) (defun tex-nofix (x l r) (tex (caar x) l r (caar x) rop)) (defun tex-matchfix (x l r) (setq l (append l (car (texsym (caar x)))) ;; car of texsym of a matchfix operator is the lead op r (append (cdr (texsym (caar x))) r) ;; cdr is the trailing op x (tex-list (cdr x) nil r ",")) (append l x)) (defun texsym (x) (or (get x 'texsym) (get x 'strsym)(get x 'dissym) (stripdollar x))) (defun texword (x)(or (get x 'texword) (stripdollar x))) (defprop bigfloat tex-bigfloat tex) (defun tex-bigfloat (x l r) (fpformat x)) (defprop mprog "\\mathbf{block}\\;" texword) (defprop %erf "\\mathrm{erf}" texword) (defprop $erf "\\mathrm{erf}" texword) ;; etc for multicharacter names (defprop $true "\\mathbf{true}" texword) (defprop $false "\\mathbf{false}" texword) (defprop mprogn tex-matchfix tex) ;; mprogn is (<progstmnt>, ...) (defprop mprogn (("\\left(") "\\right)") texsym) (defprop mlist tex-matchfix tex) (defprop mlist (("\\left[ ")" \\right] ") texsym) ;;absolute value (defprop mabs tex-matchfix tex) (defprop mabs (("\\left| ")"\\right| ") texsym) (defprop mqapply tex-mqapply tex) (defun tex-mqapply (x l r) (setq l (tex (cadr x) l (list "(" ) lop 'mfunction) r (tex-list (cddr x) nil (cons ")" r) ",")) (append l r));; fixed 9/24/87 RJF (defprop $%i "i" texword) (defprop $%pi "\\pi" texword) (defprop $%e "e" texword) (defprop $inf "\\infty " texword) (defprop $minf " -\\infty " texword) (defprop %laplace "\\mathcal{L}" texword) ;; jah (defprop $alpha "\\alpha" texword) (defprop $beta "\\beta" texword) (defprop $gamma "\\gamma" texword) (defprop %gamma "\\Gamma" texword) (defprop $%gamma "\\gamma" texword) (defprop $delta "\\delta" texword) (defprop $epsilon "\\varepsilon" texword) (defprop $zeta "\\zeta" texword) (defprop $eta "\\eta" texword) (defprop $theta "\\vartheta" texword) (defprop $iota "\\iota" texword) (defprop $kappa "\\varkappa" texword) ;(defprop $lambda "\\lambda" texword) (defprop $mu "\\mu" texword) (defprop $nu "\\nu" texword) (defprop $xi "\\xi" texword) (defprop $pi "\\pi" texword) (defprop $rho "\\rho" texword) (defprop $sigma "\\sigma" texword) (defprop $tau "\\tau" texword) (defprop $upsilon "\\upsilon" texword) (defprop $phi "\\varphi" texword) (defprop $chi "\\chi" texword) (defprop $psi "\\psi" texword) (defprop $omega "\\omega" texword) (defprop mquote tex-prefix tex) (defprop mquote ("'") texsym) (defprop mquote 201. tex-rbp) (defprop msetq tex-infix tex) (defprop msetq (":") texsym) (defprop msetq 180. tex-rbp) (defprop msetq 20. tex-rbp) (defprop mset tex-infix tex) (defprop mset ("::") texsym) (defprop mset 180. tex-lbp) (defprop mset 20. tex-rbp) (defprop mdefine tex-infix tex) (defprop mdefine (":=") texsym) (defprop mdefine 180. tex-lbp) (defprop mdefine 20. tex-rbp) (defprop mdefmacro tex-infix tex) (defprop mdefmacro ("::=") texsym) (defprop mdefmacro 180. tex-lbp) (defprop mdefmacro 20. tex-rbp) (defprop marrow tex-infix tex) (defprop marrow ("\\rightarrow ") texsym) (defprop marrow 25 tex-lbp) (defprop marrow 25 tex-rbp) (defprop mfactorial tex-postfix tex) (defprop mfactorial ("!") texsym) (defprop mfactorial 160. tex-lbp) (defprop mexpt tex-mexpt tex) (defprop mexpt 140. tex-lbp) (defprop mexpt 139. tex-rbp) ;; insert left-angle-brackets for mncexpt. a^<n> is how a^^n looks. (defun tex-mexpt (x l r) (let((nc (eq (caar x) 'mncexpt))); true if a^^b rather than a^b ;; here is where we have to check for f(x)^b to be displayed ;; as f^b(x), as is the case for sin(x)^2 . ;; which should be sin^2 x rather than (sin x)^2 or (sin(x))^2. ;; yet we must not display (a+b)^2 as +^2(a,b)... ;; or (sin(x))^(-1) as sin^(-1)x, which would be arcsine x (cond ;; this whole clause ;; should be deleted if this hack is unwanted and/or the ;; time it takes is of concern. ;; it shouldn't be too expensive. ((and (eq (caar x) 'mexpt) ; don't do this hack for mncexpt (let* ((fx (cadr x)); this is f(x) (f (and (not (atom fx)) (atom (caar fx)) (caar fx))) ; this is f [or nil] (bascdr (and f (cdr fx))) ; this is (x) [maybe (x,y..), or nil] (expon (caddr x)) ;; this is the exponent (doit (and f ; there is such a function (memq (getchar f 1) '(% $)) ;; insist it is a % or $ function (not (memq f '(%sum %product))) ;; what else? what a hack... (or (and (atom expon) (not (numberp expon))) ; f(x)^y is ok (and (atom expon) (numberp expon) (> expon 0)))))) ; f(x)^3 is ok, but not f(x)^-1, which could ; inverse of f, if written f^-1 x ; what else? f(x)^(1/2) is sqrt(f(x)), ?? (cond (doit (setq l (tex `((mexpt) ,f ,expon) l nil 'mparen 'mparen)) (setq r (tex (if (and (null (cdr bascdr)) (eq (get f 'tex) 'tex-prefix)) (car bascdr) (cons '(mprogn) bascdr)) nil r f rop))) (t nil))))) ; won't doit. fall through (t (setq l (tex (cadr x) l nil lop (caar x)) r (if (mmminusp (setq x (nformat (caddr x)))) ;; the change in base-line makes parens unnecessary (if nc (tex (cadr x) '("^ {-\\langle ")(cons "\\rangle }" r) 'mparen 'mparen) (tex (cadr x) '("^ {- ")(cons " }" r) 'mparen 'mparen)) (if nc (tex x (list "^{\\langle ")(cons "\\rangle}" r) 'mparen 'mparen) (tex x (list "^{")(cons "}" r) 'mparen 'mparen)))))) (append l r))) (defprop mncexpt tex-mexpt tex) (defprop mncexpt 135. tex-lbp) (defprop mncexpt 134. tex-rbp) (defprop mnctimes tex-nary tex) (defprop mnctimes "\\cdot " texsym) (defprop mnctimes 110. tex-lbp) (defprop mnctimes 109. tex-rbp) (defprop mtimes tex-nary tex) (defprop mtimes "\\*" texsym) (defprop mtimes 120. tex-lbp) (defprop mtimes 120. tex-rbp) (defprop %sqrt tex-sqrt tex) (defun tex-sqrt(x l r) ;; format as \\sqrt { } assuming implicit parens for sqr grouping (tex (cadr x) (append l '("\\sqrt{")) (append '("}") r) 'mparen 'mparen)) ;; macsyma doesn't know about cube (or nth) roots, ;; but if it did, this is what it would look like. (defprop $cubrt tex-cubrt tex) (defun tex-cubrt (x l r) (tex (cadr x) (append l '("\\root 3 \\of{")) (append '("}") r) 'mparen 'mparen)) (defprop mquotient tex-mquotient tex) (defprop mquotient ("\\over") texsym) (defprop mquotient 122. tex-lbp) ;;dunno about this (defprop mquotient 123. tex-rbp) (defun tex-mquotient (x l r) (if (or (null (cddr x)) (cdddr x)) (wna-err (caar x))) (setq l (tex (cadr x) (append l '("{{")) nil 'mparen 'mparen) ;the divide bar groups things r (tex (caddr x) (list "}\\over{") (append '("}}")r) 'mparen 'mparen)) (append l r)) (defprop $matrix tex-matrix tex) (defun tex-matrix(x l r) ;;matrix looks like ((mmatrix)((mlist) a b) ...) (append l `("\\pmatrix{") (mapcan #'(lambda(y) (tex-list (cdr y) nil (list "\\cr ") "&")) (cdr x)) '("}") r)) ;; macsyma sum or prod is over integer range, not low <= index <= high ;; TeX is lots more flexible .. but (defprop %sum tex-sum tex) (defprop %lsum tex-lsum tex) (defprop %product tex-sum tex) ;; easily extended to union, intersect, otherops (defun tex-lsum(x l r) (let ((op (cond ((eq (caar x) '%lsum) "\\sum_{") ;; extend here )) ;; gotta be one of those above (s1 (tex (cadr x) nil nil 'mparen rop));; summand (index ;; "index = lowerlimit" (tex `((min simp) , (caddr x), (cadddr x)) nil nil 'mparen 'mparen))) (append l `( ,op ,@index "}}{" ,@s1 "}") r))) (defun tex-sum(x l r) (let ((op (cond ((eq (caar x) '%sum) "\\sum_{") ((eq (caar x) '%product) "\\prod_{") ;; extend here )) ;; gotta be one of those above (s1 (tex (cadr x) nil nil 'mparen rop));; summand (index ;; "index = lowerlimit" (tex `((mequal simp) ,(caddr x),(cadddr x)) nil nil 'mparen 'mparen)) (toplim (tex (car(cddddr x)) nil nil 'mparen 'mparen))) (append l `( ,op ,@index "}^{" ,@toplim "}{" ,@s1 "}") r))) (defprop %integrate tex-int tex) (defun tex-int (x l r) (let ((s1 (tex (cadr x) nil nil 'mparen 'mparen));;integrand delims / & d (var (tex (caddr x) nil nil 'mparen rop))) ;; variable (cond((= (length x) 3) (append l `("\\int {" ,@s1 "}{\\;d" ,@var "}") r)) (t ;; presumably length 5 (let ((low (tex (nth 3 x) nil nil 'mparen 'mparen)) ;; 1st item is 0 (hi (tex (nth 4 x) nil nil 'mparen 'mparen))) (append l `("\\int_{" ,@low "}^{" ,@hi "}{" ,@s1 "\\;d" ,@var "}") r)))))) (defprop %limit tex-limit tex) (defun tex-limit(x l r) ;; ignoring direction, last optional arg to limit (let ((s1 (tex (cadr x) nil nil 'mparen rop));; limitfunction (subfun ;; the thing underneath "limit" (subst "\\rightarrow " '= (tex `((mequal simp) ,(caddr x),(cadddr x)) nil nil 'mparen 'mparen)))) (append l `("\\lim_{" ,@subfun "}{" ,@s1 "}") r))) (defprop %at tex-at tex) ;; e.g. at(diff(f(x)),x=a) (defun tex-at (x l r) (let ((s1 (tex (cadr x) nil nil lop rop)) (sub (tex (caddr x) nil nil 'mparen 'mparen))) (append l '("\\left.") s1 '("\\right|_{") sub '("}") r))) ;; (defprop mbox tex-mbox tex) ;; (defun tex-mbox (x l r) ;; (append l '("\\fbox{") (tex (cadr x) nil nil 'mparen 'mparen) '("}"))) ; jh ;;binomial coefficients (defprop %binomial tex-choose tex) (defun tex-choose (x l r) `(,@l "\\pmatrix{" ,@(tex (cadr x) nil nil 'mparen 'mparen) "\\\\" ,@(tex (caddr x) nil nil 'mparen 'mparen) "}" ,@r)) (defprop rat tex-rat tex) (defprop rat 120. tex-lbp) (defprop rat 121. tex-rbp) (defun tex-rat(x l r) (tex-mquotient x l r)) (defprop mplus tex-mplus tex) (defprop mplus 100. tex-lbp) (defprop mplus 100. tex-rbp) (defun tex-mplus (x l r) ;(declare (fixnum w)) (cond ((memq 'trunc (car x))(setq r (cons "+\\cdots " r)))) (cond ((null (cddr x)) (if (null (cdr x)) (tex-function x l r t) (tex (cadr x) (cons "+" l) r 'mplus rop))) (t (setq l (tex (cadr x) l nil lop 'mplus) x (cddr x)) (do ((nl l) (dissym)) ((null (cdr x)) (if (mmminusp (car x)) (setq l (cadar x) dissym (list "-")) (setq l (car x) dissym (list "+"))) (setq r (tex l dissym r 'mplus rop)) (append nl r)) (if (mmminusp (car x)) (setq l (cadar x) dissym (list "-")) (setq l (car x) dissym (list "+"))) (setq nl (append nl (tex l dissym nil 'mplus 'mplus)) x (cdr x)))))) (defprop mminus tex-prefix tex) (defprop mminus ("-") texsym) (defprop mminus 100. tex-rbp) (defprop mminus 100. tex-lbp) (defprop min tex-infix tex) (defprop min ("\\in{") texsym) (defprop min 80. tex-lbp) (defprop min 80. tex-rbp) (defprop mequal tex-infix tex) (defprop mequal (=) texsym) (defprop mequal 80. tex-lbp) (defprop mequal 80. tex-rbp) (defprop mnotequal tex-infix tex) (defprop mnotequal 80. tex-lbp) (defprop mnotequal 80. tex-rbp) (defprop mgreaterp tex-infix tex) (defprop mgreaterp (>) texsym) (defprop mgreaterp 80. tex-lbp) (defprop mgreaterp 80. tex-rbp) (defprop mgeqp tex-infix tex) (defprop mgeqp ("\\geq") texsym) (defprop mgeqp 80. tex-lbp) (defprop mgeqp 80. tex-rbp) (defprop mlessp tex-infix tex) (defprop mlessp (<) texsym) (defprop mlessp 80. tex-lbp) (defprop mlessp 80. tex-rbp) (defprop mleqp tex-infix tex) (defprop mleqp ("\\leq") texsym) (defprop mleqp 80. tex-lbp) (defprop mleqp 80. tex-rbp) (defprop mnot tex-prefix tex) (defprop mnot ("\\not ") texsym) (defprop mnot 70. tex-rbp) (defprop mand tex-nary tex) (defprop mand ("\\and") texsym) (defprop mand 60. tex-lbp) (defprop mand 60. tex-rbp) (defprop mor tex-nary tex) (defprop mor ("\\or") texsym) ;; make sin(x) display as sin x , but sin(x+y) as sin(x+y) ;; etc (defun tex-setup (x) (let((a (car x)) (b (cadr x))) (setf (get a 'tex) 'tex-prefix) (setf (get a 'texword) b) ;This means "sin" will always be roman (setf (get a 'texsym) (list b)) (setf (get a 'tex-rbp) 130))) (mapc #'tex-setup '( (%sin "\\sin ") (%cos "\\cos ") (%tan "\\tan ") (%cot "\\cot ") (%sec "\\sec ") (%csc "\\csc ") (%asin "\\arcsin ") (%acos "\\arccos ") (%atan "\\arctan ") (%sinh "\\sinh ") (%cosh "\\cosh ") (%tanh "\\tanh ") (%coth "\\coth ") (%sech "{\\rm sech}") ;; jah (%ln "\\ln ") (%log "\\log ") ;; (%erf "{\\rm erf}") this would tend to set erf(x) as erf x. Unusual ;(%laplace "{\\cal L}") )) ;; etc (defprop mor tex-nary tex) (defprop mor 50. tex-lbp) (defprop mor 50. tex-rbp) (defprop mcond tex-mcond tex) (defprop mcond 25. tex-lbp) (defprop mcond 25. tex-rbp) (defprop %derivative tex-derivative tex) (defun tex-derivative (x l r) (tex (tex-d x '$|d|) l r lop rop )) (defun tex-d(x dsym) ;dsym should be $d or "$d\\partial" ;; format the macsyma derivative form so it looks ;; sort of like a quotient times the deriva-dand. (let* ((arg (cadr x)) ;; the function being differentiated (difflist (cddr x)) ;; list of derivs e.g. (x 1 y 2) (ords (odds difflist 0)) ;; e.g. (1 2) (vars (odds difflist 1)) ;; e.g. (x y) (numer `((mexpt) $|d| ((mplus) ,@ords))) ; d^n numerator (denom (cons '(mtimes) (mapcan #'(lambda(b e) `(,dsym ,(simplifya `((mexpt) ,b ,e) nil))) vars ords)))) `((mtimes) ((mquotient) ,(simplifya numer nil) ,denom) ,arg))) (defun odds(n c) ;; if c=1, get the odd terms (first, third...) (cond ((null n) nil) ((= c 1)(cons (car n)(odds (cdr n) 0))) ((= c 0)(odds (cdr n) 1)))) (defun tex-mcond (x l r) (append l (tex (cadr x) '("\\mathbf{if}\\;") '("\\;\\mathbf{then}\\;") 'mparen 'mparen) (if (eql (fifth x) '$false) (tex (caddr x) nil r 'mcond rop) (append (tex (caddr x) nil nil 'mparen 'mparen) (tex (fifth x) '("\\;\\mathbf{else}\\;") r 'mcond rop))))) (defprop mdo tex-mdo tex) (defprop mdo 30. tex-lbp) (defprop mdo 30. tex-rbp) (defprop mdoin tex-mdoin tex) (defprop mdoin 30. tex-rbp) (defun tex-lbp(x)(cond((get x 'tex-lbp))(t(lbp x)))) (defun tex-rbp(x)(cond((get x 'tex-rbp))(t(lbp x)))) ;; these aren't quite right (defun tex-mdo (x l r) (tex-list (texmdo x) l r "\\;")) (defun tex-mdoin (x l r) (tex-list (texmdoin x) l r "\\;")) (defun texmdo (x) (nconc (cond ((second x) `("\\mathbf{for}" ,(second x)))) (cond ((equal 1 (third x)) nil) ((third x) `("\\mathbf{from}" ,(third x)))) (cond ((equal 1 (fourth x)) nil) ((fourth x) `("\\mathbf{step}" ,(fourth x))) ((fifth x) `("\\mathbf{next}" ,(fifth x)))) (cond ((sixth x) `("\\mathbf{thru}" ,(sixth x)))) (cond ((null (seventh x)) nil) ((eq 'mnot (caar (seventh x))) `("\\mathbf{while}" ,(cadr (seventh x)))) (t `("\\mathbf{unless}" ,(seventh x)))) `("\\mathbf{do}" ,(eighth x)))) (defun texmdoin (x) (nconc `("\\mathbf{for}" ,(second x) $|in| ,(third x)) (cond ((sixth x) `("\\mathbf{thru}" ,(sixth x)))) (cond ((null (seventh x)) nil) ((eq 'mnot (caar (seventh x))) `("\\mathbf{while}" ,(cadr (seventh x)))) (t `("\\mathbf{unless}" ,(seventh x)))) `("\\mathbf{do}" ,(eighth x)))) ;; Undone and trickier: ;; handle reserved symbols stuff, just in case someone ;; has a macsyma variable named (yuck!!) \over or has a name with ;; {} in it. ;; Maybe do some special hacking for standard notations for ;; hypergeometric fns, alternative summation notations 0<=n<=inf, etc. ;;Undone and really pretty hard: line breaking (defprop mtext tex-mtext tex) (defprop text-string tex-mtext tex) (defprop mlable tex-mlable tex) (defprop spaceout tex-spaceout tex) (defun tex-mtext (x l r) (tex-list (cdr x) l r "")) (defun tex-mlable (x l r) (tex (caddr x) (append l (if (cadr x) (list (format nil "(~A) " (stripdollar (cadr x)))) nil)) r 'mparen 'mparen)) (defun tex-spaceout (x l r) (append l (list "\\verb|" (make-string (cadr x) :initial-element #\space) "|") r)) ; jh: verb & mbox (defun latex (x) (let ((ccol 1)) (mapc #'myprinc (if (and (listp x) (cdr x) (stringp (cadr x)) (equal (string-right-trim '(#\Space) (cadr x)) "Is")) (tex x '("") '("") 'mparen 'mparen) (tex x '("") '(" ") 'mparen 'mparen))) )) |
|
From: Jay B. <bel...@us...> - 2001-12-09 19:29:11
|
Update of /cvsroot/maxima/maxima-pre59/emacs
In directory usw-pr-cvs1:/tmp/cvs-serv27038/Maxima/maxima-pre59/emacs
Modified Files:
emaxima.sty
Log Message:
The abilities of maximadoc were merged into emaxima.
Various minor changes and bugfixes.
Index: emaxima.sty
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/emacs/emaxima.sty,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** emaxima.sty 2001/11/08 22:22:09 1.1
--- emaxima.sty 2001/12/09 19:29:07 1.2
***************
*** 6,39 ****
%% I may even have written myself.
! %% A macro for writing Maxima in the ``proper'' font -- added by WMS
!
! \def\Maxima{{\sffamily\slshape Maxima\/}}
! \def\maximaheadersize{\tiny}
!
!
! %% An if to allow the lines to be turned on and off
\newif\ifmaximalines
\maximalinestrue
-
- %% Let's use some local macros
-
- \catcode`\@=11\relax
- \newdimen\maximainputbaselineskip
- \newdimen\maximaoutputbaselineskip
\newdimen\premaximaspace
\newdimen\postmaximaspace
!
! %% Here are the values that the user may wish to change.
! %% They can be changed here or in the main TeX file.
\font\maximainputfont = cmtt10
! \maximainputbaselineskip = 10pt
\font\maximaoutputfont = cmtt10
! \maximaoutputbaselineskip = 14pt
! \premaximaspace = 0pt
! \postmaximaspace = 1.5ex
%% First of all, set up some delimiters
--- 6,73 ----
%% I may even have written myself.
! %% Here are the values that the user may wish to change.
! %% They can be changed here or in the main TeX file.
+ %% For normal cells
\newif\ifmaximalines
\maximalinestrue
\newdimen\premaximaspace
+ \premaximaspace = 0pt
\newdimen\postmaximaspace
! \postmaximaspace = 1.5ex
+ %% For the input
\font\maximainputfont = cmtt10
! \newdimen\maximainputbaselineskip
! \maximainputbaselineskip = \baselineskip %10pt
+ %% For the output
\font\maximaoutputfont = cmtt10
! \newdimen\maximaoutputbaselineskip
! \maximaoutputbaselineskip = \baselineskip %14pt
! %% For session cells
! \newif\ifmaximasessionlines
! \maximasessionlinesfalse
! \newdimen\premaximasessionspace
! \premaximasessionspace = 0pt
! \newdimen\postmaximasessionspace
! \postmaximasessionspace = 1.5ex
!
! %% For a normal session
! \font\maximasessionoutputfont = cmtt10
! \newdimen\maximasessionbaselineskip
! \maximasessionbaselineskip = \baselineskip %16pt
!
! %% For a TeX session
! \newdimen\maximatexsessionbaselineskip
! \maximatexsessionbaselineskip = \baselineskip %16pt
! \def\maximapromptcolor{red}
! \def\maximainputcolor{blue}
! \def\maximaoutputcolor{blue}
! \def\maximasessionnocolor{
! \def\maximapromptcolor{black}
! \def\maximainputcolor{black}
! \def\maximaoutputcolor{black}
! }
!
! %% Some things are handled differently when pdflatex is used.
!
! \ifx\pdfoutput\undefined
! \usepackage{color}
! \else
! \usepackage[pdftex]{color}
! \usepackage{pdfcolmk}
! \color{black}
! \fi
!
! %% A macro for writing Maxima in the ``proper'' font
!
! \def\Maxima{{\sffamily\slshape Maxima\/}}
! \def\maximaheadersize{\tiny}
!
! %% Let's use some local macros
!
! \catcode`\@=11\relax
%% First of all, set up some delimiters
***************
*** 45,53 ****
\font\m@ximaheaderfont=cmtt8 scaled 800
\setbox0=\hbox{\m@ximaheaderfont\ Initial}
! \newdimen\in@t
! \in@t = \wd0
! \advance\in@t by 1em
! \def\sm@llsk{\vskip 1ex}
\def\m@ximatop{
--- 79,87 ----
\font\m@ximaheaderfont=cmtt8 scaled 800
\setbox0=\hbox{\m@ximaheaderfont\ Initial}
! \newdimen\in@tmaxima
! \in@tmaxima = \wd0
! \advance\in@tmaxima by 1em
! \def\maximasm@llsk{\vskip 1ex}
\def\m@ximatop{
***************
*** 80,84 ****
\lower .4ex \hbox{\m@ximaheaderfont\ #1}
\hrulefill
! \vrule height .4pt depth 0pt width \in@t
\vrule depth 1ex height .3pt width .4pt}
\vskip 1ex}
--- 114,118 ----
\lower .4ex \hbox{\m@ximaheaderfont\ #1}
\hrulefill
! \vrule height .4pt depth 0pt width \in@tmaxima
\vrule depth 1ex height .3pt width .4pt}
\vskip 1ex}
***************
*** 120,136 ****
}
- \def\m@ximagraphicsoutput{
- \vskip -1ex
- \hbox to \hsize{\hskip 1.5em
- \vrule height .4pt depth 0pt width 3em
- \lower .4ex \hbox{\m@ximaheaderfont\ Graphics}
- \hrulefill
- \hskip 1.5em
- }
- \vskip 1ex
- }
-
-
-
\def\m@ximabottom{
\hbox to \hsize{\vrule depth 0ex height 1ex width .4pt
--- 154,157 ----
***************
*** 146,150 ****
%% environment from "TeX for the Impatient" and Tim Morgan's verbtim2.tex
! \def\deactivate{%
\catcode`\{ = 12
\catcode`\} = 12
--- 167,171 ----
%% environment from "TeX for the Impatient" and Tim Morgan's verbtim2.tex
! \def\maximadeactivate{%
\catcode`\{ = 12
\catcode`\} = 12
***************
*** 160,173 ****
{\catcode`\^^M=13
! {\catcode`\ =13\gdef\verbatimdefs{\def^^M{\ \par}\let =\ }}
\gdef\verbatimgobble#1^^M{}}
\def\m@ximainputverbatim{
\begingroup
! \setlength{\parskip}{0pt} %% added by WMS
\par
\maximainputfont
! \deactivate
! \verbatimdefs
\catcode`\ =13
\catcode`\^^M=13
--- 181,194 ----
{\catcode`\^^M=13
! {\catcode`\ =13\gdef\maximaverbatimdefs{\def^^M{\ \par}\let =\ }}
\gdef\verbatimgobble#1^^M{}}
\def\m@ximainputverbatim{
\begingroup
! \setlength{\parskip}{0pt}
\par
\maximainputfont
! \maximadeactivate
! \maximaverbatimdefs
\catcode`\ =13
\catcode`\^^M=13
***************
*** 181,198 ****
%% since the input can be ended with more than one delimiter.
! \def\uncatcodespecials{\def\do##1{\catcode`##1=12 }\dospecials}
\chardef\active=13
- \def\obeyspaces{\catcode`\ =\active}
{\catcode`\^^M=\active %
- \gdef\obeylines{\catcode`\^^M=\active \let^^M=\par}%
\global\let^^M=\par} %
-
\def\setupm@ximaverbatim{\maximaoutputfont
! \obeylines \uncatcodespecials \obeyspaces}
{\obeyspaces\global\let =\ }
-
\def\m@ximaoutputverbatim{\par\begingroup
\baselineskip = \maximaoutputbaselineskip
--- 202,215 ----
%% since the input can be ended with more than one delimiter.
! \def\maximauncatcodespecials{\def\do##1{\catcode`##1=12 }\dospecials}
\chardef\active=13
{\catcode`\^^M=\active %
\global\let^^M=\par} %
\def\setupm@ximaverbatim{\maximaoutputfont
! \obeylines \maximauncatcodespecials \obeyspaces}
{\obeyspaces\global\let =\ }
\def\m@ximaoutputverbatim{\par\begingroup
\baselineskip = \maximaoutputbaselineskip
***************
*** 207,252 ****
\newif\ifm@ximaoutput
\newif\ifm@ximatexoutput
- \newif\ifm@ximagraphics
! \def\not@k{}
%% The top delimiter depends on whether or not it is an initial cell,
%% etc.
! \def\maxima{
\begingroup
\par \vskip \premaximaspace \par
\baselineskip = \maximainputbaselineskip
\m@ximainputtrue
! \futurelet\nextchar\m@xima
}
\def\m@xima{
! \ifx\nextchar [%
! \let\next = \m@ximainit
\else
! \ifx\nextchar <%
! \let\next = \m@ximapart
\else
! \let\next = \m@ximastart
\fi
\fi
! \next
}
\def\m@ximainit[#1]{
! \futurelet\nextchar%
\m@xima@nit}
\def\m@xima@nit{
! \ifx\nextchar <%
! \let\next = \m@ximainitpart
\else
! \let\next = \m@ximainitonly
\fi
! \next
}
-
\def\m@ximainitonly{
\par
--- 224,267 ----
\newif\ifm@ximaoutput
\newif\ifm@ximatexoutput
! \def\maximanot@k{}
%% The top delimiter depends on whether or not it is an initial cell,
%% etc.
! \def\beginmaxima{
\begingroup
\par \vskip \premaximaspace \par
\baselineskip = \maximainputbaselineskip
\m@ximainputtrue
! \futurelet\maximanextchar\m@xima
}
\def\m@xima{
! \ifx\maximanextchar [%
! \let\maximanext = \m@ximainit
\else
! \ifx\maximanextchar <%
! \let\maximanext = \m@ximapart
\else
! \let\maximanext = \m@ximastart
\fi
\fi
! \maximanext
}
\def\m@ximainit[#1]{
! \futurelet\maximanextchar%
\m@xima@nit}
\def\m@xima@nit{
! \ifx\maximanextchar <%
! \let\maximanext = \m@ximainitpart
\else
! \let\maximanext = \m@ximainitonly
\fi
! \maximanext
}
\def\m@ximainitonly{
\par
***************
*** 254,258 ****
\par
\ifmaximalines\m@ximainittop\fi
! \sm@llsk
\m@ximainputverbatim
}
--- 269,273 ----
\par
\ifmaximalines\m@ximainittop\fi
! \maximasm@llsk
\m@ximainputverbatim
}
***************
*** 264,278 ****
\par
\ifmaximalines\m@ximatop\fi
! \sm@llsk
\m@ximainputverbatim
}
-
\def\m@ximapart<#1:#2>{
\par
\vskip 1.5ex
\par
! \def\testt@k{#2}
! \ifx\testt@k\not@k
\def\m@ximaparttext{Definition of package #1}
\else
--- 279,292 ----
\par
\ifmaximalines\m@ximatop\fi
! \maximasm@llsk
\m@ximainputverbatim
}
\def\m@ximapart<#1:#2>{
\par
\vskip 1.5ex
\par
! \def\maximatestt@k{#2}
! \ifx\maximatestt@k\maximanot@k
\def\m@ximaparttext{Definition of package #1}
\else
***************
*** 280,288 ****
\fi
\ifmaximalines\m@ximaparttop\m@ximaparttext\fi
! \futurelet\nextchar\m@ximap@rt
}
\def\m@ximap@rt{
! \sm@llsk
\m@ximainputverbatim
}
--- 294,302 ----
\fi
\ifmaximalines\m@ximaparttop\m@ximaparttext\fi
! \futurelet\maximanextchar\m@ximap@rt
}
\def\m@ximap@rt{
! \maximasm@llsk
\m@ximainputverbatim
}
***************
*** 292,297 ****
\vskip 1.5ex
\par
! \def\testt@k{#2}
! \ifx\testt@k\not@k
\def\m@ximaparttext{Definition of package #1}
\else
--- 306,311 ----
\vskip 1.5ex
\par
! \def\maximatestt@k{#2}
! \ifx\maximatestt@k\maximanot@k
\def\m@ximaparttext{Definition of package #1}
\else
***************
*** 299,332 ****
\fi
\ifmaximalines\m@ximainitparttop\m@ximaparttext\fi
! \futurelet\nextchar\m@ximap@rt
}
-
%% Now to take care of the various types of output
! \def\output{
\endm@ximainputverbatim
! \sm@llsk
\m@ximainputfalse
\m@ximaoutputtrue
\ifmaximalines\m@ximaoutput\fi
! % \sm@llsk
\m@ximaoutputverbatim
}
! \def\outputtex{
\endm@ximainputverbatim
! \sm@llsk
\m@ximainputfalse
\m@ximatexoutputtrue
\ifmaximalines\m@ximatexoutput\fi
! \sm@llsk
\begingroup
! % \def\par{}
! % $$
}
! \def\@ndtexoutput{
! % $$
\endgroup
\m@ximatexoutputfalse
--- 313,347 ----
\fi
\ifmaximalines\m@ximainitparttop\m@ximaparttext\fi
! \futurelet\maximanextchar\m@ximap@rt
}
%% Now to take care of the various types of output
! \def\maximaoutput{
\endm@ximainputverbatim
! \maximasm@llsk
\m@ximainputfalse
\m@ximaoutputtrue
\ifmaximalines\m@ximaoutput\fi
! % \maximasm@llsk
\m@ximaoutputverbatim
}
! \def\m@ximatexd#1\\{ \[ #1 \]\endgroup}
!
! \def\maximatexoutput{
\endm@ximainputverbatim
! \maximasm@llsk
\m@ximainputfalse
\m@ximatexoutputtrue
\ifmaximalines\m@ximatexoutput\fi
! \maximasm@llsk
\begingroup
! \def\D{\begingroup\par\m@ximatexd}
! \def\p{\begingroup\setupm@ximasessionverbatim\dom@ximasessionpreprompt}
! \maximaoutputfont
}
! \def\@ndmaximatexoutput{
\endgroup
\m@ximatexoutputfalse
***************
*** 334,364 ****
}
- %% If the output is graphics, we'll need to load epsf.tex, but there's
- %% no need to load it if there are no graphics, and there is no need
- %% to load it more than once.
-
- \newif\ifnogr@phics
- \nogr@phicstrue
- \def\outputgraphics{
- \endm@ximainputverbatim
- \sm@llsk
- \m@ximainputfalse
- \m@ximagraphicstrue
- \ifnogr@phics
- \input epsf.tex
- \nogr@phicsfalse
- \fi
- \ifmaximalines\m@ximagraphicsoutput\fi
- \sm@llsk
- }
-
- \def\@ndoutputgraphics{}
-
- %% We'll need to have a macro for the graphics
-
- \def\mgraphics#1#2{
- \centerline{ \epsfxsize = #1 \epsfbox{#2}}
- }
-
\def\endmaxima{
\ifm@ximainput
--- 349,352 ----
***************
*** 367,378 ****
\else
\ifm@ximatexoutput
! \@ndtexoutput
! \else
! \ifm@ximagraphics
! \@ndoutputgraphics
! \fi
\fi
\fi
! \sm@llsk
\ifmaximalines\m@ximabottom\fi
\par
--- 355,362 ----
\else
\ifm@ximatexoutput
! \@ndmaximatexoutput
\fi
\fi
! \maximasm@llsk
\ifmaximalines\m@ximabottom\fi
\par
***************
*** 382,387 ****
}
! % Finally, to help with backslashes,
! \def\bs{$\backslash$}
\catcode`\@=12\relax
--- 366,537 ----
}
! %% Now the Maxima sessions
!
! \def\maximasessionheadersize{\tiny}
!
!
! %% First of all, set up some delimiters
! %% The units are in terms of em and ex, so if the font size is
! %% changed, the units will be changed accordingly
!
! %% To make things line up, we'll need the size of "Initial"
!
! \font\m@ximasessionheaderfont=cmtt8 scaled 800
!
! \def\m@ximasessiontop{
! \vskip -1ex
! \hbox to \hsize{\vrule depth 1ex height .3pt width .4pt
! \vrule height .4pt depth 0pt width 1.1em
! \lower .4ex \hbox{\maximasessionheadersize\ \Maxima Session}
! \hrulefill
! \vrule depth 1ex height .3pt width .4pt}
! \vskip 1ex}
!
! \def\m@ximasessionbottom{
! \hbox to \hsize{\vrule depth 0ex height 1ex width .4pt
! \hrulefill
! \vrule depth 0ex height 1ex width .4pt}
! }
!
! \def\maximanothing{}
!
! \def\m@ximasessioninputskip{
! \ifx \maximanexttok \maximasession
! \let \maximanext=\maximanothing
! \else
! \ifx \maximanexttok \maximatexsession
! \let \maximanext=\maximanothing
! \else
! \ifx \maximanexttok \endmaximasession
! \let \maximanext=\maximanothing
! \else
! \let \maximanext=\m@ximasessioninputskiptwo
! \fi
! \fi
! \fi
! \maximanext}
!
! \def\m@ximasessioninputskiptwo#1{\m@ximasessioninput}
!
! \def\m@ximasessioninput{\obeylines\futurelet\maximanexttok\m@ximasessioninputskip}
!
! \def\setupm@ximasessionverbatim{
! \obeylines \maximauncatcodespecials \obeyspaces}
! {\obeyspaces\global\let =\ }
!
! \def\m@ximasessionsessionverbatim{\par
! \baselineskip = \maximasessionbaselineskip
! \setupm@ximasessionverbatim\dom@ximasessionverbatim}
! {\catcode`\|=0 \catcode`\\=12 %
! |obeylines|gdef|dom@ximasessionverbatim^^M#1\endmaximasession{#1|ifmaximasessionlines|m@ximasessionbottom|fi|par|vskip 1.5ex|par|endgroup}}
!
! %% Now we need to set up the actual environments.
! %% We will need some "if"s to tell us where we are
!
! \newif\ifm@ximainsessioninput
! \newif\ifm@ximasessionsession
!
! %% The top delimiter depends on whether or not it is an initial cell,
! %% etc.
!
! \def\beginmaximasession{
! \begingroup
! \m@ximainsessioninputtrue
! \m@ximasessionsessionfalse
! % \m@ximatexsessionfalse
! \m@ximasessioninput
! % \futurelet\maximanexttok\m@ximasessioninputskip
! }
!
!
! %% Now to take care of the session
!
! \def\maximasession{
! \endgroup
! \par \vskip \premaximasessionspace \par
! \par
! \vskip 1.5ex
! \par
! \ifmaximasessionlines\m@ximasessiontop\fi
! \begingroup
! \baselineskip=\maximasessionbaselineskip
! \m@ximainsessioninputfalse
! \m@ximasessionsessiontrue
! \maximasessionoutputfont
! \m@ximasessionsessionverbatim
! }
!
! \def\setupm@ximasessionverbatim{
! \obeylines \maximauncatcodespecials \obeyspaces}
! {\obeyspaces\global\let =\ }
! {\catcode`\|=0 \catcode`\\=12 %
! |obeylines|gdef|dom@ximatexsessionverbatim#1.#2\\{|par|textcolor{|maximapromptcolor}{(C#1)}#2|par|endgroup}
! |obeylines|gdef|dom@ximasessionpreprompt#1\\{|par #1|par|endgroup}
! }
!
! \def\m@ximasessionoutput#1.#2\\{\textcolor{\maximapromptcolor}{(D#1)} \[ #2 \]\endgroup}
!
! \def\maximatexsession{
! \endgroup
! \par \vskip \premaximasessionspace \par
! \par
! \vskip 1.5ex
! \par
! \ifmaximasessionlines\m@ximasessiontop\fi
! \begingroup
! \m@ximainsessioninputfalse
! \m@ximasessionsessiontrue
! \def\C{\begingroup\color{\maximainputcolor}
! \setupm@ximasessionverbatim\dom@ximatexsessionverbatim}
! \def\D{\begingroup\color{\maximaoutputcolor}\par\m@ximasessionoutput}
! \def\DD{\begingroup\color{\maximaoutputcolor}\par\m@ximatexd}
! \def\p{\begingroup\setupm@ximasessionverbatim\dom@ximasessionpreprompt}
! \baselineskip=\maximatexsessionbaselineskip
! \maximasessionoutputfont
! }
!
! \def\endmaximasession{
! \par
! \ifm@ximainsessioninput
! \m@ximainsessioninputfalse
! \else
! \ifm@ximasessionsession
! \ifmaximasessionlines\m@ximasessionbottom\fi
! \par
! \vskip \postmaximasessionspace \par
! \par
! \maximasm@llsk
! \fi
! \fi
! \color{black}
! \endgroup
! }
!
! %% Finally, the Maxima noshows.
!
! \def\m@ximanoshowinputskip{
! \ifx \maximanexttok \endmaximanoshow
! \let \maximanext=\maximanothing
! \else
! \let \maximanext=\m@ximanoshowinputskiptwo
! \fi
! \maximanext}
!
! \def\m@ximanoshowinputskiptwo#1{\m@ximanoshowinput}
!
! \def\m@ximanoshowinput{\obeylines\futurelet\maximanexttok\m@ximanoshowinputskip}
!
! \def\endm@ximanoshowinputskip{\endgroup}
!
! \def\beginmaximanoshow{
! \begingroup
! \catcode`\%=11\relax
! \m@ximanoshowinput
! }
!
! \def\endmaximanoshow{
! \catcode`\%=14\relax
! \endgroup
! }
\catcode`\@=12\relax
|
|
From: Jay B. <bel...@us...> - 2001-12-09 19:27:49
|
Update of /cvsroot/maxima/maxima-pre59/emacs
In directory usw-pr-cvs1:/tmp/cvs-serv26279/Maxima/maxima-pre59/emacs
Modified Files:
emaxima.el
Log Message:
The abilities of maximadoc were merged into emaxima,
various minor changes and bugfixes.
Index: emaxima.el
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/emacs/emaxima.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** emaxima.el 2001/11/11 01:44:59 1.2
--- emaxima.el 2001/12/09 19:27:47 1.3
***************
*** 60,63 ****
--- 60,68 ----
(const nil)))
+ (defcustom emaxima-tex-lisp-file (locate-library "emaxima.lisp" t)
+ "The file to be loaded that allows TeX output."
+ :group 'emaxima
+ :type '(file))
+
(defcustom emaxima-abbreviations-allowed t
"If non-nil, then `...' abbreviations are allowed in cell labels
[...1374 lines suppressed...]
(and (emaxima-cell-p) (emaxima-reference-p))])
("Help"
! ["Apropos" maxima-apropos]
! ["Help" maxima-help])))
;;; The next line is necessary for XEmacs
! (easy-menu-add emaxima-menu emaxima-mode-map)
;;; emaxima.el ends here
--- 1828,1837 ----
(and (emaxima-cell-p) (emaxima-reference-p))])
("Help"
! ["Manual" maxima-info]
! ["Describe" maxima-help])))
;;; The next line is necessary for XEmacs
! (if (featurep 'xemacs)
! (easy-menu-add emaxima-menu emaxima-mode-map))
;;; emaxima.el ends here
|
|
From: Jay B. <bel...@us...> - 2001-12-09 19:26:20
|
Update of /cvsroot/maxima/maxima-pre59/emacs
In directory usw-pr-cvs1:/tmp/cvs-serv25984/Maxima/maxima-pre59/emacs
Modified Files:
EMIntro.tex
Log Message:
The introduction was changed to match the changes in the programs.
Index: EMIntro.tex
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/emacs/EMIntro.tex,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** EMIntro.tex 2001/11/08 22:20:46 1.1
--- EMIntro.tex 2001/12/09 19:26:15 1.2
***************
*** 44,48 ****
consists of text between the delimiters
\begin{verbatim}
! \maxima
\end{verbatim}
\noindent
--- 44,48 ----
consists of text between the delimiters
\begin{verbatim}
! \beginmaxima
\end{verbatim}
\noindent
***************
*** 73,77 ****
separated from the input by the marker
\begin{verbatim}
! \output
\end{verbatim}
\noindent
--- 73,77 ----
separated from the input by the marker
\begin{verbatim}
! \maximaoutput
\end{verbatim}
\noindent
***************
*** 80,84 ****
\texttt{diff(sin(x\^{}2),x);} in a cell:
\begin{verbatim}
! \maxima
diff(sin(x^2),x);
\endmaxima
--- 80,84 ----
\texttt{diff(sin(x\^{}2),x);} in a cell:
\begin{verbatim}
! \beginmaxima
diff(sin(x^2),x);
\endmaxima
***************
*** 87,95 ****
After typing \texttt{C-c C-u c}, it will look like
\begin{verbatim}
! \maxima
diff(sin(x^2),x);
! \output
2
! (D1) 2 x COS(x )
\endmaxima
\end{verbatim}
--- 87,95 ----
After typing \texttt{C-c C-u c}, it will look like
\begin{verbatim}
! \beginmaxima
diff(sin(x^2),x);
! \maximaoutput
2
! 2 x COS(x )
\endmaxima
\end{verbatim}
***************
*** 98,110 ****
use the command \texttt{C-c C-d}.
If the document is to be \TeX{}ed, the above cell will look like:
! \maxima
diff(sin(x^2),x);
\endmaxima
and the cell with output will look like:
! \maxima
diff(sin(x^2),x);
! \output
2
! (D1) 2 x COS(x )
\endmaxima
--- 98,110 ----
use the command \texttt{C-c C-d}.
If the document is to be \TeX{}ed, the above cell will look like:
! \beginmaxima
diff(sin(x^2),x);
\endmaxima
and the cell with output will look like:
! \beginmaxima
diff(sin(x^2),x);
! \maximaoutput
2
! 2 x COS(x )
\endmaxima
***************
*** 117,132 ****
\TeX{} form. The above cell would become
\begin{verbatim}
! \maxima
diff(sin(x^2),x);
! \outputtex
! $$2\>x\>\left(\cos x^{2}\right)$$
\endmaxima
\end{verbatim}
\noindent
which, when \LaTeX{}ed, would become
! \maxima
diff(sin(x^2),x);
! \outputtex
! $$2\>x\>\left(\cos x^{2}\right)$$
\endmaxima
\noindent
--- 117,132 ----
\TeX{} form. The above cell would become
\begin{verbatim}
! \beginmaxima
diff(sin(x^2),x);
! \maximatexoutput
! $$ 2\*x\*\cos x^{2} $$
\endmaxima
\end{verbatim}
\noindent
which, when \LaTeX{}ed, would become
! \beginmaxima
diff(sin(x^2),x);
! \maximatexoutput
! $$ 2\*x\*\cos x^{2} $$
\endmaxima
\noindent
***************
*** 147,151 ****
An initialization cell is delimited by
\begin{verbatim}
! \maxima[* Initialization Cell *]
\end{verbatim}
\noindent
--- 147,151 ----
An initialization cell is delimited by
\begin{verbatim}
! \beginmaxima[* Initialization Cell *]
\end{verbatim}
\noindent
***************
*** 155,163 ****
\end{verbatim}
\noindent
! The command \texttt{C-c C-q} will turn a cell into
! an initialization cell, applying \texttt{C-c C-q} again will turn it
back into a regular cell.
When \LaTeX{}ed, an initialization cell will look like
! \maxima[* Initialization Cell *]
diff(sin(x^2),x);
\endmaxima
--- 155,163 ----
\end{verbatim}
\noindent
! The command \texttt{C-c C-t} will turn a cell into
! an initialization cell, applying \texttt{C-c C-t} again will turn it
back into a regular cell.
When \LaTeX{}ed, an initialization cell will look like
! \beginmaxima[* Initialization Cell *]
diff(sin(x^2),x);
\endmaxima
***************
*** 167,171 ****
To evaluate all initialization cells (without displaying the output in
the document buffer), the
! command \texttt{C-c C-u q} will go to each of the
initialization cells and evaluate them.
If you want the output of the initialization cells to be brought back
--- 167,171 ----
To evaluate all initialization cells (without displaying the output in
the document buffer), the
! command \texttt{C-c C-u t} will go to each of the
initialization cells and evaluate them.
If you want the output of the initialization cells to be brought back
***************
*** 194,198 ****
referenced cell. For example, given cell 1:
\begin{verbatim}
! \maxima<filename:optional>
<filename:definef>
diff(f(x),x);
--- 194,198 ----
referenced cell. For example, given cell 1:
\begin{verbatim}
! \beginmaxima<filename:optional>
<filename:definef>
diff(f(x),x);
***************
*** 202,206 ****
and cell 2:
\begin{verbatim}
! \maxima<filename:definef>
f(x):=sin(x^2);
\endmaxima
--- 202,206 ----
and cell 2:
\begin{verbatim}
! \beginmaxima<filename:definef>
f(x):=sin(x^2);
\endmaxima
***************
*** 209,220 ****
then the result of updating cell 1 (\texttt{C-c C-u c}) will be:
\begin{verbatim}
! \maxima<filename:optional>
<filename:definef>
diff(f(x),x);
! \output
2
! (D4) f(x) := SIN(x )
2
! (D5) 2 x COS(x )
\endmaxima
\end{verbatim}
--- 209,220 ----
then the result of updating cell 1 (\texttt{C-c C-u c}) will be:
\begin{verbatim}
! \beginmaxima<filename:optional>
<filename:definef>
diff(f(x),x);
! \maximaoutput
2
! f(x) := SIN(x )
2
! 2 x COS(x )
\endmaxima
\end{verbatim}
***************
*** 224,235 ****
\newpage
! \maxima<filename:optional>
<filename:definef>
diff(f(x),x);
! \output
2
! (D4) f(x) := SIN(x )
2
! (D5) 2 x COS(x )
\endmaxima
--- 224,235 ----
\newpage
! \beginmaxima<filename:optional>
<filename:definef>
diff(f(x),x);
! \maximaoutput
2
! f(x) := SIN(x )
2
! 2 x COS(x )
\endmaxima
***************
*** 297,301 ****
program to sum the first $n$ squares. We could start:
\begin{verbatim}
! \maxima<squaresum.max:>
squaresum(n) := (
<squaresum.max:makelist>
--- 297,301 ----
program to sum the first $n$ squares. We could start:
\begin{verbatim}
! \beginmaxima<squaresum.max:>
squaresum(n) := (
<squaresum.max:makelist>
***************
*** 308,321 ****
We would then need cells
\begin{verbatim}
! \maxima<squaresum.max:makelist>,
L:makelist(k,k,1,n),
\endmaxima
! \maxima<squaresum.max:squarelist>
<squaresum.max:definesquare>
L:map(square,L),
\endmaxima
! \maxima<squaresum.max:addlist>
lsum(k,k,L)
\endmaxima
--- 308,321 ----
We would then need cells
\begin{verbatim}
! \beginmaxima<squaresum.max:makelist>,
L:makelist(k,k,1,n),
\endmaxima
! \beginmaxima<squaresum.max:squarelist>
<squaresum.max:definesquare>
L:map(square,L),
\endmaxima
! \beginmaxima<squaresum.max:addlist>
lsum(k,k,L)
\endmaxima
***************
*** 324,328 ****
and then we would also need:
\begin{verbatim}
! \maxima<squaresum.max:definesquare>
square(k) := k^2,
\endmaxima
--- 324,328 ----
and then we would also need:
\begin{verbatim}
! \beginmaxima<squaresum.max:definesquare>
square(k) := k^2,
\endmaxima
***************
*** 331,335 ****
When \TeX{}ed, the header of the cell will say that it determines the
file \texttt{squaresum.mu}.
! \maxima<squaresum.max:>
squaresum(n) := (
<squaresum.max:makelist>
--- 331,335 ----
When \TeX{}ed, the header of the cell will say that it determines the
file \texttt{squaresum.mu}.
! \beginmaxima<squaresum.max:>
squaresum(n) := (
<squaresum.max:makelist>
***************
*** 354,357 ****
--- 354,480 ----
(Although the idea is that only the computer need look at this file.)
+ \section{Other types of cells}
+
+ \noindent
+ When a cell is \TeX{}ed, the input and output are kept separate. To
+ have the results look like a \mx{} session, there are, in addition to
+ the standard cells, special cells called \emph{session cells}. A
+ session cell is delimited by
+ \begin{verbatim}
+ \beginmaximasession
+ \end{verbatim}
+ \noindent
+ and
+ \begin{verbatim}
+ \endmaximasession
+ \end{verbatim}
+ \noindent
+ The command \texttt{C-c C-p} will create a session cell. When a
+ session cell is updated, the output will be marked off with
+ \verb+\maximasession+, and will contain both the input and the output,
+ with the \mx{} prompts. For example, if the session cell
+ \begin{verbatim}
+ \beginmaximasession
+ diff(sin(x),x);
+ int(cos(x),x);
+ \endmaximasession
+ \end{verbatim}
+ \noindent
+ were updated, the result would look like
+ \begin{verbatim}
+ \beginmaximasession
+ diff(sin(x),x);
+ integrate(cos(x),x);
+ \maximasession
+ (C1)diff(sin(x),x);
+
+ (D1) COS(x)
+ (C2)integrate(cos(x),x);
+
+ (D2) SIN(x)
+ \endmaximasession
+ \end{verbatim}
+ \noindent
+ which, when \TeX{}ed, would look like
+ \beginmaximasession
+ diff(sin(x),x);
+ integrate(cos(x),x);
+ \maximasession
+ (C1)diff(sin(x),x);
+
+ (D1) COS(x)
+ (C2)integrate(cos(x),x);
+
+ (D2) SIN(x)
+ \endmaximasession
+ \noindent
+ If it is updated in \TeX{} form, it will look like
+ \begin{verbatim}
+ \beginmaximasession
+ diff(sin(x),x);
+ integrate(cos(x),x);
+ \maximatexsession
+ \C1. diff(sin(x),x); \\
+ \D1. \cos x \\
+ \C2. integrate(cos(x),x); \\
+ \D2. \sin x \\
+ \endmaximasession
+ \end{verbatim}
+ \noindent
+ which, when \TeX{}ed, will look like
+ \beginmaximasession
+ diff(sin(x),x);
+ integrate(cos(x),x);
+ \maximatexsession
+ \C1. diff(sin(x),x); \\
+ \D1. \cos x \\
+ \C2. integrate(cos(x),x); \\
+ \D2. \sin x \\
+ \endmaximasession
+
+ For particularly long output lines inside the \verb+\maximatexsession+
+ part of a session cell, the command \verb+\DD+ will typeset anything
+ between the command and \verb+\\+. Unfortunately, to take advantage
+ of this, the output has to be broken up by hand.
+ If a session cell has not been updated, or has no output for some
+ other reason, it will not appear when the document is \TeX{}ed.
+
+ There is one other type of cell, a \emph{noshow cell}, which can be
+ used to send \mx{} a command, but won't appear in the \TeX{}ed
+ output. A noshow cell can be created with \texttt{C-c C-n}, and will
+ be delimited by
+ \begin{verbatim}
+ \beginmaximanoshow
+ \end{verbatim}
+ \noindent
+ and
+ \begin{verbatim}
+ \endmaximanoshow
+ \end{verbatim}
+
+ Session cells and noshow cells cannot be initialization cells or part of
+ packages.\footnote{That could be changed, but I don't know why it'd be
+ useful.}
+
+ If the command to create one type of cell is called while inside
+ another type of cell, the type of cell will be changed. So, for
+ example, the command \texttt{C-c C-p} from inside the cell
+ \begin{verbatim}
+ \beginmaxima
+ diff(x*sin(x),x);
+ \endmaxima
+ \end{verbatim}
+ \noindent
+ will result in
+ \begin{verbatim}
+ \beginmaximasession
+ diff(x*sin(x),x);
+ \endmaximasession
+ \end{verbatim}
+ \noindent
+ If a standard cell is an initialization cell or a package part, its
+ type cannot be changed.
+
+
\section{Miscellaneous}
***************
*** 368,372 ****
and \texttt{C-c C-i} will give the \mx{} info manual.
! Finally, the \mx{} process can be killed with \texttt{M-C-k}.
\newpage
--- 491,495 ----
and \texttt{C-c C-i} will give the \mx{} info manual.
! Finally, the \mx{} process can be killed with \texttt{C-c C-k}.
\newpage
***************
*** 379,387 ****
\texttt{emaxima.el},\\
\texttt{maxima-symbols.el},
! \texttt{maxima-font-lock.el} and \texttt{emaxima.sty}.
! To install, place the \texttt{.el} files somewhere in the
! load path for Emacs.
Finally, if you want to run \LaTeX{} on the resulting document, put
! \texttt{emaxima.sty} somewhere in the \TeX{} inputs path.
To make sure that \texttt{emaxima.el} is loaded when necessary, the line
--- 502,515 ----
\texttt{emaxima.el},\\
\texttt{maxima-symbols.el},
! \texttt{maxima-font-lock.el}, \texttt{emaxima.sty} and \texttt{emaxima.lisp}.
! To install, place the \texttt{.el} files, as well as
! \texttt{emaxima.lisp}\footnote{If Emacs cannot find
! \texttt{emaxima.lisp}, then the \TeX{} output functions will not
! work, any attempts to get \TeX{} output will only result in standard
! output.}
! somewhere in the load path for Emacs.
Finally, if you want to run \LaTeX{} on the resulting document, put
! \texttt{emaxima.sty} somewhere in the \TeX{} inputs path. If you use
! pdflatex, you'll also need \texttt{pdfcolmk.sty}.
To make sure that \texttt{emaxima.el} is loaded when necessary, the line
***************
*** 444,458 ****
\maximalinestrue
\end{verbatim}
The fonts used to display the \mx{} input and output in a cell are by
default \texttt{cmtt10}. They can be changed, seperately, by changing the
! \TeX{} values of \texttt{\maximainputfont} and \texttt{\maximaoutputfont}.
!
The spacing in the cells can be controlled by changing the \TeX{}
! variables \verb+\maximainputbaselineskip+ (by default 10 pt) and
! \verb+\maximaoutputbaselineskip+ (by default 14 pt), and similarly, the
! amount of space that appears after a cell can be changed by changing the
! value of \verb+\postmaximaspace+ (by default, 1.5 ex).
!
\section{\mx{} mode}
--- 572,631 ----
\maximalinestrue
\end{verbatim}
+ \noindent
The fonts used to display the \mx{} input and output in a cell are by
default \texttt{cmtt10}. They can be changed, seperately, by changing the
! \TeX{} values of \verb+\maximainputfont+ and \verb+\maximaoutputfont+.
! So, for example, to use \texttt{cmtt12} as the input font, use the command
! \begin{verbatim}
! \font\maximainputfont = cmtt12
! \end{verbatim}
! \noindent
The spacing in the cells can be controlled by changing the \TeX{}
! variables \verb+\maximainputbaselineskip+ and
! \verb+\maximaoutputbaselineskip+, and so to increase the space between
! the lines of the output, the command
! \begin{verbatim}
! \maximaoutputbaselineskip = 14pt
! \end{verbatim}
! \noindent
! could be used.
! The amount of space that appears before a cell can be changed by changing
! the value of \verb+\premaximaspace+ (by default, 0pt), and that after
! a cell can be changed by changing the value of \verb+\postmaximaspace+
! (by default, 1.5 ex).
!
! Session cells can be configured similarly.
! Lines can be placed around a \mx{} session with the command
! \begin{verbatim}
! \maximasessionlinestrue
! \end{verbatim}
! \noindent
! and they can be turned back off with
! \begin{verbatim}
! \maximasessionlinesfalse
! \end{verbatim}
! \noindent
! The font can be changed by changing the value of
! \verb+\maximasessionfont+. The color of the prompts when the session
! is in \TeX{} form is controlled by \\
! \verb+\maximapromptcolor+, by
! default red, the colors of the input lines and output lines are
! controlled by \verb+\maximainputcolor+ and \verb+\maximaoutputcolor+,
! respectively. So the command
! \begin{verbatim}
! \def\maximainputcolor{green}
! \end{verbatim}
! \noindent
! would make the input in a \TeX{}ed session green.
! The session can be \TeX{}ed without the colors by using the command
! \verb+\maximasessionnocolor+.
! The baselineskip is
! set by \verb+\maximasessionbaselineskip+ for normal session cells, and
! by \verb+\maixmatexsessionbaselineskip+ for \TeX{} sessions. The
! amount of space that appears before a session cell can be changed by
! changing the value of \verb+\premaximasessionspace+ (by default, 0pt),
! and that after a cell can be changed by changing the value of
! \verb+\postmaximasessionspace+ (by default, 1.5 ex).
\section{\mx{} mode}
***************
*** 493,503 ****
\begin{tabular}{p{\firstcol}p{\secondcol}}
! \texttt{C-M-r} & Send the region to Maxima.\\
! \texttt{C-M-b} & Send the buffer to Maxima.\\
! \texttt{C-M-l} & Send the line to Maxima.\\
! \texttt{C-M-f} & Send the form to Maxima.\\
\texttt{C-RET} & Send the smallest set of lines which contains
the cursor and contains no incomplete forms, and go to the next form.\\
! \texttt{M-RET} & As above, but with the region instead of the current line.
\end{tabular}
--- 666,677 ----
\begin{tabular}{p{\firstcol}p{\secondcol}}
! \texttt{C-cC-r} & Send the region to Maxima.\\
! \texttt{C-cC-b} & Send the buffer to Maxima.\\
! \texttt{C-cC-c} & Send the line to Maxima.\\
! \texttt{C-cC-e} & Send the form to Maxima.\\
\texttt{C-RET} & Send the smallest set of lines which contains
the cursor and contains no incomplete forms, and go to the next form.\\
! \texttt{M-RET} & As above, but with the region instead of the current line.\\
! \texttt{C-cC-l} & Prompt for and load a Maxima file.
\end{tabular}
***************
*** 505,514 ****
When something is sent to Maxima, a buffer running an inferior Maxima
process will appear. It can also be made to appear by using the command
! \texttt{C-c C-d}.
If an argument is given to a command to send information to Maxima,
the region (buffer, line, form) will first be checked to make sure
the parentheses are balanced.
The Maxima process can be killed, after asking for confirmation
! with \texttt{C-M-k}. To kill without confirmation, give \texttt{C-M-k}
an argument.
--- 679,688 ----
When something is sent to Maxima, a buffer running an inferior Maxima
process will appear. It can also be made to appear by using the command
! \texttt{C-c C-p}.
If an argument is given to a command to send information to Maxima,
the region (buffer, line, form) will first be checked to make sure
the parentheses are balanced.
The Maxima process can be killed, after asking for confirmation
! with \texttt{C-cC-k}. To kill without confirmation, give \texttt{C-cC-k}
an argument.
***************
*** 533,540 ****
In all cases, \texttt{M-x maxima-untab} will remove a level of indentation.
! To get help on a Maxima topic, use \texttt{C-c C-h}.
! To read the Maxima info manual, use \texttt{C-c C-i}.
! To get help with the symbol under point, use \texttt{f12}.
! To get apropos with the symbol under point, use \texttt{M-f12}.
--- 707,714 ----
In all cases, \texttt{M-x maxima-untab} will remove a level of indentation.
! To get help on a Maxima topic, use \texttt{C-c C-d}.
! To read the Maxima info manual, use \texttt{C-c C-m}.
! To get help with the symbol under point, use \texttt{C-cC-h}.
! To get apropos with the symbol under point, use \texttt{C-cC-a}.
***************
*** 555,562 ****
\texttt{C-TAB} & Cycle through possible completions.\\
\texttt{C-M-TAB} & Complete the input line, based on previous input lines.\\
! \texttt{C-c C-h} & Get help on a Maxima topic.\\
! \texttt{C-c C-i} & Bring up the Maxima info manual.\\
! \texttt{C-M-k} & Kill the process and the buffer, after asking for
! confirmation. To kill without confirmation, give \texttt{C-M-k} an
argument.\\
\texttt{M-p} & Bring the previous input to the current prompt.\\
--- 729,736 ----
\texttt{C-TAB} & Cycle through possible completions.\\
\texttt{C-M-TAB} & Complete the input line, based on previous input lines.\\
! \texttt{C-c C-d} & Get help on a Maxima topic.\\
! \texttt{C-c C-m} & Bring up the Maxima info manual.\\
! \texttt{C-cC-k} & Kill the process and the buffer, after asking for
! confirmation. To kill without confirmation, give \texttt{C-cC-k} an
argument.\\
\texttt{M-p} & Bring the previous input to the current prompt.\\
***************
*** 579,582 ****
--- 753,759 ----
\textbf{Key} & \textbf{Description}\\
\hline
+ \texttt{C-c C-o} & Create a (standard) cell.\\
+ \texttt{C-c C-p} & Create a session cell.\\
+ \texttt{C-c C-n} & Create a noshow cell.\\
\texttt{C-c +} & Go the the next cell.\\
\texttt{C-c -} & Go to the previous cell.\\
***************
*** 586,590 ****
& Update all of the cells in \TeX{} form. With an argument don't ask
before updating.\\
! \texttt{C-c C-u q}
& Evaluate all of the initialization cells.\\
\texttt{C-c C-u i}
--- 763,767 ----
& Update all of the cells in \TeX{} form. With an argument don't ask
before updating.\\
! \texttt{C-c C-u t}
& Evaluate all of the initialization cells.\\
\texttt{C-c C-u i}
***************
*** 593,596 ****
--- 770,776 ----
\texttt{C-c C-u I}
& Update all of the initialization cells in \TeX{} form. With an
+ argument, don't ask before updating.\\
+ \texttt{C-c C-u s}
+ & Update all of the session cells in \TeX{} form. With an
argument, don't ask before updating.
\end{tabular}
***************
*** 608,612 ****
\textbf{Key} & \textbf{Description}\\
\hline
! \texttt{C-c C-s}
%& \texttt{emaxima-send-cell}
& Send the current cell to the \mx{} process.\\
--- 788,792 ----
\textbf{Key} & \textbf{Description}\\
\hline
! \texttt{C-c C-v}
%& \texttt{emaxima-send-cell}
& Send the current cell to the \mx{} process.\\
***************
*** 620,624 ****
%& \texttt{emaxima-delete-output}
& Delete the output from the current cell.\\
! \texttt{C-c C-q}
%& \texttt{emaxima-toggle-init}
& Toggle whether or not the current cell is an initialization cell.\\
--- 800,804 ----
%& \texttt{emaxima-delete-output}
& Delete the output from the current cell.\\
! \texttt{C-c C-t}
%& \texttt{emaxima-toggle-init}
& Toggle whether or not the current cell is an initialization cell.\\
***************
*** 648,654 ****
\textbf{Key} & \textbf{Description}\\
\hline
- \texttt{C-c C-o}
- %& \texttt{emaxima-create-cell}
- & Create a cell.\\
\texttt{C-c C-u l}
%& \texttt{emaxima-replace-line}
--- 828,831 ----
***************
*** 678,685 ****
\textbf{Key} & \textbf{Description}\\
\hline
! \texttt{C-c C-a} & Go to the beginning of the form.\\
! \texttt{C-c C-e} & Go to the end of the form.\\
! \texttt{C-c (} & Go to the beginning of the sexp.\\
! \texttt{C-c )} & Go to the end of the sexp.
\end{tabular}
--- 855,862 ----
\textbf{Key} & \textbf{Description}\\
\hline
! \texttt{M-C-a} & Go to the beginning of the form.\\
! \texttt{M-C-e} & Go to the end of the form.\\
! \texttt{M-C-b} & Go to the beginning of the sexp.\\
! \texttt{M-C-f} & Go to the end of the sexp.
\end{tabular}
***************
*** 696,706 ****
\textbf{Key} & \textbf{Description}\\
\hline
! \texttt{M-C-p} & Start a \mx{} process.\\
! \texttt{M-C-r} & Send the region to the \mx{} process.\\
! \texttt{M-C-b} & Send the buffer to the \mx{} process.\\
! \texttt{M-C-l} & Send the line to the \mx{} process.\\
! \texttt{M-C-f} & Send the form to the \mx{} process.\\
! \texttt{M-C-k} & Kill the \mx{} process.\\
! \texttt{C-c C-d} & Display the \mx{} buffer.
\end{tabular}
--- 873,883 ----
\textbf{Key} & \textbf{Description}\\
\hline
! \texttt{C-cC-p} & Start a \mx{} process.\\
! \texttt{C-cC-r} & Send the region to the \mx{} process.\\
! \texttt{C-cC-b} & Send the buffer to the \mx{} process.\\
! \texttt{C-cC-c} & Send the line to the \mx{} process.\\
! \texttt{C-cC-e} & Send the form to the \mx{} process.\\
! \texttt{C-cC-k} & Kill the \mx{} process.\\
! \texttt{C-cC-p} & Display the \mx{} buffer.
\end{tabular}
***************
*** 733,739 ****
\textbf{Key} & \textbf{Description}\\
\hline
! \texttt{C-c C-c} & Comment the region.\\
! \texttt{C-c :} & Insert a short comment.\\
! \texttt{C-c ;} & Insert a comment environment.
\end{tabular}
--- 910,917 ----
\textbf{Key} & \textbf{Description}\\
\hline
! \texttt{C-c ;} & Comment the region.\\
! \texttt{C-c :} & Uncomment the region.\\
! \texttt{M-;} & Insert a short comment.\\
! \texttt{C-c *} & Insert a comment environment.
\end{tabular}
***************
*** 768,779 ****
\textbf{Key} & \textbf{Description}\\
\hline
! \texttt{C-c C-h}
%& \texttt{maxima-help}
& Get help on a (prompted for) subject.\\
! \texttt{C-c C-a}
%& \texttt{maxima-apropos}
! & Get a list of subjects concerning a (prompted for) subject.\\
! \texttt{f12} & Get help with the symbol under point.\\
! \texttt{M-f12} & Get apropos with the symbol under point.
\end{tabular}
--- 946,957 ----
\textbf{Key} & \textbf{Description}\\
\hline
! \texttt{C-c C-d}
%& \texttt{maxima-help}
& Get help on a (prompted for) subject.\\
! \texttt{C-c C-m}
%& \texttt{maxima-apropos}
! & Read the manual.\\
! \texttt{C-cC-h} & Get help with the symbol under point.\\
! \texttt{C-cC-a} & Get apropos with the symbol under point.
\end{tabular}
***************
*** 790,796 ****
\textbf{Key} & \textbf{Description}\\
\hline
! \texttt{C-c C-f} & Mark the form.\\
! \texttt{C-c C-p} & Check the region for balanced parentheses.\\
! \texttt{C-c C-g} & Check the form for balanced parentheses.
\end{tabular}
--- 968,974 ----
\textbf{Key} & \textbf{Description}\\
\hline
! \texttt{M-C-h} & Mark the form.\\
! \texttt{C-c)} & Check the region for balanced parentheses.\\
! \texttt{C-c C-)} & Check the form for balanced parentheses.
\end{tabular}
***************
*** 815,819 ****
\texttt{C-c ]}
& Close an environment.\\
! \texttt{C-c \texttt{RET}}
& Insert an item into a list.\\
\texttt{"}
--- 993,997 ----
\texttt{C-c ]}
& Close an environment.\\
! \texttt{C-c C-j}
& Insert an item into a list.\\
\texttt{"}
|
|
From: Vadim V. Z. <vv...@us...> - 2001-12-09 14:17:58
|
Update of /cvsroot/maxima/maxima-pre59/src
In directory usw-pr-cvs1:/tmp/cvs-serv24516/src
Modified Files:
ChangeLog cl-info.lisp cmulisp-regex.lisp compile-clisp.lisp
compile-cmulisp.lisp macdes.lisp maxima-package.lisp
mdebug.lisp
Added Files:
clisp-regex.lisp
Log Message:
online info browsing (describe) for clisp and cmucl
--- NEW FILE: clisp-regex.lisp ---
(eval-when (:compile-toplevel :load-toplevel :execute)
(defpackage "SI"
(:use "COMMON-LISP")
(:export
"STRING-MATCH"
"MATCH-END"
"MATCH-BEGINNING"
"*MATCH-DATA*"
"*CASE-FOLD-SEARCH*"))
)
(in-package "SI")
(defvar *match-data*)
(defvar *case-fold-search* nil)
#+nil
(defun string-match (pattern string
&optional (start 0) end)
"Search the string STRING for the first pattern that matches the
regexp PATTERN. The syntax used for the pattern is specified by
SYNTAX. The search may start in the string at START and ends at END,
which default to 0 and the end of the string.
If there is a match, returns the index of the start of the match and
an array of match-data. If there is no match, -1 is returned and
nil."
(let ((result
(multiple-value-list
#+case-fold-search
(regexp:match pattern string :start start :end end
:case-insensitive *case-fold-search*)
#+case-fold-search-not
(regexp:match pattern string :start start :end end
:case-sensitive (not *case-fold-search*))
)))
(setf *match-data* result)
(if (first result)
(regexp:match-start (first result))
-1)))
(defun string-match (pattern string
&optional (start 0) end)
"Search the string STRING for the first pattern that matches the
regexp PATTERN. The syntax used for the pattern is specified by
SYNTAX. The search may start in the string at START and ends at END,
which default to 0 and the end of the string.
If there is a match, returns the index of the start of the match and
an array of match-data. If there is no match, -1 is returned and
nil."
(let* ((compiled-pattern (regexp:regexp-compile pattern
#+case-fold-search *case-fold-search*
#+case-fold-search-not (not *case-fold-search*)
))
(result
(multiple-value-list
(regexp:regexp-exec compiled-pattern string
:start start :end end))))
(setf *match-data* result)
(if (first result)
(regexp:match-start (first result))
-1)))
(defun match-beginning (index &optional (match-data *match-data*))
(if (and match-data (< index (length match-data)))
(regexp:match-start (elt match-data index))
-1))
(defun match-end (index &optional (match-data *match-data*))
(if (and match-data (< index (length match-data)))
(regexp:match-end (elt match-data index))
-1))
Index: ChangeLog
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/ChangeLog,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ChangeLog 2001/11/19 04:45:52 1.9
--- ChangeLog 2001/12/09 14:17:55 1.10
***************
*** 1,2 ****
--- 1,19 ----
+ 2001-12-09 Vadim V. Zhytnikov <vv...@ma...>
+
+ * New online info browsing code for clisp and cmulisp
+ by Raymond Toy. To make describe work with clisp you have
+ to compile clisp with REGEXP module and later invoke it
+ during maxima compilation and at run time with full
+ linking kit
+ clisp -K full
+ To make it work with cmulisp you need regex.o object
+ file. It's source regex.c/h is part of glibc and also
+ can be found in clisp sources. Before compiling maxima
+ with cmulisp edit compile-cmulisp.lisp, cmulisp-regex.lisp
+ and replace
+ /apps/.../regex-0.12/regex.o
+ by he path where regex.o resides on your system (value of
+ the *regex-lib* variable).
+
2001-11-19 Vadim V. Zhytnikov <vv...@ma...>
Index: cl-info.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/cl-info.lisp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cl-info.lisp 2001/06/06 09:13:09 1.2
--- cl-info.lisp 2001/12/09 14:17:55 1.3
***************
*** 1,22 ****
! ;;; This is port of GCL's info.lsp to CMUCL. This should basically be
;;; portable Common Lisp, but I haven't tested it with anything else.
! (in-package "SI")
! (use-package "REGEX")
! (declaim (optimize (safety 3) (debug 3)))
(eval-when (compile eval)
(defmacro while (test &body body)
[...1001 lines suppressed...]
collect
! (and (f >= (match-beginning i) 0)
(get-match s i))))
!
! ;;; Local Variables: ***
! ;;; mode:lisp ***
! ;;; version-control:t ***
! ;;; comment-column:0 ***
! ;;; comment-start: ";;; " ***
! ;;; End: ***
--- 649,655 ----
(loop for i in l
collect
! (and (>= (match-beginning i) 0)
(get-match s i))))
! ||#
Index: cmulisp-regex.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/cmulisp-regex.lisp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cmulisp-regex.lisp 2001/04/18 00:23:29 1.2
--- cmulisp-regex.lisp 2001/12/09 14:17:55 1.3
***************
*** 2,9 ****
;;; Alien interface to GNU regex, for CMUCL
;;;
;;;
! (in-package "REGEX")
(export '(
;; Constants
--- 2,70 ----
;;; Alien interface to GNU regex, for CMUCL
;;;
+ ;;; Copyright 2000, Raymond Toy
+ ;;;
+ ;;; This is a part of Maxima and therefore released under the GPL that
+ ;;; governs GPL.
;;;
+ ;;; It is intended that we support everything that GNU regex does, but
+ ;;; we're not quite there yet.
+ ;;;
! (eval-when (compile load eval)
! (defpackage "REGEXP"
! (:use "COMMON-LISP" "ALIEN" "C-CALL")
! (:export
! ;; Constants
! "+RE-BACKSLASH-ESCAPE-IN-LISTS+"
! "+RE-BK-PLUS-QM+"
! "+RE-CHAR-CLASSES+"
! "+RE-CONTEXT-INDEP-ANCHORS+"
! "+RE-CONTEXT-INDEP-OPS+"
! "+RE-CONTEXT-INVALID-OPS+"
! "+RE-DOT-NEWLINE+"
! "+RE-DOT-NOT-NULL+"
! "+RE-HAT-LISTS-NOT-NEWLINE+"
! "+RE-INTERVALS+"
! "+RE-LIMITED-OPS+"
! "+RE-NEWLINE-ALT+"
! "+RE-NO-BK-BRACES+"
! "+RE-NO-BK-PARENS+"
! "+RE-NO-BK-REFS+"
! "+RE-NO-BK-VBAR+"
! "+RE-NO-EMPTY-RANGES+"
! "+RE-UNMATCHED-RIGHT-PAREN-ORD+"
! ;; Common regexp syntaxes
! "+RE-SYNTAX-EMACS+"
! "+RE-SYNTAX-EGREP+"
! "+RE-SYNTAX-POSIX-COMMON+"
! "+RE-SYNTAX-POSIX-BASIC+"
! "+RE-SYNTAX-POSIX-EXTENDED+"
! "+RE-SYNTAX-SPENCER+"
! ;; Variables
! "*MATCH-DATA*"
! "*CASE-FOLD-SEARCH*"
! ;; Functions
! "MATCH-DATA-START"
! "MATCH-DATA-END"
! "RE-SET-SYNTAX"
! "COMPILE-PATTERN"
! "ALLOCATE-RE-REGS"
! "FREE-RE-REGS"
! "RE-NSUB"
! "LISPIFY-MATCH-DATA"
! "RE-SEARCH"
! "RE-REGFREE"
! "STRING-MATCH"
! "MATCH-BEGINNING"
! "MATCH-END"
! ))
!
! (defpackage "SI"
! (:use "COMMON-LISP" "REGEXP" "ALIEN"))
! ) ; end eval-when
+ (in-package "REGEXP")
+
+ #+nil
(export '(
;; Constants
***************
*** 47,53 ****
(use-package "C-CALL")
- #+nil
(eval-when (:load-toplevel :compile-toplevel :execute)
! (ext:load-foreign "/apps/gnu/src/regex-0.12/regex.o")
)
--- 108,118 ----
(use-package "C-CALL")
(eval-when (:load-toplevel :compile-toplevel :execute)
! (defvar *regex-lib*
! "/apps/gnu/src/regex-0.12/regex.o"
! "The full path to GNU regex.o")
! )
! (eval-when (:compile-toplevel :execute)
! (ext:load-foreign *regex-lib*)
)
***************
*** 109,116 ****
--- 174,188 ----
(regs (* re-registers)))
+ (declaim (inline re-set-syntax))
+ (def-alien-routine ("re_set_syntax" re-set-syntax) reg-syntax-t
+ (syntax reg-syntax-t))
+
+ ;; Note: for some reason, I can't set this directly to get the desired
+ ;; syntax. I need to use re_set_syntax instead, which works.
(def-alien-variable ("re_syntax_options" re-syntax-options) reg-syntax-t)
;;; POSIX interface
+ ;;; Not yet supported, but we really should since it's standardized.
#|
(def-alien-type regex-t re-pattern-buffer)
***************
*** 143,146 ****
--- 215,220 ----
|#
+ ;; Create all of the necessary constants defined in regex.h to define the syntax.
+
(macrolet ((frob (&rest name-desc-list)
`(progn
***************
*** 187,191 ****
--- 261,279 ----
(+re-unmatched-right-paren-ord+ "")))
+ ;; Define some common syntaxes.
+
(defconstant +re-syntax-emacs+ 0)
+
+ (defconstant +re-syntax-awk+
+ (logior +re-backslash-escape-in-lists+ +re-dot-not-null+
+ +re-no-bk-parens+ +re-no-bk-refs+
+ +re-no-bk-vbar+ +re-no-empty-ranges+
+ +re-unmatched-right-paren-ord+))
+
+ (defconstant +re-syntax-grep+
+ (logior +re-bk-plus-qm+ +re-char-classes+
+ +re-hat-lists-not-newline+ +re-intervals+
+ +re-newline-alt+))
+
(defconstant +re-syntax-egrep+
(logior +re-char-classes+ +re-context-indep-anchors+
***************
*** 201,204 ****
--- 289,295 ----
(logior +re-syntax-posix-common+ +re-bk-plus-qm+))
+ (defconstant +re-syntax-posix-minimal-basic+
+ (logior +re-syntax-posix-common+ +re-limited-ops+))
+
(defconstant +re-syntax-posix-extended+
(logior +re-syntax-posix-common+ +re-context-indep-anchors+
***************
*** 207,214 ****
--- 298,314 ----
+re-unmatched-right-paren-ord+))
+ (defconstant +re-syntax-posix-awk+
+ (logior +re-syntax-posix-extended+ +re-backslash-escape-in-lists+))
+
+ ;; This isn't defined regex.h, but GCL uses this syntax in its info
+ ;; reader. (Not 100% sure this is right, but is close enough for
+ ;; GCL's and maxima's use.)
(defconstant +re-syntax-spencer+
(logior +re-no-bk-parens+ +re-no-bk-vbar+))
+ ;;; This ends the raw GNU regex interface.
+ ;;; A simple slightly higher-level interface to GNU regex that might
+ ;;; be more appropriate for Lisp.
#+nil
(defun allocate-re-regs (compiled-pattern-buffer)
***************
*** 233,236 ****
--- 333,341 ----
regs))
+ ;; Return the number of matches and submatches found in the result
+ ;; pattern buffer after doing a search. Assumes the search was
+ ;; successful.
+ (defun re-nsub (pat-buf)
+ (1+ (slot (deref pat-buf) 're-nsub)))
(defun free-re-regs (re-regs)
***************
*** 327,338 ****
(make-match-data :start (deref start k) :end (deref end k))))
matches))
!
(defun string-match (pattern string
&optional (start 0) end
! (syntax +re-syntax-spencer+))
"Search the string STRING for the first pattern that matches the
regexp PATTERN. The syntax used for the pattern is specified by
SYNTAX. The search may start in the string at START and ends at END,
! which default to 0 and the end of the string.
If there is a match, returns the index of the start of the match and
--- 432,445 ----
(make-match-data :start (deref start k) :end (deref end k))))
matches))
!
! (in-package "SI")
! ;;; Define the interface needed by cl-info.
(defun string-match (pattern string
&optional (start 0) end
! (syntax +re-syntax-posix-basic+))
"Search the string STRING for the first pattern that matches the
regexp PATTERN. The syntax used for the pattern is specified by
SYNTAX. The search may start in the string at START and ends at END,
! which default to 0 and the end of the string, respectively.
If there is a match, returns the index of the start of the match and
***************
*** 340,353 ****
nil."
(declare (type string pattern string))
! (setf re-syntax-options syntax)
! (let* ((comp-result (compile-pattern pattern)))
;; Make sure we free up the space for the pattern buffer.
(unwind-protect
(progn
(cond (comp-result
! (let* ((re-regs (allocate-re-regs)))
;; Make sure we free up the space for the registers
(unwind-protect
(progn
(let ((search-result
(re-search comp-result string (length string)
--- 447,462 ----
nil."
(declare (type string pattern string))
! (re-set-syntax syntax)
! (let (comp-result)
;; Make sure we free up the space for the pattern buffer.
(unwind-protect
(progn
+ (setf comp-result (compile-pattern pattern))
(cond (comp-result
! (let (re-regs)
;; Make sure we free up the space for the registers
(unwind-protect
(progn
+ (setf re-regs (allocate-re-regs))
(let ((search-result
(re-search comp-result string (length string)
***************
*** 357,361 ****
(let ((matches
(lispify-match-data
! (1+ (slot (deref comp-result) 're-nsub))
re-regs)))
;; Save the last match in the global var
--- 466,470 ----
(let ((matches
(lispify-match-data
! (re-nsub comp-result)
re-regs)))
;; Save the last match in the global var
***************
*** 372,375 ****
--- 481,527 ----
(re-regfree comp-result)
(free-alien comp-result))))
+
+ ;; Memoized version
+ #+nil
+ (defvar *compiled-pattern-hashtable* (make-hash-table :test 'equal))
+
+ #+nil
+ (defun string-match (pattern string
+ &optional (start 0) end)
+ (declare (type string pattern string))
+ (setf re-syntax-options +re-syntax-posix-basic+)
+ (multiple-value-bind (comp-pattern foundp)
+ (gethash pattern *compiled-pattern-hashtable*)
+ (unless comp-pattern
+ ;; Compile up the pattern and save it away
+ (setf (gethash pattern *compiled-pattern-hashtable*)
+ (compile-pattern pattern))
+ (setf comp-pattern (gethash pattern *compiled-pattern-hashtable*)))
+ (unwind-protect
+ (progn
+ (cond (comp-pattern
+ (let* ((re-regs (allocate-re-regs)))
+ ;; Make sure we free up the space for the registers
+ (unwind-protect
+ (progn
+ (let ((search-result
+ (re-search comp-pattern string (length string)
+ start (or end (length string))
+ re-regs)))
+ (cond ((>= search-result 0)
+ (let ((matches
+ (lispify-match-data
+ (1+ (slot (deref comp-pattern) 're-nsub))
+ re-regs)))
+ ;; Save the last match in the global var
+ (setf *match-data* matches)
+ (values search-result matches)))
+ (t
+ (values search-result nil)))))
+ ;; Free up the re-register since we're done with it now.
+ (free-re-regs re-regs))))
+ (t
+ (setf *match-data* nil)
+ (values -1 nil)))))))
(defun match-beginning (index &optional (match-data *match-data*))
Index: compile-clisp.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/compile-clisp.lisp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** compile-clisp.lisp 2001/11/19 04:45:52 1.9
--- compile-clisp.lisp 2001/12/09 14:17:55 1.10
***************
*** 1,3 ****
--- 1,6 ----
+ (defpackage "SI"
+ (:use "COMMON-LISP"))
+
(if (find-package "EXT")
(use-package "EXT"))
***************
*** 10,17 ****
--- 13,28 ----
(defun compile-maxima ()
(make::make :maxima :compile t)
+ (if (find-package "REGEXP")
+ (progn
+ (compile-file "clisp-regex")
+ (compile-file "cl-info") ))
)
(defun save-maxima ()
(make::make :maxima )
+ (if (find-package "REGEXP")
+ (progn
+ (load "clisp-regex")
+ (load "cl-info") ))
(gc)
(saveinitmem "maxima-clisp.mem"
Index: compile-cmulisp.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/compile-cmulisp.lisp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** compile-cmulisp.lisp 2001/04/27 17:05:59 1.10
--- compile-cmulisp.lisp 2001/12/09 14:17:55 1.11
***************
*** 20,28 ****
;; this is now in maxima package
! (defpackage "SI"
! (:use "COMMON-LISP" "ALIEN" "C-CALL"))
! (defvar si::*info-paths* nil)
!
! (defpackage "REGEX"
(:use "COMMON-LISP" "ALIEN" "C-CALL")
(:export
--- 20,24 ----
;; this is now in maxima package
! (defpackage "REGEXP"
(:use "COMMON-LISP" "ALIEN" "C-CALL")
(:export
***************
*** 46,50 ****
"+RE-NO-EMPTY-RANGES+"
"+RE-UNMATCHED-RIGHT-PAREN-ORD+"
! ";; COMMON REGEXP SYNTAXES"
"+RE-SYNTAX-EMACS+"
"+RE-SYNTAX-EGREP+"
--- 42,46 ----
"+RE-NO-EMPTY-RANGES+"
"+RE-UNMATCHED-RIGHT-PAREN-ORD+"
! ;; Common regexp syntaxes
"+RE-SYNTAX-EMACS+"
"+RE-SYNTAX-EGREP+"
***************
*** 59,62 ****
--- 55,66 ----
"MATCH-DATA-START"
"MATCH-DATA-END"
+ "RE-SET-SYNTAX"
+ "COMPILE-PATTERN"
+ "ALLOCATE-RE-REGS"
+ "FREE-RE-REGS"
+ "RE-NSUB"
+ "LISPIFY-MATCH-DATA"
+ "RE-SEARCH"
+ "RE-REGFREE"
"STRING-MATCH"
"MATCH-BEGINNING"
***************
*** 64,67 ****
--- 68,76 ----
))
+ (defpackage "SI"
+ (:use "COMMON-LISP" "REGEXP" "ALIEN"))
+ (defvar si::*info-paths* nil)
+
+
(push :main-files-loaded *features*)
(load "sysdef.lisp")
***************
*** 138,141 ****
--- 147,151 ----
;; define bye so that quit() will work in maxima
(defun bye () (ext:quit))
+ (defun quit () (ext:quit))
Index: macdes.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/macdes.lisp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** macdes.lisp 2001/04/19 06:06:10 1.6
--- macdes.lisp 2001/12/09 14:17:55 1.7
***************
*** 13,17 ****
(defvar $manual_demo "manual.demo")
! (DEFmspec $example (l) (setq l (cdr l))
(block
$example
--- 13,17 ----
(defvar $manual_demo "manual.demo")
! (defmspec $example (l) (setq l (cdr l))
(block
$example
***************
*** 119,136 ****
(setq x ($sconcat x))
(setq *INFO-PATHS*
! (cons (concatenate 'string *maxima-directory*
! "info/")
! *INFO-PATHS*))
! #+(or gcl cmulisp)
! (if (fboundp 'si::info)
! (return-from $describe (si::info x '("maxima.info"))))
!
"The documentation is now in INFO format and can be printed using
tex, or viewed using info or gnu emacs or using a web browser:
http://www.ma.utexas.edu/maxima/
! Versions of maxima built
! on GCL or CMULISP have a builtin info retrieval mechanism"
)
-
--- 119,135 ----
(setq x ($sconcat x))
(setq *INFO-PATHS*
! (cons (concatenate 'string *maxima-directory*
! "info/")
! *INFO-PATHS*))
! (if (and (find-package "SI")
! (fboundp (intern "INFO" "SI")))
! (return-from $describe (funcall (intern "INFO" "SI") x
! '("maxima.info") #-gcl *info-paths*)))
!
"The documentation is now in INFO format and can be printed using
tex, or viewed using info or gnu emacs or using a web browser:
http://www.ma.utexas.edu/maxima/
! Some versions of maxima built have a builtin info retrieval mechanism."
)
Index: maxima-package.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/maxima-package.lisp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** maxima-package.lisp 2001/11/19 04:45:52 1.7
--- maxima-package.lisp 2001/12/09 14:17:55 1.8
***************
*** 106,109 ****
--- 106,124 ----
(setf (symbol-function 'maxima::newline) (symbol-function 'si::newline))
+ ;; *info-paths* from cl-info.lisp
+ #+(or clisp cmu)
+ (import '( si::*info-paths* ) "MAXIMA" )
+
+ ;; detect which version of clisp REGEXP we have
+ #+clisp
+ (if (find-package "REGEXP")
+ (push (cond ((apply (intern "REGEXP-EXEC" "REGEXP")
+ (list (apply (intern "REGEXP-COMPILE" "REGEXP")
+ '("AAA" t))
+ "aaa"))
+ ':case-fold-search )
+ (t ':case-fold-search-not ))
+ *features* ))
+
;;redefined in commac lucid 2.1 does (functionp 'jiljay)-->t
(if (lisp::functionp 'dotimes) (push :shadow-functionp *features*))
Index: mdebug.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/mdebug.lisp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** mdebug.lisp 2001/04/19 06:06:10 1.6
--- mdebug.lisp 2001/12/09 14:17:55 1.7
***************
*** 312,316 ****
((and (eql #\? ch) (member next '(#\space #\tab)))
(let* ((line (string-trim '(#\space #\tab #\; #\$)
! (subseq (read-line stream eof-error-p eof-value) 2))))
`((displayinput) nil (($describe) ,line))))
(t (setq *last-dbm-command* nil)
--- 312,316 ----
((and (eql #\? ch) (member next '(#\space #\tab)))
(let* ((line (string-trim '(#\space #\tab #\; #\$)
! (subseq (read-line stream eof-error-p eof-value) 1))))
`((displayinput) nil (($describe) ,line))))
(t (setq *last-dbm-command* nil)
|
|
From: Vadim V. Z. <vv...@us...> - 2001-12-08 06:24:17
|
Update of /cvsroot/maxima/maxima-pre59/src
In directory usw-pr-cvs1:/tmp/cvs-serv15949/src
Modified Files:
makefile
Log Message:
fix makefile for cmucl
Index: makefile
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/makefile,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** makefile 2001/06/06 09:13:09 1.13
--- makefile 2001/12/08 06:24:15 1.14
***************
*** 277,286 ****
cmulisp-compile:
! echo '(progn (load "compile-cmulisp.lisp")(compile-maxima))' | ${CMULISP}
maxima.core: cmulisp-compile
! echo '(progn (load "compile-cmulisp.lisp")(save-maxima))' | ${CMULISP}
test-cmulisp: maxima.core
! (cd ../doc ; ${CMULISP} -core ../src/maxima.core -load ../src/maxima-clisp.mem tests.lisp)
--- 277,286 ----
cmulisp-compile:
! echo '(progn (load "compile-cmulisp.lisp")(compile-maxima)(quit))' | ${CMULISP}
maxima.core: cmulisp-compile
! echo '(progn (load "compile-cmulisp.lisp")(save-maxima)(quit))' | ${CMULISP}
test-cmulisp: maxima.core
! (cd ../doc ; ${CMULISP} -core ../src/maxima.core -load tests.lisp)
|
|
From: Vadim V. Z. <vv...@us...> - 2001-12-05 05:58:29
|
Update of /cvsroot/maxima/maxima-pre59/src
In directory usw-pr-cvs1:/tmp/cvs-serv22724/src
Modified Files:
sloop.lisp
Log Message:
type-error in sloop is renamed to sloop-type-error
Index: sloop.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/sloop.lisp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sloop.lisp 2001/02/24 02:21:59 1.2
--- sloop.lisp 2001/12/05 05:58:26 1.3
***************
*** 593,597 ****
(t symbol)))
! (defun type-error ()
(error "While checking a bound of a sloop, I found the wrong type
for something in sloop::*automatic-declarations*.
--- 593,597 ----
(t symbol)))
! (defun sloop-type-error ()
(error "While checking a bound of a sloop, I found the wrong type
for something in sloop::*automatic-declarations*.
***************
*** 641,645 ****
(or chk value))
',type)
! (type-error))
,(or chk value)))))))
(t (list value))))
--- 641,645 ----
(or chk value))
',type)
! (sloop-type-error))
,(or chk value)))))))
(t (list value))))
***************
*** 837,841 ****
(t `(> ,var ,(+ most-negative-fixnum
(or inc 1)))))
! (type-error))
*loop-increment*)
)))))
--- 837,841 ----
(t `(> ,var ,(+ most-negative-fixnum
(or inc 1)))))
! (sloop-type-error))
*loop-increment*)
)))))
|
|
From: Vadim V. Z. <vv...@us...> - 2001-12-05 05:55:21
|
Update of /cvsroot/maxima/maxima-pre59/src
In directory usw-pr-cvs1:/tmp/cvs-serv21639/src
Modified Files:
mlisp.lisp
Log Message:
mapply1 modified to fix problem with matchdeclare, defmatch on CL systems
Index: mlisp.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/mlisp.lisp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** mlisp.lisp 2001/05/06 18:27:49 1.4
--- mlisp.lisp 2001/12/05 05:55:18 1.5
***************
*** 141,144 ****
--- 141,146 ----
((functionp fn)
(apply fn args))
+ #+cl
+ ((EQ (CAR FN) 'LAMBDA) (APPLY (COERCE FN 'FUNCTION) ARGS))
#-cl
((EQ (CAR FN) 'LAMBDA) (APPLY FN ARGS))
|
|
From: Vadim V. Z. <vv...@us...> - 2001-11-25 07:38:38
|
Update of /cvsroot/maxima/maxima-pre59/src In directory usw-pr-cvs1:/tmp/cvs-serv23599 Modified Files: trmode.lisp Log Message: fix define_variable(foo,true,boolean) problem for clisp and cmucl Index: trmode.lisp =================================================================== RCS file: /cvsroot/maxima/maxima-pre59/src/trmode.lisp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** trmode.lisp 2001/02/24 02:21:59 1.2 --- trmode.lisp 2001/11/25 07:38:18 1.3 *************** *** 221,230 **** ; hack because macsyma PROG binds variable ; to itself. ! (let ((CHECKER (ASSQ MODE '(($FLOAT . FLOATP) ($FIXNUM . INTEGERP) ($NUMBER . NUMBERP) ($LIST . $LISTP) ! ($BOOLEAN . (LAMBDA (U) ! (MEMQ U '(T NIL))))))) (nchecker (assq mode '(($float . $real) ($fixnum . $integer) --- 221,230 ---- ; hack because macsyma PROG binds variable ; to itself. ! (let ((CHECKER (ASSQ MODE `(($FLOAT . FLOATP) ($FIXNUM . INTEGERP) ($NUMBER . NUMBERP) ($LIST . $LISTP) ! ($BOOLEAN . ,#'(LAMBDA (U) ! (MEMQ U '(T NIL))))))) (nchecker (assq mode '(($float . $real) ($fixnum . $integer) |
|
From: Vadim V. Z. <vv...@us...> - 2001-11-19 04:45:55
|
Update of /cvsroot/maxima/maxima-pre59/src
In directory usw-pr-cvs1:/tmp/cvs-serv13057
Modified Files:
ChangeLog acall.lisp compile-clisp.lisp maxima-package.lisp
plot.lisp
Log Message:
dfstruct polygon moved out of eval-when for clisp
Index: ChangeLog
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/ChangeLog,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ChangeLog 2001/04/20 22:39:48 1.8
--- ChangeLog 2001/11/19 04:45:52 1.9
***************
*** 1,2 ****
--- 1,6 ----
+ 2001-11-19 Vadim V. Zhytnikov <vv...@ma...>
+
+ * patches to fix problems with new clisp releases.
+
2001-04-20 Bill Schelter <wf...@so...>
Index: acall.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/acall.lisp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** acall.lisp 2000/05/08 06:09:42 1.1.1.1
--- acall.lisp 2001/11/19 04:45:52 1.2
***************
*** 44,48 ****
#+cl
((and (symbolp f)(or (macro-function f)
! (special-form-p f)))
(eval (cons f (copy-rest-arg l))))
(T
--- 44,48 ----
#+cl
((and (symbolp f)(or (macro-function f)
! (special-operator-p f)))
(eval (cons f (copy-rest-arg l))))
(T
Index: compile-clisp.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/compile-clisp.lisp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** compile-clisp.lisp 2001/04/27 17:05:59 1.8
--- compile-clisp.lisp 2001/11/19 04:45:52 1.9
***************
*** 1,2 ****
--- 1,6 ----
+
+ (if (find-package "EXT")
+ (use-package "EXT"))
+
(push :main-files-loaded *features*)
(load "sysdef.lisp")
***************
*** 5,15 ****
(defun compile-maxima ()
! (make::make :maxima :compile t))
(defun save-maxima ()
(make::make :maxima )
! (lisp:gc)
! (lisp:saveinitmem "maxima-clisp.mem"
! :init-function #'user::run)
)
--- 9,20 ----
(defun compile-maxima ()
! (make::make :maxima :compile t)
! )
(defun save-maxima ()
(make::make :maxima )
! (gc)
! (saveinitmem "maxima-clisp.mem"
! :init-function #'user::run)
)
Index: maxima-package.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/maxima-package.lisp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** maxima-package.lisp 2001/04/27 13:36:48 1.6
--- maxima-package.lisp 2001/11/19 04:45:52 1.7
***************
*** 9,14 ****
(or (find-package "MAXIMA")
(make-package "MAXIMA"
! :nicknames '("CL-MACSYMA" "CL-MAXIMA" "MACSYMA" )
! :use '( "LISP" )))
(shadowing-import '(sloop::loop-return sloop::local-finish sloop::loop-finish sloop::sloop) "MAXIMA")
--- 9,14 ----
(or (find-package "MAXIMA")
(make-package "MAXIMA"
! :nicknames '("CL-MACSYMA" "CL-MAXIMA" "MACSYMA")
! :use `("LISP" #+clisp ,@(if (find-package "EXT") '("EXT"))) ))
(shadowing-import '(sloop::loop-return sloop::local-finish sloop::loop-finish sloop::sloop) "MAXIMA")
Index: plot.lisp
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/src/plot.lisp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** plot.lisp 2001/06/06 09:13:09 1.12
--- plot.lisp 2001/11/19 04:45:52 1.13
***************
*** 100,103 ****
--- 100,112 ----
(defbinop $/ / long-float)
+
+ #+clisp
+ (defstruct (polygon (:type list)
+ (:constructor make-polygon (pts edges))
+ )
+ (dummy '($polygon simp))
+ pts edges)
+
+
(eval-when (compile eval)
***************
*** 121,124 ****
--- 130,134 ----
`(print-pt1 ,f $pstream ))
+ #-clisp
(defstruct (polygon (:type list)
(:constructor make-polygon (pts edges))
|
|
From: Vadim V. Z. <vv...@us...> - 2001-11-19 04:43:27
|
Update of /cvsroot/maxima/maxima-pre59/doc In directory usw-pr-cvs1:/tmp/cvs-serv12642 Modified Files: tests.lisp Log Message: gcl and gmp specific part put under feature conditional Index: tests.lisp =================================================================== RCS file: /cvsroot/maxima/maxima-pre59/doc/tests.lisp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tests.lisp 2001/05/18 08:57:06 1.6 --- tests.lisp 2001/11/19 04:43:24 1.7 *************** *** 8,12 **** ;(load (pathname "../src/trgsmp")) ! (si::set-gmp-allocate-relocatable t) (setf (get 'maxima::%cosh 'maxima::translated) t);;so that kill won't remprop. --- 8,12 ---- ;(load (pathname "../src/trgsmp")) ! #+gmp (si::set-gmp-allocate-relocatable t) (setf (get 'maxima::%cosh 'maxima::translated) t);;so that kill won't remprop. |
|
From: Jay B. <bel...@us...> - 2001-11-11 01:54:48
|
Update of /cvsroot/maxima/maxima-pre59/emacs
In directory usw-pr-cvs1:/tmp/cvs-serv4388
Modified Files:
maximadoc.el
Log Message:
The font-locking was improved (or at least changed a bit).
Index: maximadoc.el
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/emacs/maximadoc.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** maximadoc.el 2001/11/08 22:26:00 1.1
--- maximadoc.el 2001/11/11 01:54:45 1.2
***************
*** 86,112 ****
;;
- ;;; Change Log:
-
- ;; $Log$
- ;; Revision 1.1 2001/11/08 22:26:00 belanger
- ;; Initial commit of maximadoc mode for Emacs.
- ;;
- ;; Revision 1.5 2001/11/06 22:51:05 jay
- ;; I added some brief installation instructions.
- ;;
- ;; Revision 1.4 2001/11/06 19:27:56 jay
- ;; I update the internal documentation.
- ;;
- ;; Revision 1.3 2001/11/06 17:40:31 jay
- ;; I fixed a problem with the output display.
- ;;
- ;; Revision 1.2 2001/11/05 13:40:07 jaycvs
- ;; I fixed the update functions, and made a few other minor fixes.
- ;;
- ;; Revision 1.1 2001/11/04 21:04:55 jaycvs
- ;; Initial checkin of maximadoc.el.
- ;;
-
-
(require 'maxima)
(provide 'maximadoc)
--- 86,89 ----
***************
*** 439,451 ****
;;; @@ The mode
- ;;; First of all, I want to be able to change the keymap depending
- ;;; on whether the point is in a cell or not.
- ;;; So I need one keymap for when in a cell, and one for when
- ;;; not in a cell.
- ;;; Changing the keymaps doesn't seem to work, so I'll have to do
- ;;; it on a key by key basis.
- ;;; maxima-add-keys will add the maxima keys.
-
-
;; First, find out what kind of TeX mode is being used.
(cond
--- 416,419 ----
***************
*** 489,492 ****
--- 457,473 ----
(setq maximadoc-mode-map map)))
+ ;;; A function for font-locking
+ (defun maximadoc-match-cells (limit)
+ "Used to fontify whatever's between \\maximadoc and \\endmaximadoc."
+ (when (re-search-forward "\\\\maximadoc"
+ limit t)
+ (let ((beg (match-end 0)) end)
+ (if (search-forward "\\endmaximadoc"
+ limit 'move)
+ (setq end (match-beginning 0))
+ (setq end (point)))
+ (store-match-data (list beg end))
+ t)))
+
(define-derived-mode maximadoc-mode texmode "MaximaDoc"
"This is a mode intended to allow the user to write documents that
***************
*** 534,581 ****
(make-local-variable 'ispell-tex-p)
(setq ispell-tex-p t))
! (if (eq maximadoc-use-tex 'auctex)
! (progn
! (require 'font-latex)
! (add-hook 'maximadoc-mode-hook 'font-latex-setup)))
(run-hooks 'maximadoc-mode-hook))
-
- (if (eq maximadoc-use-tex 'auctex)
- (put 'latex-mode 'font-lock-defaults 'maximadoc-mode))
- ;; Now, some more font-locking
- ;; Some more fontlocking
- ;; First, fontify the \maxima and \endmaxima
-
- (if (fboundp 'font-lock-add-keywords)
- (progn
- (defun maximadoc-font-lock-doc-cell (limit)
- "Used to fontify whatever's between \\maximadoc and \\endmaximadoc."
- (when (re-search-forward "\\\\maximadoc"
- limit t)
- (let ((beg (match-end 0)) end)
- (if (search-forward "\\\\endmaximadoc"
- limit 'move)
- (setq end (match-beginning 0))
- (setq end (point)))
- (store-match-data (list beg end))
- t)))
- (defun maximadoc-font-lock-nodoc-cell (limit)
- "Used to fontify whatever's between \\maximanodoc and \\endmaximanodoc."
- (when (re-search-forward "\\\\maximanodoc"
- limit t)
- (let ((beg (match-end 0)) end)
- (if (search-forward "\\\\endmaximanodoc"
- limit 'move)
- (setq end (match-beginning 0))
- (setq end (point)))
- (store-match-data (list beg end))
- t)))
- (font-lock-add-keywords 'maximadoc-mode
- '((maximadoc-font-lock-doc-cell
- (0 font-lock-function-name-face append t))
- (maximadoc-font-lock-nodoc-cell
- (0 font-lock-function-name-face append t))))
- (font-lock-add-keywords 'maximadoc-mode
- '(("\\(\\\\\\(endmaxima\\(?:\\(?:no\\)?doc\\)\\|maxima\\(?:\\(?:no\\)?doc\\)\\|session\\)\\)"
- . font-lock-keyword-face)))))
;;; Now, the menu.
--- 515,533 ----
(make-local-variable 'ispell-tex-p)
(setq ispell-tex-p t))
! (when (eq maximadoc-use-tex 'auctex)
! (require 'font-latex)
! (defvar maximadoc-keywords
! (append font-latex-keywords-2
! '((maximadoc-match-cells (0 font-lock-function-name-face t t))
! ("\\(\\\\\\(endmaximadoc\\|session\\|maximadoc\\)\\)"
! (0 font-lock-keyword-face t t))))
! "Keywords for MaximaDoc font-locking.")
! (make-local-variable 'font-lock-defaults)
! (setq font-lock-defaults
! '(maximadoc-keywords
! nil nil ((?\( . ".") (?\) . ".") (?$ . "\"")) nil
! (font-lock-comment-start-regexp . "%")
! (font-lock-mark-block-function . mark-paragraph))))
(run-hooks 'maximadoc-mode-hook))
;;; Now, the menu.
|
|
From: Jay B. <bel...@us...> - 2001-11-11 01:53:23
|
Update of /cvsroot/maxima/maxima-pre59/emacs
In directory usw-pr-cvs1:/tmp/cvs-serv4071
Modified Files:
maxima.el
Log Message:
All the font-locking was moved to maxima-font-lock.el.
The syntax table was changed (to make % and _ word elements).
The old changelog was removed.
Index: maxima.el
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/emacs/maxima.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** maxima.el 2001/11/08 22:25:21 1.1
--- maxima.el 2001/11/11 01:53:21 1.2
***************
*** 182,286 ****
;; C-c C-d
- ;;; Change Log:
-
- ;; $Log$
- ;; Revision 1.1 2001/11/08 22:25:21 belanger
- ;; Initial commit of maxima mode for Emacs.
- ;;
- ;; Revision 1.23 2001/11/08 16:41:16 jay
- ;; I made some changes so this would work with XEmacs.
- ;;
- ;; Revision 1.22 2001/11/06 21:08:40 jay
- ;; I fixed a problem with maxima-mode not recognizing when
- ;; a computation is finished.
- ;;
- ;; Revision 1.21 2001/11/06 20:52:06 jay
- ;; I changed the default behavior of maxima-send-region to check for
- ;; parentheses.
- ;;
- ;; Revision 1.20 2001/11/06 17:23:06 jay
- ;; I updated the documentation to reflect J"urgen's changes.
- ;;
- ;; Revision 1.19 2001/11/06 17:09:50 jay
- ;; I added J"urgen Tischer's changes.
- ;;
- ;; Revision 1.18 2001/11/05 13:45:07 jaycvs
- ;; I added a `get last input prompt' function.
- ;;
- ;; Revision 1.17 2001/11/03 19:58:22 jaycvs
- ;; I added some functions to copy the last maxima output
- ;; without the prompts.
- ;;
- ;; Revision 1.16 2001/11/02 20:09:41 jay
- ;; I made some fixes for getting the TeXed output.
- ;;
- ;; Revision 1.15 2001/11/02 17:04:41 jay
- ;; I changed the behavior (and names) of the copy-last-output functions.
- ;;
- ;; Revision 1.14 2001/11/02 03:02:00 jaycvs
- ;; I changed some names, so that all names begin with
- ;; maxima-
- ;; inferior-maxima-
- ;; or maxima-debug-
- ;;
- ;; Revision 1.13 2001/11/01 21:58:49 jay
- ;; I fixed `maxima-last-output'.
- ;; It no longer uses a filter to keep track of the last output, since
- ;; that wasn't working correctly.
- ;;
- ;; Revision 1.12 2001/11/01 21:26:21 jay
- ;; I put `maxima-wait' back in.
- ;;
- ;; Revision 1.11 2001/11/01 03:46:03 jaycvs
- ;; I added the functions `maxima-last-output' and
- ;; `maxima-last-tex-output', for getting copies of the last output.
- ;;
- ;; Revision 1.10 2001/10/25 21:00:54 jay
- ;; I fixed a bug where sending a line in the process buffer would signal
- ;; an error if the point were between parentheses.
- ;;
- ;; Revision 1.9 2001/10/25 20:44:24 jay
- ;; I fixed it so that a Maxima process can be started even if there's a
- ;; dead one laying around.
- ;;
- ;; Revision 1.8 2001/10/21 19:16:20 jay
- ;; I made a minor correction to maxima-complete.
- ;;
- ;; Revision 1.7 2001/10/21 16:09:55 jay
- ;; I fixed a minor keymap problem.
- ;;
- ;; Revision 1.6 2001/10/21 16:03:03 jay
- ;; I made the user changable variables customizable.
- ;;
- ;; Revision 1.5 2001/10/21 05:45:01 jay
- ;; I added Jürgen Tischer's maxima-complete to provide a completion
- ;; mechanism to maxima-mode. I then added maxima-dynamic-complete to add
- ;; another completion mechanism.
- ;; To bind both of these to TABs, some other keybindings were changed.
- ;; maxima-complete is bound to M-TAB
- ;; maxima-dynamic-complete is bound to C-TAB
- ;; (in both maxima-mode and inferior-maxima-mode).
- ;; In maxima-mode
- ;; maxima-stop is now bound to M-C-k
- ;; maxima-indent-form is now bound to M-C-q (this matches indent-sexp in
- ;; lisp mode)
- ;; In inferior-maxima-mode
- ;; inferior-maxima-smart-complete is now bound to M-C-TAB.
- ;;
- ;; Revision 1.3 2001/10/19 19:16:41 jay
- ;; I did some minor clean-up.
- ;;
- ;; Revision 1.2 2001/10/19 18:50:50 jay
- ;; I removed the lisp-level functions. (Lisp work, I suppose, should be
- ;; done in lisp-mode.)
- ;; I removed `inferior-maxima-backward/forward-prompt', since comint can
- ;; take care of that.
- ;; I removed the "don't show Maxima buffer when a command is sent"
- ;; option; it was left over from mupad.el (to be used by emupad.el).
- ;;
- ;; Revision 1.1.1.1 2001/10/10 19:37:15 jay
- ;; Initial checkin of files to CVS.
- ;;
-
;;; Code:
--- 182,185 ----
***************
*** 292,298 ****
(require 'comint)
(require 'easymenu)
! (if running-xemacs
! (require 'maxima-font-lock-xemacs)
! (require 'maxima-font-lock))
(provide 'maxima)
--- 191,195 ----
(require 'comint)
(require 'easymenu)
! (require 'maxima-font-lock)
(provide 'maxima)
***************
*** 1253,1271 ****
(modify-syntax-entry ?% "w" maxima-mode-syntax-table)
(modify-syntax-entry ?? "w" maxima-mode-syntax-table)
! (while (< i ?0)
! (modify-syntax-entry i "_ " maxima-mode-syntax-table)
! (setq i (1+ i)))
! (setq i (1+ ?9))
! (while (< i ?A)
! (modify-syntax-entry i "_ " maxima-mode-syntax-table)
! (setq i (1+ i)))
! (setq i (1+ ?Z))
! (while (< i ?a)
! (modify-syntax-entry i "_ " maxima-mode-syntax-table)
! (setq i (1+ i)))
! (setq i (1+ ?z))
! (while (< i 128)
! (modify-syntax-entry i "_ " maxima-mode-syntax-table)
! (setq i (1+ i)))
(modify-syntax-entry ? " " maxima-mode-syntax-table)
(modify-syntax-entry ?\t " " maxima-mode-syntax-table)
--- 1150,1168 ----
(modify-syntax-entry ?% "w" maxima-mode-syntax-table)
(modify-syntax-entry ?? "w" maxima-mode-syntax-table)
! ;; (while (< i ?0)
! ;; (modify-syntax-entry i "_ " maxima-mode-syntax-table)
! ;; (setq i (1+ i)))
! ;; (setq i (1+ ?9))
! ;; (while (< i ?A)
! ;; (modify-syntax-entry i "_ " maxima-mode-syntax-table)
! ;; (setq i (1+ i)))
! ;; (setq i (1+ ?Z))
! ;; (while (< i ?a)
! ;; (modify-syntax-entry i "_ " maxima-mode-syntax-table)
! ;; (setq i (1+ i)))
! ;; (setq i (1+ ?z))
! ;; (while (< i 128)
! ;; (modify-syntax-entry i "_ " maxima-mode-syntax-table)
! ;; (setq i (1+ i)))
(modify-syntax-entry ? " " maxima-mode-syntax-table)
(modify-syntax-entry ?\t " " maxima-mode-syntax-table)
***************
*** 1281,1285 ****
(modify-syntax-entry ?- "." maxima-mode-syntax-table)
(modify-syntax-entry ?= "." maxima-mode-syntax-table)
- (modify-syntax-entry ?% "." maxima-mode-syntax-table)
(modify-syntax-entry ?< "." maxima-mode-syntax-table)
(modify-syntax-entry ?> "." maxima-mode-syntax-table)
--- 1178,1181 ----
***************
*** 1482,1488 ****
(use-local-map maxima-mode-map)
(maxima-mode-variables)
- (setq font-lock-defaults
- '(maxima-font-lock-keywords
- nil t nil maxima-beginning-of-form))
(run-hooks 'maxima-mode-hook))
--- 1378,1381 ----
***************
*** 2632,2639 ****
(maxima-mode-variables)
(use-local-map inferior-maxima-mode-map)
- ;; More font locking
- (setq font-lock-defaults
- '(inferior-maxima-font-lock-keywords
- nil t nil maxima-beginning-of-form))
;; Debugging stuff
(setq maxima-debug-last-frame nil)
--- 2525,2528 ----
***************
*** 2647,2651 ****
(add-to-list 'comint-output-filter-functions 'maxima-check-level)))
(set-process-sentinel inferior-maxima-process 'inferior-maxima-sentinel)
! (run-hooks 'maxima-mode-hook))
;;;; Running Maxima
--- 2536,2540 ----
(add-to-list 'comint-output-filter-functions 'maxima-check-level)))
(set-process-sentinel inferior-maxima-process 'inferior-maxima-sentinel)
! (run-hooks 'inferior-maxima-mode-hook))
;;;; Running Maxima
|
|
From: Jay B. <bel...@us...> - 2001-11-11 01:47:44
|
Update of /cvsroot/maxima/maxima-pre59/emacs In directory usw-pr-cvs1:/tmp/cvs-serv3187 Modified Files: maxima-font-lock.el Log Message: Font-locking for XEmacs was merged. The word boundaries for the font-lock regexps were fixed. The faces were made customizable. Index: maxima-font-lock.el =================================================================== RCS file: /cvsroot/maxima/maxima-pre59/emacs/maxima-font-lock.el,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** maxima-font-lock.el 2001/11/08 22:23:36 1.1 --- maxima-font-lock.el 2001/11/11 01:47:41 1.2 *************** *** 1,3 **** ! ;;; maxima-font-lock-maker.el --- create maxima-font-lock.el for maxima.el ;; Copyright: (C) 2001 Jay Belanger --- 1,3 ---- ! ;;; maxima-font-lock.el --- syntax highlighting for maxima.el ;; Copyright: (C) 2001 Jay Belanger *************** *** 32,80 **** ;;; This file is used for font-lock for maxima.el [...2489 lines suppressed...] ! nil t nil maxima-beginning-of-form))) ! ! (add-hook 'maxima-mode-hook 'maxima-font-setup) ! ! (defvar inferior-maxima-keywords ! (append maxima-keywords ! `( ! (,inferior-maxima-match-prompts (0 inferior-maxima-prompt-face t)) ! (,inferior-maxima-match-warnings (0 inferior-maxima-warning-face t)))) ! "Keywords for Inferior Maxima font-locking.") ! ! (defun inferior-maxima-font-setup () ! (make-local-variable 'font-lock-defaults) ! (setq font-lock-defaults ! '(inferior-maxima-keywords ! nil t nil maxima-beginning-of-form))) ! ! (add-hook 'inferior-maxima-mode-hook 'inferior-maxima-font-setup) ! ! ;;; End of maxima-font-lock.el |
|
From: Jay B. <bel...@us...> - 2001-11-11 01:45:02
|
Update of /cvsroot/maxima/maxima-pre59/emacs
In directory usw-pr-cvs1:/tmp/cvs-serv2931
Modified Files:
emaxima.el
Log Message:
The font-locking was changed (hopefully improved) slightly.
Index: emaxima.el
===================================================================
RCS file: /cvsroot/maxima/maxima-pre59/emacs/emaxima.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** emaxima.el 2001/11/08 22:21:30 1.1
--- emaxima.el 2001/11/11 01:44:59 1.2
***************
*** 40,69 ****
;; See the file EMintro.ps for a quick introduction.
- ;;; Change Log:
-
- ;; $Log$
- ;; Revision 1.1 2001/11/08 22:21:30 belanger
- ;; Initial commit of EMaxima elisp file.
- ;;
- ;; Revision 1.12 2001/11/06 16:13:32 jay
- ;; I added the keybinding M-C-k for maxima-stop.
- ;;
- ;; Revision 1.11 2001/11/06 04:31:07 jaycvs
- ;; I fixed the update to return to the original position when the update
- ;; if finished.
- ;;
- ;; Revision 1.10 2001/11/05 13:40:45 jaycvs
- ;; I fixed a minor problem with a regexp.
- ;;
- ;; Revision 1.9 2001/11/03 19:59:13 jaycvs
- ;; I added some functions to replace single lines,
- ;; and some general tidying up.
- ;;
- ;; Revision 1.8 2001/11/03 16:07:30 jaycvs
- ;; I made some of the variables customizable,
- ;; and a few other minor changes.
- ;;
-
-
(require 'maxima)
(provide 'emaxima)
--- 40,43 ----
***************
*** 160,174 ****
(insert "%-*-EMaxima-*-"))))
- ;(defun emaxima-set-output-to-tex ()
- ; "Arrange to have Maxima output in TeX form."
- ; (maxima-send-string "oldPrefoutput := Pref::output():")
- ; (maxima-send-string "Pref::output(x->print(Unquoted,generate::TeX(x))):")
- ; (maxima-wait))
-
- ;(defun emaxima-restore-output-form ()
- ; "Restore the output form to the original form."
- ; (maxima-send-string "Pref::output(oldPrefoutput):")
- ; (maxima-wait))
-
(defun emaxima-replace-assoc (alist key val)
"Replace ALIST KEY VALUE, if KEY present, else add KEY VALUE.
--- 134,137 ----
***************
*** 211,219 ****
With C-u prefix, update without confirmation at each cell."
(interactive "P")
- ; (emaxima-set-output-to-tex)
(if arg
(emaxima-update nil nil t)
(emaxima-update nil (y-or-n-p "Interactive update? ") t)))
- ; (emaxima-restore-output-form))
(defun emaxima-update-init (arg)
--- 174,180 ----
***************
*** 230,239 ****
With C-u prefix, update without confirmation at each cell."
(interactive "P")
- ; (emaxima-set-output-to-tex)
(if arg
(emaxima-update "\\[\\* Initialization Cell \\*\\]" nil t)
(emaxima-update "\\[\\* Initialization Cell \\*\\]"
(y-or-n-p "Interactive update? ") t)))
- ; (emaxima-restore-output-form))
(defun emaxima-create-cell ()
--- 191,198 ----
***************
*** 1197,1201 ****
(if (not (emaxima-cell-p))
(message "Not in cell.")
! (maxima-region (emaxima-cell-start) (emaxima-cell-end))))
(defun emaxima-update-cell (&optional tex)
--- 1156,1160 ----
(if (not (emaxima-cell-p))
(message "Not in cell.")
! (maxima-region-nodisplay (emaxima-cell-start) (emaxima-cell-end))))
(defun emaxima-update-cell (&optional tex)
***************
*** 1262,1274 ****
;;; @@ The mode
- ;;; First of all, I want to be able to change the keymap depending
- ;;; on whether the point is in a cell or not.
- ;;; So I need one keymap for when in a cell, and one for when
- ;;; not in a cell.
- ;;; Changing the keymaps doesn't seem to work, so I'll have to do
- ;;; it on a key by key basis.
- ;;; maxima-add-keys will add the maxima keys.
-
-
;; First, find out what kind of TeX mode is being used.
(cond
--- 1221,1224 ----
***************
*** 1320,1323 ****
--- 1270,1286 ----
(setq emaxima-mode-map map)))
+ ;;; A function for font-locking
+ (defun emaxima-match-cells (limit)
+ "Used to fontify whatever's between \\maxima and \\endmaxima."
+ (when (re-search-forward "\\\\maxima"
+ limit t)
+ (let ((beg (match-end 0)) end)
+ (if (search-forward "\\endmaxima"
+ limit 'move)
+ (setq end (match-beginning 0))
+ (setq end (point)))
+ (store-match-data (list beg end))
+ t)))
+
(define-derived-mode emaxima-mode tex-mode "EMaxima"
"This is a mode intended to allow the user to write documents that
***************
*** 1370,1407 ****
(make-local-variable 'ispell-tex-p)
(setq ispell-tex-p t))
! (if (eq emaxima-use-tex 'auctex)
! (progn
! (require 'font-latex)
! (add-hook 'emaxima-mode-hook 'font-latex-setup)))
(run-hooks 'emaxima-mode-hook))
-
- (if (eq emaxima-use-tex 'auctex)
- (put 'latex-mode 'font-lock-defaults 'emaxima-mode))
- ;; Now, some more font-locking
- ;; Some more fontlocking
- ;; First, fontify the \maxima and \endmaxima
-
- (if (fboundp 'font-lock-add-keywords)
- (progn
- (defun emaxima-font-lock-cell (limit)
- "Used to fontify whatever's between \\maxima and \\endmaxima."
- (when (re-search-forward "\\\\maxima"
- limit t)
- (let ((beg (match-end 0)) end)
- (if (search-forward "\\endmaxima"
- limit 'move)
- (setq end (match-beginning 0))
- (setq end (point)))
- (store-match-data (list beg end))
- t)))
-
- (font-lock-add-keywords 'emaxima-mode
- '((emaxima-font-lock-cell
- (0 font-lock-function-name-face append t))))
-
- (font-lock-add-keywords 'emaxima-mode
- '(("\\(\\\\\\(endmaxima\\|output\\(tex\\)?\\|maxima\\)\\)"
- . font-lock-keyword-face)))))
-
;;; Now, the menu.
--- 1333,1351 ----
(make-local-variable 'ispell-tex-p)
(setq ispell-tex-p t))
! (when (eq emaxima-use-tex 'auctex)
! (require 'font-latex)
! (defvar emaxima-keywords
! (append font-latex-keywords-2
! '((emaxima-match-cells (0 font-lock-function-name-face t t))
! ("\\(\\\\\\(endmaxima\\|output\\(tex\\)?\\|maxima\\)\\)"
! (0 font-lock-keyword-face t t))))
! "Keywords for EMaxima font-locking.")
! (make-local-variable 'font-lock-defaults)
! (setq font-lock-defaults
! '(emaxima-keywords
! nil nil ((?\( . ".") (?\) . ".") (?$ . "\"")) nil
! (font-lock-comment-start-regexp . "%")
! (font-lock-mark-block-function . mark-paragraph))))
(run-hooks 'emaxima-mode-hook))
;;; Now, the menu.
|
|
From: Jay B. <bel...@us...> - 2001-11-11 01:37:51
|
Update of /cvsroot/maxima/maxima-pre59/emacs In directory usw-pr-cvs1:/tmp/cvs-serv1683 Removed Files: maxima-font-lock-xemacs.el Log Message: The XEmacs font-locking was merged in with maxima-font-lock.el. --- maxima-font-lock-xemacs.el DELETED --- |
|
From: Jay B. <bel...@us...> - 2001-11-08 22:26:40
|
Update of /cvsroot/maxima/maxima-pre59/emacs
In directory usw-pr-cvs1:/tmp/cvs-serv12220
Added Files:
maximadoc.sty
Log Message:
Initial commit of LaTeX style file for maximadoc.
--- NEW FILE: maximadoc.sty ---
%% Macros needed for EMaxima.
%% Jay Belanger (bel...@tr...)
%%
%% Some of this was taken from Dan Dill's TeX/MMA (in modified
%% form, of course), and some was taken from other sources. Some
%% I may even have written myself.
\def\Maxima{{\sffamily\slshape Maxima\/}}
\def\maximadocheadersize{\tiny}
%% An if to allow the lines to be turned on and off
\newif\ifmaximadoclines
\maximadoclinesfalse
%% Let's use some local macros
\catcode`\@=11\relax
\newdimen\maximadocbaselineskip
\newdimen\premaximadocspace
\newdimen\postmaximadocspace
%% Here are the values that the user may wish to change.
%% They can be changed here or in the main TeX file.
\font\maximadocfont = cmtt10
\maximadocbaselineskip = 14pt
\premaximadocspace = 0pt
\postmaximadocspace = 1.5ex
%% First of all, set up some delimiters
%% The units are in terms of em and ex, so if the font size is
%% changed, the units will be changed accordingly
%% To make things line up, we'll need the size of "Initial"
\font\m@ximadocheaderfont=cmtt8 scaled 800
\def\sm@llsk{\vskip 1ex}
\def\m@ximadoctop{
\vskip -1ex
\hbox to \hsize{\vrule depth 1ex height .3pt width .4pt
\vrule height .4pt depth 0pt width 1.1em
\lower .4ex \hbox{\maximadocheadersize\ \Maxima}
\hrulefill
\vrule depth 1ex height .3pt width .4pt}
\vskip 1ex}
\def\m@ximadocbottom{
\hbox to \hsize{\vrule depth 0ex height 1ex width .4pt
\hrulefill
\vrule depth 0ex height 1ex width .4pt}
}
%% Next, it is necessary to have a verbatim environment for the Maximadoc
%% session.
%% The verbatim environment for the input is based mostly on the
%% environment from "TeX for the Impatient" and Tim Morgan's verbtim2.tex
\def\deactivate{%
\catcode`\{ = 12
\catcode`\} = 12
\catcode`\$ = 12
\catcode`\& = 12
\catcode`\# = 12
\catcode`\% = 12
\catcode`\~ = 12
\catcode`\^ = 12
\catcode`\_ = 12
\catcode`\ = 12
}
{\catcode`\^^M=13
{\catcode`\ =13\gdef\verbatimdefs{\def^^M{\ \par}\let =\ }}
\gdef\verbatimgobble#1^^M{}}
\def\nothing{}
\def\m@ximadocinputskip{
\ifx \nexttok \session
\let \next=\nothing
\else
\ifx \nexttok \endmaximadoc
\let \next=\nothing
\else
\let \next=\m@ximadocinputskiptwo
\fi
\fi
\next}
\def\m@ximadocinputskiptwo#1{\m@ximadocinput}
\def\m@ximadocinput{\begingroup\obeylines\futurelet\nexttok\m@ximadocinputskip}
\let\endm@ximadocinputskip=\endgroup
%% The verbatim for Maximadoc session is taken from the TeXbook.
%% It allows more symbols, but can't be used for the input
%% since the input can be ended with more than one delimiter.
\def\uncatcodespecials{\def\do##1{\catcode`##1=12 }\dospecials}
\chardef\active=13
\def\obeyspaces{\catcode`\ =\active}
{\catcode`\^^M=\active %
\gdef\obeylines{\catcode`\^^M=\active \let^^M=\par}%
\global\let^^M=\par} %
\def\setupm@ximadocverbatim{\maximadocfont
\obeylines \uncatcodespecials \obeyspaces}
{\obeyspaces\global\let =\ }
\def\m@ximadocsessionverbatim{\par\begingroup
\baselineskip = \maximadocbaselineskip
\setupm@ximadocverbatim\dom@ximadocverbatim}
{\catcode`\|=0 \catcode`\\=12 %
|obeylines|gdef|dom@ximadocverbatim^^M#1\endmaximadoc{#1|endgroup|ifmaximadoclines|m@ximadocbottom|fi|par|vskip 1.5ex|par|endgroup}}
%% Now we need to set up the actual environments.
%% We will need some "if"s to tell us where we are
\newif\ifm@ximadocinput
\newif\ifm@ximadocsession
\def\not@k{}
%% The top delimiter depends on whether or not it is an initial cell,
%% etc.
\def\maximadoc{
% \begingroup
\m@ximadocinputtrue
\m@ximadocinput
% \futurelet\nexttok\m@ximadocinputskip
}
%% Now to take care of the session
\def\session{
\endm@ximadocinputskip
% \sm@llsk
\par \vskip \premaximadocspace \par
\par
\vskip 1.5ex
\par
\ifmaximadoclines\m@ximadoctop\fi
\m@ximadocinputfalse
\m@ximadocsessiontrue
\m@ximadocsessionverbatim
}
\def\endmaximadoc{
\ifm@ximadocinput
\endm@ximadocinputskip
\m@ximadocinputfalse
\else
\ifm@ximadocsession
\ifmaximadoclines\m@ximadocbottom\fi
\par
\vskip \postmaximadocspace
\par
\sm@llsk
\fi
\fi
\endgroup
}
% Finally, to help with backslashes,
\def\bs{$\backslash$}
\catcode`\@=12\relax
\endinput
|
|
From: Jay B. <bel...@us...> - 2001-11-08 22:26:03
|
Update of /cvsroot/maxima/maxima-pre59/emacs In directory usw-pr-cvs1:/tmp/cvs-serv12014 Added Files: maximadoc.el Log Message: Initial commit of maximadoc mode for Emacs. --- NEW FILE: maximadoc.el --- ;; maximadoc.el Mode for interaction with Maxima from TeX buffer ;; Written 2/12/1991 by Dan Dill da...@ch... ;; Modified for Maxima by Jay Belanger ;; Copyright (C) 1991, 1993 Dan Dill (da...@ch...) ;; 1999-2001 Jay Belanger (bel...@tr...) ;; Author: Dan Dill ;; Jay Belanger ;; Maintainer: Jay Belanger <bel...@tr...> ;; $Name: $ ;; $Revision: 1.1 $ ;; $Date: 2001/11/08 22:26:00 $ ;; Keywords: maxima, maximadoc ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2 of ;; the License, or (at your option) any later version. ;; ;; This program is distributed in the hope that it will be ;; useful, but WITHOUT ANY WARRANTY; without even the implied ;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. See the GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public ;; License along with this program; if not, write to the Free ;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, ;; MA 02111-1307 USA ;; ;; ;; Please send suggestions and bug reports to <bel...@tr...>. ;; The latest version of this package should be available at ;; ftp://vh213601.truman.edu/pub/Maxima ;; You will need, in addition to this file, ;; maxima.el, maxima-font-lock.el, maxima-symbols.el, and maximadoc.sty ;;; Commentary: ;; ;; To use this mode, you need maximadoc.el, maxima.el (and ;; maxima-font-lock.el and maxima-symbols.el for maxima.el) as well ;; as maximadoc.sty in order to typeset the resulting document. ;; The elisp files need to be put in the emacs load path, and ;; maximadoc.sty needs to be put in the TeX input path. ;; To typeset the resulting document using LaTeX, put ;; \usepackage{maximadoc} ;; in the preamble. ;; MaximaDoc mode: ;; This is a mode intended to allow the user to write documents that ;; include Maxima code. The file can be LaTeXed to produce nice ;; looking sessions (although that isn't necessary, of course), and so the ;; mode is an extension of tex-mode (AucTeX). ;; The units of Maxima code that are worked with are "cells", which are ;; delimited by "\maximadoc" and "\endmaximadoc". The cells can be ;; evaluated individually, as a group, and the results can optionally be ;; returned. Evaluating a cell and returning the session is called ;; "updating" the cell. ;; If the openining cell delimiter is followed by "[* Hide *]", and so it ;; opens with "\maximadoc[* Hide *]", then updating the cell will send ;; the contents to Maxima, but nothing is returned to the document buffer, ;; and nothing shows when the document is processed by LaTeX. ;; The commands for working with cells are: ;; C-c C-o create a cell ;; C-c C-q toggles whether or not the cell is a "hidden" cell ;; C-c C-u a update all the cells ;; C-c + go to the next cell ;; C-c - go to the previous cell ;; (With a prefix, C-u C-c C-u a will update the cells without prompting) ;; Single lines can be evaluated: ;; C-c C-u l replace the current line with Maxima session ;; C-c C-u L replace the current line with Maxima session in TeX form. ;; Within a cell, the following commands are available: ;; C-c C-d delete the cell's session ;; C-c C-u c update the cell ;; C-c C-q toggle hidden cells ;; The Maxima process can be killed with the command C-M-k. ;; Finally, the command M-x maximadoc-mark-file-as-maximadoc will insert a ;; %-*-MaximaDoc-*- at the beginning of the file (if there isn't one there ;; already) so the file will begin in maximadoc-mode next time it's opened. ;; ;;; Change Log: ;; $Log: maximadoc.el,v $ ;; Revision 1.1 2001/11/08 22:26:00 belanger ;; Initial commit of maximadoc mode for Emacs. ;; ;; Revision 1.5 2001/11/06 22:51:05 jay ;; I added some brief installation instructions. ;; ;; Revision 1.4 2001/11/06 19:27:56 jay ;; I update the internal documentation. ;; ;; Revision 1.3 2001/11/06 17:40:31 jay ;; I fixed a problem with the output display. ;; ;; Revision 1.2 2001/11/05 13:40:07 jaycvs ;; I fixed the update functions, and made a few other minor fixes. ;; ;; Revision 1.1 2001/11/04 21:04:55 jaycvs ;; Initial checkin of maximadoc.el. ;; (require 'maxima) (provide 'maximadoc) ;;;; The variables that the user may wish to change (defgroup maximadoc nil "Maxima mode" :prefix "maximadoc-" :tag "MaximaDoc") (defcustom maximadoc-use-tex 'auctex "Possible modes to use within MaximaDoc. Possible choices are 'auctex, 'tex or nil" :group 'maximadoc :type '(choice :menu-tag "TeX style" :tag "TeX style" (const auctex) (const tex) (const nil))) ;;; Other variables and constants (defconst maximadoc-session-marker "\\session" "Contents of line separating input and session portion of cell.") (defconst maximadoc-tex-string "tex(%);" "A string to send to Maxima to set session to TeX form") (defun maximadoc-mark-file-as-maximadoc () "Mark the file as an MaximaDoc buffer. The next time the file is loaded, it will then be in MaximaDoc mode" (interactive) (save-excursion (goto-line 1) (beginning-of-line) (if (looking-at ".*-\\*-MaximaDoc-\\*-") () (open-line 1) (insert "%-*-MaximaDoc-*-")))) (defun maximadoc-toggle-hide () "Toggle hidden marker of cell containing point." (interactive) (save-excursion (re-search-backward "^\\\\maximadoc") (goto-char (match-end 0)) (if (looking-at "\\[\\* Hide \\*\\]") (delete-region (match-beginning 0) (match-end 0)) (insert "[* Hide *]")))) (defun maximadoc-create-cell () "Insert cell in buffer." (interactive) (if (maximadoc-cell-p) (error "Cell already exists") (if (not (bolp)) (progn (open-line 1) (forward-line 1))) (insert "\\maximadoc\n\n\\endmaximadoc") (unless (looking-at " *$") (insert "\n") (forward-line -1)) (beginning-of-line) (previous-line 1))) (defun maximadoc-forward-cell () "Move to next cell." (interactive) (let ((cur-pos (point)) (cell-pos (point-max)) new-pos) (setq new-pos (maximadoc-next-cell-start)) (if (not (equal new-pos cur-pos)) (if (> new-pos cell-pos) nil (setq cell-pos new-pos))) (if (equal cell-pos (point-max)) nil; No more cells (goto-char cell-pos)))) (defun maximadoc-backward-cell () "Move to previous cell." (interactive) (let ((cur-pos (point)) (cell-pos (point-min)) new-pos) (setq new-pos (maximadoc-previous-cell-start)) (if (not (equal new-pos cur-pos)) (if (< new-pos cell-pos) nil (setq cell-pos new-pos))) (if (equal cell-pos (point-min)) nil ; No more cells (goto-char cell-pos)))) (defun maximadoc-update (&optional noask) "Optionally update all cells. If NOASK is non-nil, then update without confirmation at each cell." (interactive "P") (if (not noask) (setq noask (not (y-or-n-p "Interactive update? ")))) (let (bypass display-start display-end cur-pos) (save-excursion (goto-char (point-min)) (while (maximadoc-forward-cell) (forward-line -1) (setq display-start (point)) (goto-char (maximadoc-cell-end)) (forward-line 1) ; We need to include cell trailer in narrowed region (end-of-line) ; .. (setq display-end (point)) (forward-line 0) (unwind-protect (progn (narrow-to-region display-start display-end) (goto-char (point-min)) (recenter 1) ; force display, just in case... (forward-line 1) (if (and (not noask) (not (y-or-n-p "Update this cell? "))) t (maximadoc-send-or-update-cell))) (widen) ; If user aborts evaluation at prompt ) ; unwind-protect ) ; while still types to check (widen) (sit-for 1) ) ; save-excursion (message (concat "Update of cells finished.")))) (defun maximadoc-cell-start () "Return position of start of cell containing point." (let ((begin-re "^\\\\maximadoc")) (save-excursion (if (not (looking-at begin-re)) (re-search-backward begin-re)) (forward-line 1) (point)))) (defun maximadoc-cell-end () "Return position of end of cell containing point." (let ((end-re "^\\\\endmaximadoc")) (save-excursion (re-search-forward end-re) (forward-line -1) (end-of-line) (point)))) (defun maximadoc-previous-cell-start () "Get start of preceding cell. If none, return current position." (let ((cur-pos (point)) (start nil) (begin-re "^\\\\maximadoc") (end-re "^\\\\endmaximadoc")) (save-excursion (if (not (re-search-backward end-re (point-min) t)) cur-pos (if (maximadoc-cell-p) (progn (re-search-backward begin-re) (forward-line 1) (point)) cur-pos))))) (defun maximadoc-next-cell-start () "Get start of next cell. If none, return current position." (let ((cur-pos (point)) (start nil) (begin-re "^\\\\maximadoc") (end-re "^\\\\endmaximadoc")) (save-excursion (if (re-search-forward begin-re (point-max) t) (progn (if (not (maximadoc-cell-p)) cur-pos) (forward-line 1) (point)) cur-pos)))) (defun maximadoc-cell-p () "Returns t if point is in a MaximaDoc cell, else returns nil." (let ((begin-re "^\\\\maximadoc") (end-re "^\\\\endmaximadoc") (found nil)) (save-excursion (if (re-search-backward begin-re (point-min) t) ; \maxima (setq found (point)))) (save-excursion (if (and found (re-search-backward end-re found t)) ; Intervening \endmaxima (setq found nil))) (save-excursion (if (and found (re-search-forward end-re (point-max) t)) ;\endmaxima (setq found (point)))) (save-excursion (if (and found (re-search-forward begin-re found t)) ; Intervening \maxima (setq found nil))) (if found t nil))) (defun maximadoc-delete-session () "Delete current session (if any). Assumes point in cell. Session assumed to follow input, separated by a maximadoc-session-marker line. Input *may* contain blank lines." (interactive) (let ((out-start (maximadoc-session-p))) (if out-start (delete-region out-start (maximadoc-cell-end)) t))) (defun maximadoc-session-p () "Return start of session text if present, else return nil. Assumes point in cell. Session assumed to follow input, separated by a \\session." (save-excursion (goto-char (maximadoc-cell-start)) (if (re-search-forward "^\\\\session" (maximadoc-cell-end) t) (progn (forward-line -1) (end-of-line) (point)) nil))) ;;; @@ MaximaDoc functions for "maxima" cells (defun maximadoc-get-cell-contents () "Return the cell contents as a string." (if (not (maximadoc-cell-p)) (message "Not in Maxima cell")) (let ((home-buffer (current-buffer)) (start) (end)) (save-excursion (goto-char (maximadoc-cell-start)) ;; Now I want to skip over any blank lines at the beginning of the cell (beginning-of-line) (while (looking-at "^ *$") (forward-line 1)) (setq start (point)) ;; as well as at the end of the cell (if (not (setq end (maximadoc-session-p))) (progn (goto-char (maximadoc-cell-end)) (while (looking-at "^ *$") (forward-line -1)) (end-of-line) (setq end (point))) (progn (goto-char end) (while (looking-at "^ *$") (forward-line -1)) (end-of-line) (setq end (point))))) (buffer-substring-no-properties start end))) (defun maximadoc-send-cell () "Send the current cell's contents to Maxima." (interactive) (if (not (maximadoc-cell-p)) (message "Not in cell.") (maximadoc-delete-session) (maxima-region-nodisplay (maximadoc-cell-start) (maximadoc-cell-end)))) (defun maximadoc-update-cell () "Send the current cell's contents to Maxima, and return the results." (interactive) (save-excursion (maximadoc-delete-session) (let ((end) (cell (maximadoc-get-cell-contents))) (goto-char (maximadoc-cell-end)) (forward-line 1) (insert "\\session\n") (while (setq end (string-match "[$;]" cell)) (maxima-string-nodisplay (substring cell 0 (1+ end))) (insert (maxima-last-input-prompt)) (while (or (string= "\n" (substring cell 0 1)) (string= " " (substring cell 0 1))) (setq cell (substring cell 1)) (setq end (- end 1))) (insert (substring cell 0 (1+ end))) (unless (string= "\n" (substring cell end (1+ end))) (insert "\n")) (insert "\n") (insert (maxima-last-output)) (setq cell (substring cell (1+ end))))))) (defun maximadoc-send-or-update-cell () "Send input to Maxima and replace session with result. Point must be in cell. Session assumed to follow input, separated by a maximadoc-session-marker line." (interactive) (if (not (maximadoc-cell-p)) (message "Not in MaximaDoc cell")) (save-excursion (re-search-backward "\\maximadoc") (goto-char (match-end 0)) (if (looking-at "\\[\\* Hide \\*\\]") (maximadoc-send-cell) (maximadoc-update-cell)))) (defun maximadoc-replace-line-with-tex () "Sends the current line to Maxima, and then replaces it with the Maxima session in TeX form." (interactive) (maxima-send-line-nodisplay) (maxima-wait) (maxima-string-nodisplay maximadoc-tex-string) (beginning-of-line) (insert "% ") (end-of-line) (newline) (insert (maxima-last-session-tex-noprompt))) (defun maximadoc-replace-line () "Sends the current line to Maxima, and then replaces it with the Maxima session." (interactive) (maxima-send-line-nodisplay) (maxima-wait) (beginning-of-line) (insert "% ") (end-of-line) (newline) (insert (maxima-last-session-noprompt))) ;;; @@ The mode ;;; First of all, I want to be able to change the keymap depending ;;; on whether the point is in a cell or not. ;;; So I need one keymap for when in a cell, and one for when ;;; not in a cell. ;;; Changing the keymaps doesn't seem to work, so I'll have to do ;;; it on a key by key basis. ;;; maxima-add-keys will add the maxima keys. ;; First, find out what kind of TeX mode is being used. (cond ((eq maximadoc-use-tex 'auctex) (require 'tex-site) ;; I don't think this is the best thing to do... (load "latex") (setq texmode-map LaTeX-mode-map) (defun texmode () (latex-mode))) ((eq maximadoc-use-tex 'tex) (require 'tex-mode) (setq texmode-map tex-mode-map) (defun texmode () (tex-mode))) (t (autoload 'text-mode "text-mode") (setq texmode-map text-mode-map) (defun texmode () (text-mode)))) ;;; Now, define the keymap (defvar maximadoc-mode-map nil "The keymap for maximadoc-mode") (if maximadoc-mode-map nil (let ((map (copy-keymap texmode-map))) (define-key map "\C-c\C-u" nil) (define-key map "\C-c+" 'maximadoc-forward-cell) (define-key map "\C-c-" 'maximadoc-backward-cell) (define-key map "\C-c\C-ua" 'maximadoc-update) (define-key map "\C-c\C-o" 'maximadoc-create-cell) (define-key map "\C-c\C-ul" 'maximadoc-replace-line) (define-key map "\C-c\C-uL" 'maximadoc-replace-line-with-tex) (define-key map "\M-\C-k" 'maxima-stop) ;; And some maximadoc keys that make sense in cells (define-key map "\C-c\C-s" 'maximadoc-send-cell) (define-key map "\C-c\C-uc" 'maximadoc-send-or-update-cell) (define-key map "\C-c\C-d" 'maximadoc-delete-session) (define-key map "\C-c\C-q" 'maximadoc-toggle-hide) (define-key map "\C-c\C-h" 'maxima-help) (define-key map "\C-c\C-i" 'maxima-info) (setq maximadoc-mode-map map))) (define-derived-mode maximadoc-mode texmode "MaximaDoc" "This is a mode intended to allow the user to write documents that include Maxima code. The file can be LaTeXed to produce nice looking sessions (although that isn't necessary, of course), and so the mode is an extension of tex-mode (AucTeX). The units of Maxima code that are worked with are \"cells\", which are delimited by \"\\maximadoc\" and \"\\endmaximadoc\". The cells can be evaluated individually, as a group, and the results can optionally be returned. Evaluating a cell and returning the session is called \"updating\" the cell. If the openining cell delimiter is followed by \"[* Hide *]\", and so it opens with \"\\maximadoc[* Hide *]\", then updating the cell will send the contents to Maxima, but nothing is returned to the document buffer, and nothing shows when the document is processed by LaTeX. The commands for working with cells are: \\[maximadoc-create-cell] create a cell \\[maximadoc-toggle-hide] toggles whether or not the cell is a \"hidden\" cell \\[maximadoc-update] update all the cells \\[maximadoc-forward-cell] go to the next cell \\[maximadoc-backward-cell] go to the previous cell (With a prefix, C-u \\[maximadoc-update] will update the cells without prompting) Single lines can be evaluated: \\[maximadoc-replace-line] replace the current line with Maxima session \\[maximadoc-replace-line-with-tex] replace the current line with Maxima session in TeX form. Within a cell, the following commands are available: \\[maximadoc-delete-session] delete the cell's session \\[maximadoc-send-or-update-cell] update the cell \\[maximadoc-toggle-hide] toggle hidden cells The Maxima process can be killed with the command \\[maxima-stop]. Finally, the command \\[maximadoc-mark-file-as-maximadoc] will insert a %-*-MaximaDoc-*- at the beginning of the file (if there isn't one there already) so the file will begin in maximadoc-mode next time it's opened. \\{maximadoc-mode-map} " (when (or (eq maximadoc-use-tex 'auctex) (eq maximadoc-use-tex 'tex)) (make-local-variable 'ispell-parser) (setq ispell-parser 'tex) (make-local-variable 'ispell-tex-p) (setq ispell-tex-p t)) (if (eq maximadoc-use-tex 'auctex) (progn (require 'font-latex) (add-hook 'maximadoc-mode-hook 'font-latex-setup))) (run-hooks 'maximadoc-mode-hook)) (if (eq maximadoc-use-tex 'auctex) (put 'latex-mode 'font-lock-defaults 'maximadoc-mode)) ;; Now, some more font-locking ;; Some more fontlocking ;; First, fontify the \maxima and \endmaxima (if (fboundp 'font-lock-add-keywords) (progn (defun maximadoc-font-lock-doc-cell (limit) "Used to fontify whatever's between \\maximadoc and \\endmaximadoc." (when (re-search-forward "\\\\maximadoc" limit t) (let ((beg (match-end 0)) end) (if (search-forward "\\\\endmaximadoc" limit 'move) (setq end (match-beginning 0)) (setq end (point))) (store-match-data (list beg end)) t))) (defun maximadoc-font-lock-nodoc-cell (limit) "Used to fontify whatever's between \\maximanodoc and \\endmaximanodoc." (when (re-search-forward "\\\\maximanodoc" limit t) (let ((beg (match-end 0)) end) (if (search-forward "\\\\endmaximanodoc" limit 'move) (setq end (match-beginning 0)) (setq end (point))) (store-match-data (list beg end)) t))) (font-lock-add-keywords 'maximadoc-mode '((maximadoc-font-lock-doc-cell (0 font-lock-function-name-face append t)) (maximadoc-font-lock-nodoc-cell (0 font-lock-function-name-face append t)))) (font-lock-add-keywords 'maximadoc-mode '(("\\(\\\\\\(endmaxima\\(?:\\(?:no\\)?doc\\)\\|maxima\\(?:\\(?:no\\)?doc\\)\\|session\\)\\)" . font-lock-keyword-face))))) ;;; Now, the menu. (easy-menu-define maximadoc-menu maximadoc-mode-map "MaximaDoc mode menu" '("MaximaDoc" ("Cells" ["Create cell" maximadoc-create-cell (not (maximadoc-cell-p))] ["Send cell" maximadoc-send-cell (maximadoc-cell-p)] ["Update cell" maximadoc-send-or-update-cell (maximadoc-cell-p)] ["Delete session" maximadoc-delete-session (maximadoc-cell-p)] ["Toggle hidden" maximadoc-toggle-hide (maximadoc-cell-p)] ["Forward cell" maximadoc-forward-cell] ["Backwards cell" maximadoc-backward-cell]) ("Update" ["Update line" maximadoc-replace-line (not (maximadoc-cell-p))] ["TeX update line" maximadoc-replace-line-with-tex (not (maximadoc-cell-p))] ["Update all cells" maximadoc-update]) ("Process" ["Kill Maxima process" maxima-stop (processp maxima-process)]) ("Misc" ["Mark file as MaximaDoc" maximadoc-mark-file-as-maximadoc]) ("Help" ["Info" maxima-info] ["Help" maxima-help]))) ;;; The next line is necessary for XEmacs (easy-menu-add maximadoc-menu maximadoc-mode-map) ;;; maximadoc.el ends here |
|
From: Jay B. <bel...@us...> - 2001-11-08 22:25:24
|
Update of /cvsroot/maxima/maxima-pre59/emacs
In directory usw-pr-cvs1:/tmp/cvs-serv11785
Added Files:
maxima.el
Log Message:
Initial commit of maxima mode for Emacs.
--- NEW FILE: maxima.el ---
;;; maxima.el --- Major modes for writing Maxima code
;; Copyright (C) 1998,1999 William F. Schelter
;; Copyright (C) 2001 Jay Belanger
;; Author: William F. Schelter
;; Jay Belanger
;; Maintainer: Jay Belanger <bel...@tr...>
;; $Name: $
;; $Revision: 1.1 $
;; $Date: 2001/11/08 22:25:21 $
;; Keywords: maxima
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2 of
;; the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be
[...2622 lines suppressed...]
(setq maxima-debug-filter-accumulator nil)
(if running-xemacs
(add-to-list 'comint-output-filter-functions 'maxima-check-level)
(if inferior-maxima-use-debug
(add-to-list 'comint-preoutput-filter-functions 'inferior-maxima-filter)
(add-to-list 'comint-output-filter-functions 'maxima-check-level)))
(set-process-sentinel inferior-maxima-process 'inferior-maxima-sentinel)
(run-hooks 'maxima-mode-hook))
;;;; Running Maxima
(defun maxima ()
"Run Maxima interactively inside a buffer."
(interactive)
(maxima-start)
(switch-to-buffer (process-buffer inferior-maxima-process)))
(provide 'maxima)
;;; maxima.el ends here
|
|
From: Jay B. <bel...@us...> - 2001-11-08 22:24:34
|
Update of /cvsroot/maxima/maxima-pre59/emacs
In directory usw-pr-cvs1:/tmp/cvs-serv11304
Added Files:
maxima-symbols.el
Log Message:
Initial commit of elisp file for completion support in Emacs.
--- NEW FILE: maxima-symbols.el ---
(setq maxima-symbols '(
("%edispflag")
("%rnum_list")
("%th")
("?round")
("?truncate")
("absboxchar")
("acos")
("acosh")
("acot")
("acoth")
("acsc")
("acsch")
("activate")
("activecontexts")
("addcol")
("additive")
("addrow")
("adjoint")
("airy")
("alarmclock")
("algebraic")
("algepsilon")
("algexact")
("algsys")
("alias")
("aliases")
("all_dotsimp_denoms")
("allbut")
("alloc")
("allroots")
("allsym")
("alphabetic")
("antid")
("antidiff")
("antisymmetric")
("append")
("appendfile")
("apply")
("apply1")
("apply2")
("apply_nouns")
("applyb1")
("apropos")
("args")
("array")
("arrayapply")
("arrayinfo")
("arraymake")
("arrays")
("asec")
("asech")
("asin")
("asinh")
("askexp")
("askinteger")
("asksign")
("assoc_legendre_p")
("assoc_legendre_q")
("assume")
("assume_pos")
("assume_pos_pred")
("assumescalar")
("asymp")
("asympa")
("at")
("atan")
("atan2")
("atanh")
("atom")
("atomgrad")
("atrig1")
("atvalue")
("augcoefmatrix")
("backsubst")
("backtrace")
("backup")
("bashindices")
("batch")
("batchkill")
("batchload")
("batcon")
("batcount")
("berlefact")
("bern")
("bernpoly")
("bessel")
("beta")
("bezout")
("bffac")
("bfloat")
("bfloatp")
("bfpsi")
("bftorat")
("bftrunc")
("bfzeta")
("bgzeta")
("bhzeta")
("bindtest")
("binomial")
("block")
("bothcases")
("bothcoef")
("box")
("boxchar")
("break")
("breakup")
("bug")
("buildq")
("buildq([varlist],expression);")
("burn")
("bzeta")
("cabs")
("canform")
("canten")
("carg")
("cartan")
("catch")
("cauchysum")
("cbfac")
("cf")
("cfdisrep")
("cfexpand")
("cflength")
("cgamma")
("cgamma2")
("change_filedefaults")
("changevar")
("charpoly")
("chebyshev_t")
("chebyshev_u")
("check_overlaps")
("chr1")
("chr2")
("christof")
("clearscreen")
("closefile")
("closeps")
("coeff")
("coefmatrix")
("col")
("collapse")
("columnvector")
("combine")
("commutative")
("comp2pui")
("compfile")
("compgrind")
("compile")
("compile_file")
("compile_lisp_file")
("concat")
("conjugate")
("cons")
("constant")
("constantp")
("cont2part")
("content")
("context")
("contexts")
("continue")
("contract")
("copylist")
("copymatrix")
("cos")
("cosh")
("cot")
("coth")
("counter")
("covdiff")
("create_list")
("csc")
("csch")
("current_let_rule_package")
("cursordisp")
("curvature")
("dblint")
("ddt")
("deactivate")
("debug")
("debugmode")
("debugprintmode")
("declare")
("declare_translated")
("declare_weight")
("default_let_rule_package")
("defcon")
("define")
("define_variable")
("defint")
("defmatch")
("defrule")
("deftaylor")
("delete")
("delfile")
("delta")
("demo")
("demoivre")
("denom")
("dependencies")
("depends")
("derivabbrev")
("derivdegree")
("derivlist")
("derivsubst")
("describe")
("desolve")
("determinant")
("detout")
("diagmatrix")
("diagmetric")
("diff")
("dim")
("dimension")
("direc")
("direct")
("diskfree")
("disolate")
("disp")
("dispcon")
("dispflag")
("dispform")
("dispfun")
("display")
("display2d")
("display_format_internal")
("disprule")
("dispterms")
("distrib")
("divide")
("divsum")
("do")
("doallmxops")
("domain")
("domxexpt")
("domxmxops")
("domxnctimes")
("dontfactor")
("doscmxops")
("doscmxplus")
("dot0nscsimp")
("dot0simp")
("dot1simp")
("dotassoc")
("dotconstrules")
("dotdistrib")
("dotexptsimp")
("dotident")
("dotscrules")
("dotsimp")
("dpart")
("dscalar")
("dskall")
("dummy")
("e")
("echelon")
("eigenvalues")
("eigenvectors")
("einstein")
("ele2comp")
("ele2polynome")
("ele2pui")
("elem")
("eliminate")
("ematrix")
("endcons")
("entermatrix")
("entier")
("equal")
("erf")
("erfflag")
("errcatch")
("errexp")
("errintsce")
("error")
("error_size")
("error_syms")
("errorfun")
("errormsg")
("euler")
("ev")
("eval")
("evenp")
("evflag")
("evfun")
("example")
("exp")
("expand")
("expandwrt")
("expandwrt_denom")
("expandwrt_factored")
("explose")
("expon")
("exponentialize")
("expop")
("express")
("expt")
("exptdispflag")
("exptisolate")
("exptsubst")
("extract_linear_equations")
("ezgcd")
("facexpand")
("factcomb")
("factlim")
("factor")
("factorflag")
("factorial")
("factorout")
("factorsum")
("facts")
("false")
("fassave")
("fast_central_elements")
("fast_linsolve")
("fasttimes")
("feature")
("featurep")
("features")
("fft")
("fib")
("fibtophi")
("file_search")
("file_string_print")
("file_type")
("filedefaults")
("filename")
("filename_merge")
("filenum")
("fillarray")
("first")
("fix")
("float")
("float2bf")
("floatdefunk")
("floatnump")
("flush")
("flushd")
("flushnd")
("for")
("forget")
("fortindent")
("fortmx")
("fortran")
("fortspaces")
("fpprec")
("fpprintprec")
("freeof")
("fullmap")
("fullmapl")
("fullratsimp")
("fullratsubst")
("funcsolve")
("functions")
("fundef")
("funmake")
("gamma")
("gammalim")
("gauss")
("gcd")
("gcfactor")
("gen_laguerre")
("gendiff")
("genfact")
("genindex")
("genmatrix")
("gensumnum")
("get")
("getchar")
("gfactor")
("gfactorsum")
("globalsolve")
("go")
("gradef")
("gradefs")
("gramschmidt")
("grind")
("grobner_basis")
("hach")
("halfangles")
("hermite")
("hipow")
("horner")
("ibase")
("ic1")
("ident")
("ieqn")
("ieqnprint")
("if")
("ift")
("ilt")
("imagpart")
("in_netmath")
("inchar")
("indices")
("inf")
("infeval")
("infinity")
("infix")
("inflag")
("infolists")
("innerproduct")
("inpart")
("inrt")
("integerp")
("integrate")
("integrate_use_rootsof")
("integration_constant_counter")
("interpolate")
("intfaclim")
("intopois")
("intosum")
("intpolabs")
("intpolerror")
("intpolrel")
("intsce")
("invert")
("is")
("isolate")
("isolate_wrt_times")
("isqrt")
("jacobi")
("jacobi_p")
("kdelta")
("keepfloat")
("kill")
("killcontext")
("kostka")
("labels")
("laguerre")
("laplace")
("lassociative")
("last")
("lasttime")
("lc")
("lcm")
("ldefint")
("ldisp")
("ldisplay")
("legendre_p")
("legendre_q")
("length")
("let")
("let_rule_packages")
("letrat")
("letrules")
("letsimp")
("lgtreillis")
("lhospitallim")
("lhs")
("limit")
("linear")
("linechar")
("linedisp")
("linel")
("linenum")
("linsolve")
("linsolve_params")
("linsolvewarn")
("lispdebugmode")
("list_nc_monomials")
("listarith")
("listarray")
("listconstvars")
("listdummyvars")
("listofvars")
("listp")
("lmxchar")
("load")
("loadfile")
("loadprint")
("local")
("log")
("logabs")
("logarc")
("logconcoeffp")
("logcontract")
("logexpand")
("lognegint")
("lognumer")
("logsimp")
("lopow")
("lorentz")
("lpart")
("lratsubst")
("lriccicom")
("lsum")
("ltreillis")
("m1pbranch")
("macroexpansion")
("mainvar")
("make_array")
("makebox")
("makefact")
("makegamma")
("makelist")
("map")
("mapatom")
("maperror")
("maplist")
("matchdeclare")
("matchfix")
("matrix")
("matrix_element_add")
("matrix_element_mult")
("matrix_element_transpose")
("matrixmap")
("matrixp")
("mattrace")
("max")
("maxapplydepth")
("maxapplyheight")
("maxnegex")
("maxposex")
("maxprime")
("maxtayorder")
("member")
("metric")
("min")
("minf")
("minfactorial")
("minor")
("mod")
("mode_check_errorp")
("mode_check_warnp")
("mode_checkp")
("mode_declare")
("mode_identity")
("modulus")
("mon2schur")
("mono")
("monomial_dimensions")
("motion")
("multi_elem")
("multi_orbit")
("multi_pui")
("multinomial")
("multiplicative")
("multiplicities")
("multsym")
("multthru")
("myoptions")
("nc_degree")
("ncexpt")
("ncharpoly")
("negdistrib")
("negsumdispflag")
("new-disrep")
("newcontext")
("newdet")
("newfac")
("newton")
("niceindices")
("niceindicespref")
("noeval")
("nolabels")
("nonscalar")
("nonscalarp")
("nostring")
("noun")
("noundisp")
("nounify")
("nouns")
("nroots")
("nterms")
("ntermsg")
("ntermsrci")
("nthroot")
("num")
("numberp")
("numer")
("numerval")
("numfactor")
("nusum")
("nzeta")
("obase")
("oddp")
("ode")
("ode2")
("omega")
("openplot_curves")
("opproperties")
("opsubst")
("optimize")
("optimprefix")
("optionset")
("orbit")
("ordergreat")
("ordergreatp")
("orderless")
("orderlessp")
("outative")
("outchar")
("outofpois")
("packagefile")
("pade")
("parsewindow")
("part")
("part2cont")
("partfrac")
("partition")
("partpol")
("partswitch")
("pcoeff")
("permanent")
("permut")
("pfeformat")
("pi")
("pickapart")
("piece")
("playback")
("plog")
("plot2d")
("plot2d_ps")
("plot3d")
("plot_options")
("poisdiff")
("poisexpt")
("poisint")
("poislim")
("poismap")
("poisplus")
("poissimp")
("poisson")
("poissubst")
("poistimes")
("poistrim")
("polarform")
("polartorect")
("polynome2ele")
("posfun")
("potential")
("powerdisp")
("powers")
("powerseries")
("pred")
("prederror")
("prime")
("primep")
("print")
("printpois")
("printprops")
("prodhack")
("prodrac")
("product")
("programmode")
("prompt")
("properties")
("props")
("propvars")
("pscom")
("psdraw_curve")
("psexpand")
("psi")
("pui")
("pui2comp")
("pui2ele")
("pui2polynome")
("pui_direct")
("puireduc")
("put")
("qput")
("qq")
("quanc8")
("quit")
("qunit")
("quotient")
("radcan")
("radexpand")
("radprodexpand")
("radsubstflag")
("raiseriemann")
("random")
("rank")
("rassociative")
("rat")
("ratalgdenom")
("ratcoef")
("ratdenom")
("ratdenomdivide")
("ratdiff")
("ratdisrep")
("rateinstein")
("ratepsilon")
("ratexpand")
("ratfac")
("ratmx")
("ratnumer")
("ratnump")
("ratp")
("ratprint")
("ratrieman")
("ratriemann")
("ratsimp")
("ratsimpexpons")
("ratsubst")
("ratvars")
("ratweight")
("ratweights")
("ratweyl")
("ratwtlvl")
("read")
("readonly")
("realonly")
("realpart")
("realroots")
("rearray")
("rectform")
("recttopolar")
("refcheck")
("rem")
("remainder")
("remarray")
("rembox")
("remcon")
("remfunction")
("remlet")
("remove")
("remrule")
("remtrace")
("remvalue")
("rename")
("reset")
("residue")
("resolvante")
("resolvante_alternee1")
("resolvante_bipartite")
("resolvante_diedrale")
("resolvante_klein")
("resolvante_klein3")
("resolvante_produit_sym")
("resolvante_unitaire")
("resolvante_vierer")
("rest")
("restore")
("resultant")
("return")
("reveal")
("reverse")
("revert")
("rhs")
("riccicom")
("riemann")
("rinvariant")
("risch")
("rmxchar")
("rncombine")
("romberg")
("rombergabs")
("rombergit")
("rombergmin")
("rombergtol")
("room")
("rootsconmode")
("rootscontract")
("rootsepsilon")
("row")
("save")
("savedef")
("savefactors")
("scalarmatrixp")
("scalarp")
("scalefactors")
("scanmap")
("schur2comp")
("sconcat")
("scsimp")
("scurvature")
("sec")
("sech")
("set_plot_option")
("set_up_dot_simplifications")
("setcheck")
("setcheckbreak")
("setelmx")
("setup")
("setup_autoload")
("setval")
("show")
("showratvars")
("showtime")
("sign")
("signum")
("similaritytransform")
("simp")
("simpsum")
("sin")
("sinh")
("solve")
("solve_inconsistent_error")
("solvedecomposes")
("solveexplicit")
("solvefactors")
("solvenullwarn")
("solveradcan")
("solvetrigwarn")
("somrac")
("sort")
("sparse")
("spherical_bessel_j")
("spherical_bessel_y")
("spherical_hankel1")
("spherical_hankel2")
("spherical_harmonic")
("splice")
("sprint")
("sqfr")
("sqrt")
("sqrtdispflag")
("srrat")
("sstatus")
("stardisp")
("status")
("string")
("stringout")
("sublis")
("sublis_apply_lambda")
("sublist")
("submatrix")
("subst")
("substinpart")
("substpart")
("subvarp")
("sum")
("sumcontract")
("sumexpand")
("sumhack")
("sumsplitfact")
("supcontext")
("symbolp")
("symmetric")
("system(command)")
("tan")
("tanh")
("taylor")
("taylor_logexpand")
("taylor_order_coefficients")
("taylor_simplifier")
("taylor_truncate_polynomials")
("taylordepth")
("taylorinfo")
("taylorp")
("taytorat")
("tcl_output")
("tcontract")
("tellrat")
("tellsimp")
("tellsimpafter")
("tex")
("tex(expr,filename)")
("tex(label,filename)")
("throw")
("time")
("timer")
("timer_devalue")
("timer_info")
("tldefint")
("tlimit")
("tlimswitch")
("to_lisp")
("tobreak")
("todd_coxeter")
("toplevel")
("totaldisrep")
("totient")
("tpartpol")
("tr_array_as_ref")
("tr_bound_function_applyp")
("tr_file_tty_messagesp")
("tr_float_can_branch_complex")
("tr_function_call_default")
("tr_gen_tags")
("tr_numer")
("tr_optimize_max_loop")
("tr_output_file_default")
("tr_predicate_brain_damage")
("tr_semicompile")
("tr_state_vars")
("tr_true_name_of_file_being_translated")
("tr_version")
("tr_warn_bad_function_calls")
("tr_warn_fexpr")
("tr_warn_meval")
("tr_warn_mode")
("tr_warn_undeclared")
("tr_warn_undefined_variable")
("tr_warnings_get")
("tr_windy")
("trace")
("trace_options")
("transbind")
("transcompile")
("transform")
("translate")
("translate_file")
("transpose")
("transrun")
("treillis")
("treinat")
("triangularize")
("trigexpand")
("trigexpandplus")
("trigexpandtimes")
("triginverses")
("trigrat")
("trigreduce")
("trigsign")
("trigsimp")
("true")
("trunc")
("tsetup")
("ttransform")
("ttyintfun")
("ttyintnum")
("ttyoff")
("ultraspherical")
("undeclaredwarn")
("undiff")
("uniteigenvectors")
("unitvector")
("unknown")
("unorder")
("unsum")
("untellrat")
("untrace")
("use_fast_arrays")
("values")
("vect_cross")
("vectorpotential")
("vectorsimp")
("verb")
("verbify")
("verbose")
("weyl")
("with_stdout")
("writefile")
("xthru")
("zerobern")
("zeroequiv")
("zeromatrix")
("zeta")
("zeta%pi")
("zrpoly")
("zsolve")
("zunderflow")))
(provide 'maxima-symbols)
|
|
From: Jay B. <bel...@us...> - 2001-11-08 22:23:39
|
Update of /cvsroot/maxima/maxima-pre59/emacs
In directory usw-pr-cvs1:/tmp/cvs-serv11073
Added Files:
maxima-font-lock.el
Log Message:
Initial commit of font-lock support for Emacs.
--- NEW FILE: maxima-font-lock.el ---
;;; maxima-font-lock-maker.el --- create maxima-font-lock.el for maxima.el
;; Copyright: (C) 2001 Jay Belanger
;; Author: Jay Belanger <bel...@tr...>
;; $Name: $
;; $Revision: 1.1 $
;; $Date: 2001/11/08 22:23:36 $
;; Keywords: maxima, font-lock
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2, or (at
;; your option) any later version.
;;
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
[...1173 lines suppressed...]
) 'words)
. font-lock-warning-face)
;; Also, ? followed by non-white space
(
"\\<\\?\\sw+\\>\\)"
. font-lock-warning-face)
;;;;; PREAMBLE
;;; (This is not a good way of doing it.)
(
"\\(GCL (GNU Common Lisp) Version.*\\)\\|\\(Licensed under GNU Library General Public License\\)\\|\\(Contains Enhancements by W. Schelter\\)\\|\\(Maxima .*(with enhancements by W. Schelter).\\)\\|\\(Licensed under the GNU Public License (see file COPYING)\\)"
. font-lock-string-face))
"Keywords for font-locking in Maxima mode.")
(defvar inferior-maxima-font-lock-keywords
(cons '("^[a-zA-Z].*$" . font-lock-warning-face)
maxima-font-lock-keywords))
;;; maxima-font-lock-maker.el ends here
|