| |
|
| |
|
| (defvar forth-positives |
(defvar forth-positives |
| " : :noname code interpretation: ;code does> begin do ?do +do -do u+do u-do while if ?dup-if ?dup-0=-if else case of struct [if] [else] with public: private: class " |
" : :noname code interpretation: ;code does> begin do ?do +do -do u+do u-do while if ?dup-if ?dup-0=-if else case of struct [if] [ifdef] [ifundef] [else] with public: private: class " |
| "Contains all words which will cause the indent-level to be incremented |
"Contains all words which will cause the indent-level to be incremented |
| on the next line. |
on the next line. |
| OBS! All words in forth-positives must be surrounded by spaces.") |
OBS! All words in forth-positives must be surrounded by spaces.") |
| OBS! All words in forth-negatives must be surrounded by spaces.") |
OBS! All words in forth-negatives must be surrounded by spaces.") |
| |
|
| (defvar forth-zeroes |
(defvar forth-zeroes |
| " : :noname code interpretation: public: private: how: class class; " |
" : :noname code interpretation: public: private: how: implements class class; " |
| "Contains all words which causes the indent to go to zero") |
"Contains all words which causes the indent to go to zero") |
| |
|
| (setq forth-zero 0) |
(setq forth-zero 0) |
| |
|
| (defvar forth-zup |
(defvar forth-zup |
| " how: " |
" how: implements " |
| "Contains all words which causes zero indent level to change") |
"Contains all words which causes zero indent level to change") |
| |
|
| (defvar forth-zdown |
(defvar forth-zdown |
| (define-key forth-mode-map "\M-q" 'forth-fill-paragraph) |
(define-key forth-mode-map "\M-q" 'forth-fill-paragraph) |
| (define-key forth-mode-map "\e." 'forth-find-tag) |
(define-key forth-mode-map "\e." 'forth-find-tag) |
| |
|
| (load "etags.el") |
(load "etags") |
| |
|
| (defun forth-find-tag (tagname &optional next-p regexp-p) |
(defun forth-find-tag (tagname &optional next-p regexp-p) |
| (interactive (find-tag-interactive "Find tag: ")) |
(interactive (find-tag-interactive "Find tag: ")) |
| " |
" |
| Major mode for editing Forth code. Tab indents for Forth code. Comments |
Major mode for editing Forth code. Tab indents for Forth code. Comments |
| are delimited with \\ and newline. Paragraphs are separated by blank lines |
are delimited with \\ and newline. Paragraphs are separated by blank lines |
| only. Delete converts tabs to spaces as it moves back. |
only. |
| \\{forth-mode-map} |
\\{forth-mode-map} |
| Forth-split |
Forth-split |
| Positions the current buffer on top and a forth-interaction window |
Positions the current buffer on top and a forth-interaction window |
| |
|
| (require 'outline) |
(require 'outline) |
| |
|
| ;;(define-key outline-minor-mode-map 'f9 'show-entry) |
(defun f-outline-level () |
| ;;(define-key outline-minor-mode-map 'f10 'hide-entry) |
(cond ((looking-at "\\`\\\\") |
| |
0) |
| |
((looking-at "\\\\ SEC") |
| |
0) |
| |
((looking-at "\\\\ \\\\ .*") |
| |
0) |
| |
((looking-at "\\\\ DEFS") |
| |
1) |
| |
((looking-at "\\/\\* ") |
| |
1) |
| |
((looking-at ":") |
| |
1) |
| |
((looking-at "\\\\G") |
| |
2) |
| |
((looking-at "[ \t]+\\\\") |
| |
3)) |
| |
) |
| |
|
| (defun fold-f () |
(defun fold-f () |
| (interactive) |
(interactive) |
| (add-hook 'outline-minor-mode-hook 'hide-body) |
(add-hook 'outline-minor-mode-hook 'hide-body) |
| |
|
| ; outline mode header start, i.e. find word definitions |
; outline mode header start, i.e. find word definitions |
| (setq outline-regexp "^\\(:\\)[ \t]+\\([^ \t]*\\)") |
;;; (setq outline-regexp "^\\(:\\)[ \t]+\\([^ \t]*\\)") |
| |
(setq outline-regexp "\\`\\\\\\|:\\|\\\\ SEC\\|\\\\G\\|[ \t]+\\\\\\|\\\\ DEFS\\|\\/\\*\\|\\\\ \\\\ .*") |
| |
(setq outline-level 'f-outline-level) |
| |
|
| (outline-minor-mode) |
(outline-minor-mode) |
| |
(define-key outline-minor-mode-map '(shift up) 'hide-sublevels) |
| |
(define-key outline-minor-mode-map '(shift right) 'show-children) |
| |
(define-key outline-minor-mode-map '(shift left) 'hide-subtree) |
| |
(define-key outline-minor-mode-map '(shift down) 'show-subtree) |
| |
|
| ) |
) |
| |
|
| |
(define-key global-map '(shift up) 'fold-f) |
| |
|
| ;;; end file folding |
;;; end file folding |
| |
|
| ;;; func-menu is a package that scans your source file for function definitions |
;;; func-menu is a package that scans your source file for function definitions |
| (define-key global-map "\C-cg" 'fume-prompt-function-goto) |
(define-key global-map "\C-cg" 'fume-prompt-function-goto) |
| (define-key global-map '(shift button3) 'mouse-function-menu) |
(define-key global-map '(shift button3) 'mouse-function-menu) |
| )) |
)) |
| |
|
| |
;; end |
| |
|