GNU bug report logs - #9448
24.0.50; Comments in Awk scripts not fontified with comment face

Previous Next

Packages: emacs, cc-mode;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Tue, 6 Sep 2011 04:32:02 UTC

Severity: normal

Found in version 24.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 9448 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 9448 <at> debbugs.gnu.org
Subject: Re: bug#9448: 24.0.50;
	Comments in Awk scripts not fontified with comment face
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.




This bug report was last modified 13 years and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.