+(defconst icon-font-lock-keywords-1
+ (eval-when-compile
+ (list
+ ;; Fontify procedure name definitions.
+ '("^[ \t]*\\(procedure\\)\\>[ \t]*\\(\\sw+\\)?"
+ (1 font-lock-builtin-face) (2 font-lock-function-name-face nil t))))
+ "Subdued level highlighting for Icon mode.")
+
+(defconst icon-font-lock-keywords-2
+ (append
+ icon-font-lock-keywords-1
+ (eval-when-compile
+ (list
+ ;; Fontify all type specifiers.
+ (cons
+ (regexp-opt '("null" "string" "co-expression" "table" "integer"
+ "cset" "set" "real" "file" "list") 'words)
+ 'font-lock-type-face)
+ ;; Fontify all keywords.
+ ;;
+ (cons
+ (regexp-opt
+ '("break" "do" "next" "repeat" "to" "by" "else" "if" "not" "return"
+ "until" "case" "of" "while" "create" "every" "suspend" "default"
+ "fail" "record" "then") 'words)
+ 'font-lock-keyword-face)
+ ;; "end" "initial"
+ (cons (regexp-opt '("end" "initial") 'words)
+ 'font-lock-builtin-face)
+ ;; Fontify all system variables.
+ (cons
+ (regexp-opt
+ '("&allocated" "&ascii" "&clock" "&col" "&collections" "&column"
+ "&control" "&cset" "¤t" "&date" "&dateline" "&digits" "&dump"
+ "&e" "&error" "&errornumber" "&errortext" "&errorvalue" "&errout"
+ "&eventcode" "&eventsource" "&eventvalue" "&fail" "&features"
+ "&file" "&host" "&input" "&interval" "&lcase" "&ldrag" "&letters"
+ "&level" "&line" "&lpress" "&lrelease" "&main" "&mdrag" "&meta"
+ "&mpress" "&mrelease" "&null" "&output" "&phi" "&pi" "&pos"
+ "&progname" "&random" "&rdrag" "®ions" "&resize" "&row"
+ "&rpress" "&rrelease" "&shift" "&source" "&storage" "&subject"
+ "&time" "&trace" "&ucase" "&version" "&window" "&x" "&y") t)
+ 'font-lock-constant-face)
+ (cons ;; global local static declarations and link files
+ (concat
+ "^[ \t]*"
+ (regexp-opt '("global" "link" "local" "static") t)
+ "\\(\\sw+\\>\\)*")
+ '((1 font-lock-builtin-face)
+ (font-lock-match-c-style-declaration-item-and-skip-to-next
+ (goto-char (or (match-beginning 2) (match-end 1))) nil
+ (1 (if (match-beginning 2)
+ font-lock-function-name-face
+ font-lock-variable-name-face)))))
+
+ (cons ;; $define $elif $ifdef $ifndef $undef
+ (concat "^"
+ (regexp-opt'("$define" "$elif" "$ifdef" "$ifndef" "$undef") t)
+ "\\>[ \t]*\\([^ \t\n]+\\)?")
+ '((1 font-lock-builtin-face)
+ (4 font-lock-variable-name-face nil t)))
+ (cons ;; $dump $endif $else $include
+ (concat
+ "^" (regexp-opt'("$dump" "$endif" "$else" "$include") t) "\\>" )
+ 'font-lock-builtin-face)
+ (cons ;; $warning $error
+ (concat "^" (regexp-opt '("$warning" "$error") t)
+ "\\>[ \t]*\\(.+\\)?")
+ '((1 font-lock-builtin-face) (3 font-lock-warning-face nil t))))))
+ "Gaudy level highlighting for Icon mode.")
+
+(defvar icon-font-lock-keywords icon-font-lock-keywords-1
+ "Default expressions to highlight in `icon-mode'.")
+
+;;;used by hs-minor-mode
+(defun icon-forward-sexp-function (arg)
+ (if (< arg 0)
+ (beginning-of-icon-defun)
+ (end-of-icon-defun)
+ (forward-char -1)))
+
+(provide 'icon)
+
+;;; arch-tag: 8abf8c99-e7df-44af-a58f-ef5ed2ee52cb