FUEL: More font-lock fixes; README fixes.

db4
Jose A. Ortega Ruiz 2009-01-16 01:14:56 +01:00
parent 4583852caf
commit 2ec25e67bc
2 changed files with 21 additions and 26 deletions

View File

@ -18,16 +18,11 @@ beast.
(load-file "<path/to/factor/installation>/misc/fuel/fu.el") (load-file "<path/to/factor/installation>/misc/fuel/fu.el")
or
(add-to-list load-path "<path/to/factor/installation>/fuel")
(require 'fuel)
If all you want is a major mode for editing Factor code with pretty If all you want is a major mode for editing Factor code with pretty
font colors and indentation, without running the factor listener font colors and indentation, without running the factor listener
inside Emacs, you can use instead: inside Emacs, you can use instead:
(add-to-list load-path "<path/to/factor/installation>/fuel") (add-to-list 'load-path "<path/to/factor/installation>/fuel")
(setq factor-mode-use-fuel nil) (setq factor-mode-use-fuel nil)
(require 'factor-mode) (require 'factor-mode)

View File

@ -79,7 +79,7 @@
(regexp-opt fuel-syntax--declaration-words 'words)) (regexp-opt fuel-syntax--declaration-words 'words))
(defsubst fuel-syntax--second-word-regex (prefixes) (defsubst fuel-syntax--second-word-regex (prefixes)
(format "^%s +\\([^ \r\n]+\\)" (regexp-opt prefixes t))) (format "%s +\\([^ \r\n]+\\)" (regexp-opt prefixes t)))
(defconst fuel-syntax--method-definition-regex (defconst fuel-syntax--method-definition-regex
"^M: +\\([^ ]+\\) +\\([^ ]+\\)") "^M: +\\([^ ]+\\) +\\([^ ]+\\)")
@ -172,7 +172,7 @@
fuel-syntax--declaration-words-regex)) fuel-syntax--declaration-words-regex))
(defconst fuel-syntax--single-liner-regex (defconst fuel-syntax--single-liner-regex
(format "^%s" (regexp-opt '("ABOUT:" (regexp-opt '("ABOUT:"
"ARTICLE:" "ARTICLE:"
"ALIAS:" "ALIAS:"
"CONSTANT:" "C:" "CONSTANT:" "C:"
@ -188,10 +188,10 @@
"RENAME:" "RENAME:"
"SINGLETON:" "SLOT:" "SYMBOL:" "SINGLETON:" "SLOT:" "SYMBOL:"
"USE:" "USE:"
"VAR:")))) "VAR:")))
(defconst fuel-syntax--begin-of-def-regex (defconst fuel-syntax--begin-of-def-regex
(format "^USING: \\|\\(%s\\)\\|\\(%s .*\\)" (format "^USING: \\|\\(%s\\)\\|\\(^%s .*\\)"
fuel-syntax--definition-start-regex fuel-syntax--definition-start-regex
fuel-syntax--single-liner-regex)) fuel-syntax--single-liner-regex))
@ -199,7 +199,7 @@
(format "^.*%s" fuel-syntax--definition-end-regex)) (format "^.*%s" fuel-syntax--definition-end-regex))
(defconst fuel-syntax--end-of-def-regex (defconst fuel-syntax--end-of-def-regex
(format "\\(%s\\)\\|\\(%s .*\\)" (format "\\(%s\\)\\|\\(^%s .*\\)"
fuel-syntax--end-of-def-line-regex fuel-syntax--end-of-def-line-regex
fuel-syntax--single-liner-regex)) fuel-syntax--single-liner-regex))