Subject: bug#9448: 24.0.50; Comments in Awk scripts not fontified with comment face

From: Glenn Morris <[email-masked]>
Date: Wed, 07 Sep 2011 15:17:36 -0400

Alan Mackenzie wrote:

> I think I see the problem, it's with the macro `define-derived-mode'.
> This creates an empty syntax table with (defvar awk-mode-syntax-table),
> and does this before cc-awk.elc has been loaded.  This thus stuffs the
> proper definition of awk-mode-syntax-table.

That's interesting. I imagine in most cases, all the definitions are in
the same file, eg:

(defvar foo-mode-map ... )
(defvar foo-mode-syntax-table ... )
(define-derived-mode foo-mode ... )

cc-awk is unusual in that the actual mode is defined in cc-mode.el and
requires cc-awk.el as part of its execution.

Another option is to move awk-mode-syntax-table from cc-awk.el to
cc-mode.el (I see the mode-map and abbrev-table are already there).
Unbinding it might erase any user customization.