CSLMode.el revision 0f541fef46255a09d1143a9cbf3e2dbafb610923
185500d23409c9c62a499b32f43b8898119540b4Christian Maeder;; Creating a new menu pane in the menu bar to the right of "Tools" menu
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens Elkner;; A keymap is suitable for menu use if it has an overall prompt string, which describes the purpose of the menu.
e6d40133bc9f858308654afb1262b8b483ec5922Till Mossakowski;; 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
185500d23409c9c62a499b32f43b8898119540b4Christian Maeder (cons "ENCL" (make-sparse-keymap "encl menu"))
185500d23409c9c62a499b32f43b8898119540b4Christian Maeder;; extract all spec definitions
185500d23409c9c62a499b32f43b8898119540b4Christian Maeder (push (buffer-substring-no-properties p1 (point)) specs)
2c6fe006c1088b8a25836fd4b7fa1f687213dba2Christian Maeder;; extract all imports
185500d23409c9c62a499b32f43b8898119540b4Christian Maeder (push (buffer-substring-no-properties p1 (point)) specs)
185500d23409c9c62a499b32f43b8898119540b4Christian Maeder ;; comma separated lisp
185500d23409c9c62a499b32f43b8898119540b4Christian Maeder (while (string= (buffer-substring-no-properties (point) (+ 1 (point))) ",")
e5bf1cecd6f65e5c36b033d9d3f93938846a9ec9cmaeder (push (buffer-substring-no-properties p1 (point)) specs)
(defun refresh-specmenu2 ()
(define-key-after global-map [menu-bar enclmenu match] (cons "Match" (make-sparse-keymap)) 'kill-buffer)
(define-key global-map (vector 'menu-bar 'enclmenu 'match currentsym) (cons item (make-sparse-keymap)))
(define-key global-map (vector 'menu-bar 'enclmenu 'match currentsym currentsym2) (cons item2 (make-sparse-keymap)))
(define-key global-map (vector 'menu-bar 'enclmenu 'match currentsym (gensym)) (cons "Select design spec" nil))
(define-key global-map (vector 'menu-bar 'enclmenu 'match (gensym)) (cons "Select pattern spec" nil))
(defun refresh-evalmenu ()
(define-key-after global-map [menu-bar enclmenu eval] (cons "Evaluate" '(lambda () (interactive) (run-eval "FlangeComplete"))))
(defun refresh-matchmenu ()
(define-key-after global-map [menu-bar enclmenu match] (cons "Match" (make-sparse-keymap)) 'kill-buffer)
(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 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))
buff)
;; matchcad /tmp/flange.het -sMatch -pFlangePattern -dComponent
;; matchcad /tmp/flange.het -sMatch -pFlangePattern -dComponent
(defun load-spec ()