--- gforth/gforth.el 2010/09/08 21:48:29 1.82 +++ gforth/gforth.el 2012/12/31 15:25:18 1.88 @@ -1,6 +1,6 @@ ;;; gforth.el --- major mode for editing (G)Forth sources -;; Copyright (C) 1995,1996,1997,1998,2000,2001,2003,2004,2007,2008 Free Software Foundation, Inc. +;; Copyright (C) 1995,1996,1997,1998,2000,2001,2003,2004,2007,2008,2010,2011,2012 Free Software Foundation, Inc. ;; This file is part of Gforth. @@ -237,6 +237,8 @@ PARSED-TYPE specifies what kind of text (("]" "]l") definition-starter (font-lock-keyword-face . 1)) ((":") definition-starter (font-lock-keyword-face . 1) "[ \t\n]" t name (font-lock-function-name-face . 3)) + (("event:") definition-starter (font-lock-keyword-face . 1) + "[ \t\n]" t name (font-lock-function-name-face . 3)) (("immediate" "compile-only" "restrict") immediate (font-lock-keyword-face . 1)) (("does>") compile-only (font-lock-keyword-face . 1)) @@ -257,9 +259,9 @@ PARSED-TYPE specifies what kind of text (("char") non-immediate (font-lock-keyword-face . 1) "[ \t\n]" t string (font-lock-string-face . 1)) ("'.'?" non-immediate (font-lock-string-face . 1)) - (("s\"" "c\"") immediate (font-lock-string-face . 1) + (("s\"" "c\"" "s\\\"") immediate (font-lock-string-face . 1) "[\"\n]" nil string (font-lock-string-face . 1)) - ((".\"") compile-only (font-lock-string-face . 1) + ((".\"" ".\\\"") compile-only (font-lock-string-face . 1) "[\"\n]" nil string (font-lock-string-face . 1)) (("abort\"") compile-only (font-lock-keyword-face . 1) "[\"\n]" nil string (font-lock-string-face . 1)) @@ -307,7 +309,7 @@ PARSED-TYPE specifies what kind of text (("create" "variable" "constant" "2variable" "2constant" "fvariable" "fconstant" "value" "field" "user" "vocabulary" - "create-interpret/compile") + "create-interpret/compile" "interpret/compile:") non-immediate (font-lock-type-face . 2) "[ \t\n]" t name (font-lock-variable-name-face . 3)) ("\\S-+%" non-immediate (font-lock-type-face . 2)) @@ -761,7 +763,7 @@ End:\" construct).") (defvar forth-defining-words '("VARIABLE" "CONSTANT" "2VARIABLE" "2CONSTANT" "FVARIABLE" "FCONSTANT" "USER" "VALUE" "field" "end-struct" "VOCABULARY" "CREATE" ":" "CODE" - "DEFER" "ALIAS") + "DEFER" "ALIAS" "interpret/compile:") "List of words, that define the following word. Used for imenu index generation.") @@ -1388,7 +1390,7 @@ programmers who tend to fill code won't (defun forth-remove-tracers () "Remove tracers of the form `~~ '. Queries the user for each occurrence." (interactive) - (query-replace-regexp "\\(~~ \\| ~~$\\)" "" nil)) + (query-replace-regexp "\\(~~[ \t]\\|[ \t]~~$\\)" "" nil)) (define-key forth-mode-map "\C-x\C-e" 'compile) (define-key forth-mode-map "\C-x\C-n" 'next-error)