Merge branch 'emacs' of http://git.hacks-galore.org/jao/factor
						commit
						ad7e20a8d1
					
				|  | @ -79,11 +79,11 @@ | ||||||
|              (save-excursion |              (save-excursion | ||||||
|                (goto-char (nth 8 state)) |                (goto-char (nth 8 state)) | ||||||
|                (beginning-of-line) |                (beginning-of-line) | ||||||
|                (cond ((looking-at "USING: ") |                (cond ((looking-at-p "USING: ") | ||||||
|                       'factor-font-lock-vocabulary-name) |                       'factor-font-lock-vocabulary-name) | ||||||
|                      ((looking-at "\\(TUPLE\\|SYMBOLS\\|VARS\\): ") |                      ((looking-at-p "\\(TUPLE\\|SYMBOLS\\|VARS\\|SINGLETONS\\):") | ||||||
|                       'factor-font-lock-symbol) |                       'factor-font-lock-symbol) | ||||||
|                      ((looking-at "C-ENUM:\\( \\|\n\\)") |                      ((looking-at-p "C-ENUM:\\( \\|\n\\)") | ||||||
|                       'factor-font-lock-constant) |                       'factor-font-lock-constant) | ||||||
|                      (t 'default)))) |                      (t 'default)))) | ||||||
|             ((or (char-equal c ?U) (char-equal c ?C)) |             ((or (char-equal c ?U) (char-equal c ?C)) | ||||||
|  |  | ||||||
|  | @ -106,9 +106,10 @@ | ||||||
|   "\\_<\"[^>]\\([^\"\n]\\|\\\\\"\\)*\n") |   "\\_<\"[^>]\\([^\"\n]\\|\\\\\"\\)*\n") | ||||||
| 
 | 
 | ||||||
| (defconst fuel-syntax--word-definition-regex | (defconst fuel-syntax--word-definition-regex | ||||||
|   (fuel-syntax--second-word-regex |   (format "\\_<\\(%s\\)?: +\\_<\\(\\w+\\)\\_>" | ||||||
|    '(":" "::" "GENERIC:" "DEFER:" "HOOK:" "MAIN:" "MATH:" "POSTPONE:" |           (regexp-opt | ||||||
|      "SYMBOL:" "RENAME:"))) |            '(":" "GENERIC" "DEFER" "HOOK" "MAIN" "MATH" "POSTPONE" | ||||||
|  |              "SYMBOL" "RENAME")))) | ||||||
| 
 | 
 | ||||||
| (defconst fuel-syntax--alias-definition-regex | (defconst fuel-syntax--alias-definition-regex | ||||||
|   "^ALIAS: +\\(\\_<.+?\\_>\\) +\\(\\_<.+?\\_>\\)") |   "^ALIAS: +\\(\\_<.+?\\_>\\) +\\(\\_<.+?\\_>\\)") | ||||||
|  | @ -168,9 +169,6 @@ | ||||||
| (defconst fuel-syntax--indent-def-start-regex | (defconst fuel-syntax--indent-def-start-regex | ||||||
|   (format "^\\(%s:\\)\\( \\|\n\\)" (regexp-opt fuel-syntax--indent-def-starts))) |   (format "^\\(%s:\\)\\( \\|\n\\)" (regexp-opt fuel-syntax--indent-def-starts))) | ||||||
| 
 | 
 | ||||||
| (defconst fuel-syntax--no-indent-def-start-regex |  | ||||||
|   (format "^\\(%s:\\) " (regexp-opt fuel-syntax--no-indent-def-starts))) |  | ||||||
| 
 |  | ||||||
| (defconst fuel-syntax--definition-start-regex | (defconst fuel-syntax--definition-start-regex | ||||||
|   (format "^\\(%s:\\) " (regexp-opt (append fuel-syntax--no-indent-def-starts |   (format "^\\(%s:\\) " (regexp-opt (append fuel-syntax--no-indent-def-starts | ||||||
|                                             fuel-syntax--indent-def-starts)))) |                                             fuel-syntax--indent-def-starts)))) | ||||||
|  | @ -261,8 +259,8 @@ | ||||||
|     ("\\_<\\(C\\)-ENUM: \\(;\\)" (1 "<b") (2 ">b")) |     ("\\_<\\(C\\)-ENUM: \\(;\\)" (1 "<b") (2 ">b")) | ||||||
|     ("\\_<C-ENUM:\\( \\|\n\\)" (1 "<b")) |     ("\\_<C-ENUM:\\( \\|\n\\)" (1 "<b")) | ||||||
|     ("\\_<TUPLE: +\\w+? +< +\\w+? *\\( \\|\n\\)\\([^;]\\|$\\)" (1 "<b")) |     ("\\_<TUPLE: +\\w+? +< +\\w+? *\\( \\|\n\\)\\([^;]\\|$\\)" (1 "<b")) | ||||||
|     ("\\_<\\(TUPLE\\|SYMBOLS\\|VARS\\): +\\w+? *\\( \\|\n\\)\\([^;<\n]\\|\\_>\\)" |     ("\\_<TUPLE: +\\w+? *\\( \\|\n\\)\\([^;<\n]\\|\\_>\\)" (1 "<b")) | ||||||
|      (2 "<b")) |     ("\\_<\\(SYMBOLS\\|VARS\\|SINGLETONS\\): *?\\( \\|\n\\)\\([^;\n]\\|\\_>\\)" (2 "<b")) | ||||||
|     ("\\(\n\\| \\);\\_>" (1 ">b")) |     ("\\(\n\\| \\);\\_>" (1 ">b")) | ||||||
|     ;; Let and lambda: |     ;; Let and lambda: | ||||||
|     ("\\_<\\(!(\\) .* \\()\\)" (1 "<") (2 ">")) |     ("\\_<\\(!(\\) .* \\()\\)" (1 "<") (2 ">")) | ||||||
|  | @ -323,7 +321,7 @@ | ||||||
| (defsubst fuel-syntax--is-last-char (pos) | (defsubst fuel-syntax--is-last-char (pos) | ||||||
|   (save-excursion |   (save-excursion | ||||||
|     (goto-char (1+ pos)) |     (goto-char (1+ pos)) | ||||||
|     (fuel-syntax--looking-at-emptiness))) |     (looking-at-p "[ ]*$"))) | ||||||
| 
 | 
 | ||||||
| (defsubst fuel-syntax--line-offset (pos) | (defsubst fuel-syntax--line-offset (pos) | ||||||
|   (- pos (save-excursion |   (- pos (save-excursion | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue