From 1a538fcf39e03bd3f3b9d203b616dc93f835b8c6 Mon Sep 17 00:00:00 2001 From: "Jose A. Ortega Ruiz" Date: Sat, 29 Nov 2008 21:30:43 +0100 Subject: [PATCH 1/2] Emacs factor mode: disable highlight of vocabs in USING:. --- misc/factor.el | 1 - 1 file changed, 1 deletion(-) diff --git a/misc/factor.el b/misc/factor.el index f81b1e8f88..5f070bdc2e 100644 --- a/misc/factor.el +++ b/misc/factor.el @@ -239,7 +239,6 @@ buffer." (,factor--regex-constructor . 'factor-font-lock-constructor) (,factor--regex-setter . 'factor-font-lock-setter-word) (,factor--regex-symbol-definition 2 'factor-font-lock-symbol-definition) - (,factor--regex-using-lines 1 'factor-font-lock-vocabulary-name) (,factor--regex-use-line 1 'factor-font-lock-vocabulary-name)) "Font lock keywords definition for Factor mode.") From 34c55672bd8d75820df232a4430227f4d821e1ac Mon Sep 17 00:00:00 2001 From: "Jose A. Ortega Ruiz" Date: Sun, 30 Nov 2008 13:53:15 +0100 Subject: [PATCH 2/2] Emacs factor mode: Small tweaks. --- misc/factor.el | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/misc/factor.el b/misc/factor.el index 5f070bdc2e..5f56072c1d 100644 --- a/misc/factor.el +++ b/misc/factor.el @@ -189,7 +189,7 @@ buffer." "OCT:" "POSTPONE:" "PREDICATE:" "PRIMITIVE:" "PRIVATE>" "PROVIDE:" "REQUIRE:" "REQUIRES:" "SINGLETON:" "SLOT:" "SYMBOL:" "SYMBOLS:" "TUPLE:" "T{" "t\\??" "TYPEDEF:" - "UNION:" "USE:" "USING:" "V{" "VAR:" "VARS:" "W{")) + "UNION:" "USE:" "USING:" "V{" "VARS:" "W{")) (defconst factor--regex-parsing-words-ext (regexp-opt '("B" "call-next-method" "delimiter" "f" "initial:" "read-only") @@ -204,11 +204,14 @@ buffer." (defsubst factor--regex-second-word (prefixes) (format "^%s +\\([^ \r\n]+\\)" (regexp-opt prefixes t))) +(defconst factor--regex-method-definition + "^M: +\\([^ ]+\\) +\\([^ ]+\\)") + (defconst factor--regex-word-definition - (factor--regex-second-word '(":" "::" "M:" "GENERIC:"))) + (factor--regex-second-word '(":" "::" "GENERIC:"))) (defconst factor--regex-type-definition - (factor--regex-second-word '("TUPLE:"))) + (factor--regex-second-word '("TUPLE:" "SINGLETON:"))) (defconst factor--regex-parent-type "^TUPLE: +[^ ]+ +< +\\([^ ]+\\)") @@ -217,7 +220,7 @@ buffer." (defconst factor--regex-setter "\\W>>[^ ]+\\b") (defconst factor--regex-symbol-definition - (factor--regex-second-word '("SYMBOL:"))) + (factor--regex-second-word '("SYMBOL:" "VAR:"))) (defconst factor--regex-stack-effect " ( .* )") @@ -235,6 +238,8 @@ buffer." (,factor--regex-declaration-words 1 'factor-font-lock-declaration) (,factor--regex-word-definition 2 'factor-font-lock-word-definition) (,factor--regex-type-definition 2 'factor-font-lock-type-definition) + (,factor--regex-method-definition (1 'factor-font-lock-type-definition) + (2 'factor-font-lock-word-definition)) (,factor--regex-parent-type 1 'factor-font-lock-type-definition) (,factor--regex-constructor . 'factor-font-lock-constructor) (,factor--regex-setter . 'factor-font-lock-setter-word) @@ -246,7 +251,7 @@ buffer." ;;; Factor mode syntax: (defconst factor--regex-definition-starters - (regexp-opt '("TUPLE" "MACRO" "MACRO:" "M" ":" ""))) + (regexp-opt '("VARS" "TUPLE" "MACRO" "MACRO:" "M" ":" ""))) (defconst factor--regex-definition-start (format "^\\(%s:\\) " factor--regex-definition-starters)) @@ -372,7 +377,8 @@ buffer." (defconst factor--regex-single-liner (format "^%s" (regexp-opt '("DEFER:" "GENERIC:" "IN:" - "PRIVATE>" "" "