From d180a41dbb8e4e8d94d30a023c2d86d92c73c4f1 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Mon, 28 Dec 2020 20:42:25 +0000 Subject: CC Mode: Add newish AWK Mode facilities, as used in gawk-4. * lisp/progmodes/cc-awk.el (c-awk-font-lock-invalid-namespace-separators): New function. (c-awk-context-expand-fl-region): New function. (awk-font-lock-keywords): Enhance handling of function declarations to include :: tokens. Fontify new system variable names FPAT, FUNCTAB, PREC, ROUNDMODE, SYNTAB. Fontify new keywords BEGINFILE and ENDFILE. Fontify new system functions asorti, dcngettext, isarray, patsplit, typeof. Fontify the new directives @include, @load, @namespace. Call c-awk-font-lock-invalid-namespace-separators as a matcher. * lisp/progmodes/cc-fonts.el (top level): No longer require 'cc-awk. * lisp/progmodes/cc-langs.el (c-before-context-fontification-functions): Give AWK the value c-awk-context-expand-fl-region rather than nil. * lisp/progmodes/cc-mode.el (top level): Declare awk-mode-syntax-table as a variable. --- lisp/progmodes/cc-langs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/progmodes/cc-langs.el') diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 4d1aeaa5cb9..9b13cedc988 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -549,7 +549,7 @@ parameters (point-min), (point-max) and .") (c-lang-defconst c-before-context-fontification-functions t 'c-context-expand-fl-region - awk nil) + awk 'c-awk-context-expand-fl-region) ;; For documentation see the following c-lang-defvar of the same name. ;; The value here may be a list of functions or a single function. (c-lang-defvar c-before-context-fontification-functions -- cgit v1.2.3