version 1.8, 1994/08/25 15:25:26
|
version 1.11, 1995/01/30 18:47:48
|
Line 43 on the next line.
|
Line 43 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 |
" ; until repeat while +loop loop s+loop else then endif again endcase does> end-struct [then] [else] " |
" ; until repeat while +loop loop s+loop else then endif again endcase does> end-struct [then] [else] [endif]" |
"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.") |
Line 71 OBS! All words in forth-negatives must b
|
Line 71 OBS! All words in forth-negatives must b
|
(global-set-key "\C-x\C-m" 'forth-split) |
(global-set-key "\C-x\C-m" 'forth-split) |
(global-set-key "\e " 'forth-reload) |
(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|" 'uncomment-region) |
|
(define-key forth-mode-map "\C-x~" 'forth-remove-tracers) |
(define-key forth-mode-map "\C-x~" 'forth-remove-tracers) |
(define-key forth-mode-map "\e\C-m" 'forth-send-paragraph) |
(define-key forth-mode-map "\e\C-m" 'forth-send-paragraph) |
(define-key forth-mode-map "\eo" 'forth-send-buffer) |
(define-key forth-mode-map "\eo" 'forth-send-buffer) |
Line 143 OBS! All words in forth-negatives must b
|
Line 142 OBS! All words in forth-negatives must b
|
(defun forth-mode () |
(defun forth-mode () |
" |
" |
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 ( ). Paragraphs are separated by blank lines only. |
are delimited with \\ and newline. Paragraphs are separated by blank lines |
Delete converts tabs to spaces as it moves back. |
only. Delete converts tabs to spaces as it moves back. |
\\{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 216 Variables controling documentation searc
|
Line 215 Variables controling documentation searc
|
(run-hooks 'forth-mode-hook)) |
(run-hooks 'forth-mode-hook)) |
|
|
(setq forth-mode-hook |
(setq forth-mode-hook |
'(lambda () (setq compile-command "gforth "))) |
'(lambda () |
|
(make-local-variable 'compile-command) |
|
(setq compile-command "gforth "))) |
|
|
(defun forth-fill-paragraph () |
(defun forth-fill-paragraph () |
"Fill comments (starting with '\'; do not fill code (block style |
"Fill comments (starting with '\'; do not fill code (block style |
programmers who tend to fill code won't use emacs anyway:-)." |
programmers who tend to fill code won't use emacs anyway:-)." |
; currently only comments at the start of the line are |
; Currently only comments at the start of the line are filled. |
; filled. something like lisp-fill-paragraph may be better |
; Something like lisp-fill-paragraph may be better. We cannot use |
|
; fill-paragraph, because it removes the \ from the first comment |
|
; line. Therefore we have to look for the first line of the comment |
|
; and use fill-region. |
(interactive) |
(interactive) |
(save-excursion |
(save-excursion |
(beginning-of-line) |
(beginning-of-line) |
(if (looking-at "[ \t]*\\\\[ \t]+") |
(while (and |
(progn (goto-char (match-end 0)) |
(= (forward-line -1) 0) |
(set-fill-prefix) |
(looking-at "[ \t]*\\\\[ \t]+"))) |
(fill-paragraph nil))))) |
(if (not (looking-at "[ \t]*\\\\[ \t]+")) |
|
(forward-line 1)) |
|
(let ((from (point)) |
|
(to (save-excursion (forward-paragraph) (point)))) |
|
(if (looking-at "[ \t]*\\\\[ \t]+") |
|
(progn (goto-char (match-end 0)) |
|
(set-fill-prefix) |
|
(fill-region from to nil)))))) |
|
|
(defun forth-comment-indent () |
(defun forth-comment-indent () |
(save-excursion |
(save-excursion |
Line 431 When called, the current buffer will be
|
Line 442 When called, the current buffer will be
|
(defvar forth-signal-death-message nil |
(defvar forth-signal-death-message nil |
"If non-nil, causes a message to be generated when the Forth process dies.") |
"If non-nil, causes a message to be generated when the Forth process dies.") |
|
|
(defvar forth-percent-height 62 |
(defvar forth-percent-height 50 |
"Tells run-forth how high the upper window should be in percent.") |
"Tells run-forth how high the upper window should be in percent.") |
|
|
(defconst forth-runlight:input ?I |
(defconst forth-runlight:input ?I |
Line 840 The region is sent terminated by a newli
|
Line 851 The region is sent terminated by a newli
|
res)) |
res)) |
|
|
|
|
(define-key forth-mode-map "\C-x\C-e" 'forth-compile) |
(define-key forth-mode-map "\C-x\C-e" 'compile) |
(define-key forth-mode-map "\C-x\C-n" 'next-error) |
(define-key forth-mode-map "\C-x\C-n" 'next-error) |
(require 'compile "compile") |
(require 'compile "compile") |
|
|
(defvar forth-compile-command "gforth ") |
(defvar forth-compile-command "gforth ") |
(defvar forth-compilation-window-percent-height 30) |
;(defvar forth-compilation-window-percent-height 30) |
|
|
(defun forth-compile (command) |
(defun forth-compile (command) |
(interactive (list (setq forth-compile-command (read-string "Compile command: " forth-compile-command)))) |
(interactive (list (setq forth-compile-command (read-string "Compile command: " forth-compile-command)))) |