CSLMode.el revision 7af4df794a0e0f0cb927bd9371556ad098308983
;; Creating a new menu pane in the menu bar to the right of "Tools" menu
;; A keymap is suitable for menu use if it has an overall prompt string, which describes the purpose of the menu.
;; essentially: define-key map fake-key '(item command), where fake-key is of the form [menu-bar mymenu nl] and defines key nl in mymenu which must exist
'tools)
;; extract all spec definitions
(defun extractspecs ()
(let
(skip-chars-forward " ")
)
)
)
)
;; extract all imports
(defun extractgets ()
(let
(p1
)
(skip-chars-forward " ")
;; comma separated lisp
(skip-chars-forward " ")
(skip-chars-forward " ")
(skip-chars-forward " ")
(skip-chars-forward " ")
)
)
)
)
)
(defun refresh-evalmenu ()
(let
(runlist '("Symbolic" "Approximately"))
)
;; delete the match menu
;; generate match menu
; (refresh-specmenu entries menusym runfun runlist)
(define-key global-map (vector 'menu-bar 'enclmenu menusym currentsym) (cons item (make-sparse-keymap)))
)
)
; (define-key global-map (vector 'menu-bar 'enclmenu menusym currentsym (gensym)) (cons "--" nil))
; (define-key global-map (vector 'menu-bar 'enclmenu menusym currentsym (gensym)) (cons "Select design spec" nil))
)
)
(defun refresh-matchmenu ()
(let
)
;; delete the match menu
;; generate match menu
(define-key-after global-map [menu-bar enclmenu match] (cons "Match" (make-sparse-keymap)) 'kill-buffer)
)
)
;; (interactive)
;; generate subentries
(define-key global-map (vector 'menu-bar 'enclmenu menusym currentsym) (cons item (make-sparse-keymap)))
;; submenus
(define-key global-map (vector 'menu-bar 'enclmenu menusym currentsym currentsym2) (cons item2 (make-sparse-keymap)))
)
)
(define-key global-map (vector 'menu-bar 'enclmenu menusym currentsym (gensym)) (cons "Select design spec" nil))
)
(define-key global-map (vector 'menu-bar 'enclmenu menusym (gensym)) (cons "Select pattern spec" nil))
)
(defun prepare-buffer (name)
buff)
)
(message "Matching selected pattern with the design spec")
;; example command
;; matchcad /tmp/flange.het -sMatch -pFlangePattern -dComponent
; (message (concatenate 'string "asd" (buffer-file-name (current-buffer))))
"-sMatch"
"-p" spec1
"-d" spec2
)
nil
)
;; (message "selected %s and %s and %s" spec1 spec2 trans)
;; example command
;; matchcad /tmp/flange.het -sMatch -pFlangePattern -dComponent
; (message (concatenate 'string "asd" (buffer-file-name (current-buffer))))
; (message "Evaluating EnCL spec")
(insert "Starting evaluation of EnCL specification.\n")
; (call-process "evalspec" nil buff t "-s" spec1 "-t10" "-v2" (if (string= symbolic "Symbolic") "-S" "") fp)
(start-process "evaluation of EnCL specification" buff "evalspec" "-C" encl-cas "-s" spec1 "-t25" "-v" encl-verb (if (string= symbolic "Symbolic") "-S" "") fp)
;; (insert "\n\nEvaluation of EnCL specification finished.\n")
;; (start-process-shell-command "evalproc" buff (concatenate 'string "evalspec -s " spec1 " " fp))
nil)
)
(interactive "FOpen proof script: ")
(defun load-spec ()
))
)
(defun setverb0 ()
)
(defun setverb1 ()
)
(defun setverb2 ()
)
(defun setverb3 ()
)
(defun setmaple ()
)
(defun setmathematica ()
)
'((refresh-evalmenu "Refreshes the EnCL evaluation menu based on the specification in the current buffer.")
(refresh-matchmenu "Refreshes the EnCL matching menu based on the specification in the current buffer.")
(setmaple "Selects the computer algebra system Maple for the evaluation.")
(setmathematica "Selects the computer algebra system Mathematica for the evaluation.")
(setverbX "Sets verbosity to X in [0-3].")
(help-encl "Shows this help.")
)
)
(defun show-command-entry (x)
)
(defun help-encl ()
(dolist (x encl-commands)
(insert "\n")
)
)
)