version 1.18, 1996/01/25 16:45:51
|
version 1.24, 1997/10/04 17:33:52
|
Line 36
|
Line 36
|
|
|
|
|
(defvar forth-positives |
(defvar forth-positives |
" : :noname code ;code does> begin do ?do +do -do u+do u-do while if ?dup-if ?dup-0=-if else case struct [if] [else] " |
" : :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.") |
|
|
(defvar forth-negatives |
(defvar forth-negatives |
" ; end-code ;code does> until repeat while +loop loop -loop s+loop else then endif again endcase end-struct [then] [else] [endif] " |
" ; end-code ;code does> until repeat while +loop loop -loop s+loop else then endif again endcase endof end-struct [then] [else] [endif] endwith class; how: " |
"Contains all words which will cause the indent-level to be decremented |
"Contains all words which will cause the indent-level to be decremented |
on the current line. |
on the current line. |
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 " |
" : :noname code interpretation: public: private: how: 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) |
|
|
|
(defvar forth-zup |
|
" how: " |
|
"Contains all words which causes zero indent level to change") |
|
|
|
(defvar forth-zdown |
|
" class; how: class public: private: " |
|
"Contains all words which causes zero indent level to change") |
|
|
(defvar forth-prefixes |
(defvar forth-prefixes |
" postpone [compile] ['] [char] " |
" postpone [compile] ['] [char] " |
"words that prefix and escape other words") |
"words that prefix and escape other words") |
Line 66 OBS! All words in forth-negatives must b
|
Line 76 OBS! All words in forth-negatives must b
|
(if (not forth-mode-map) |
(if (not forth-mode-map) |
(setq forth-mode-map (make-sparse-keymap))) |
(setq forth-mode-map (make-sparse-keymap))) |
|
|
(global-set-key "\e\C-m" 'forth-send-paragraph) |
|
(global-set-key "\C-x\C-m" 'forth-split) |
|
(global-set-key "\e " 'forth-reload) |
|
|
|
;(define-key forth-mode-map "\M-\C-x" 'compile) |
;(define-key forth-mode-map "\M-\C-x" 'compile) |
(define-key forth-mode-map "\C-x\\" 'comment-region) |
(define-key forth-mode-map "\C-x\\" 'comment-region) |
(define-key forth-mode-map "\C-x~" 'forth-remove-tracers) |
(define-key forth-mode-map "\C-x~" 'forth-remove-tracers) |
Line 82 OBS! All words in forth-negatives must b
|
Line 88 OBS! All words in forth-negatives must b
|
(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: ")) |
Line 150 OBS! All words in forth-negatives must b
|
Line 156 OBS! All words in forth-negatives must b
|
" |
" |
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 |
Line 318 programmers who tend to fill code won't
|
Line 324 programmers who tend to fill code won't
|
(regexp-quote (concat " " w1 " ")) |
(regexp-quote (concat " " w1 " ")) |
forth-negatives) |
forth-negatives) |
forth-indent-level 0))) |
forth-indent-level 0))) |
|
(if (string-match (regexp-quote (concat " " w1 " ")) forth-zdown) |
|
(setq forth-zero 0)) |
(if (string-match (regexp-quote (concat " " w1 " ")) forth-zeroes) |
(if (string-match (regexp-quote (concat " " w1 " ")) forth-zeroes) |
(setq indent 0)) |
(setq indent forth-zero)) |
|
(if (string-match (regexp-quote (concat " " w1 " ")) forth-zup) |
|
(setq forth-zero 4)) |
indent)) |
indent)) |
|
|
(defun forth-sum-line-indentation () |
(defun forth-sum-line-indentation () |