Subject: 24.5; [generic-x]rul-generic-mode and font-lock bug

From: rubikitch <[email-masked]>
Date: Tue, 06 Oct 2015 10:06:02 +0900 (JST)

Hi,

I found rul-generic-mode and font-lock bug.

==== test.el
(setq generic-extras-enable-list '(rul-generic-mode))
(require 'generic-x)
(find-library "files")
(find-file "/tmp/test.rul")             ;empty file ok
(switch-to-buffer "files.el")
(emacs-lisp-mode)
====

$ emacs -Q -l test.el

Font-locking is incorrect in files.el.
I think because `font-lock-syntax-table' is not buffer-local.
I fixed it by advice.

====
(defun generic-rul-mode-setup-function--font-lock-bug-fix (&rest them)
  (make-local-variable 'font-lock-syntax-table))
(advice-add 'generic-rul-mode-setup-function :before
  'generic-rul-mode-setup-function--font-lock-bug-fix)
====

In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GNU/LessTif Version 2.1 Release 0.95.2)
 of 2015-04-11 on yui
Windowing system distributor `The X.Org Foundation', version 11.0.11702000
System Description:	Debian GNU/Linux testing (stretch)

Configured using:
 `configure --disable-largefile --with-x-toolkit=motif
 --without-toolkit-scroll-bars --without-xaw3d --without-xim
 --without-compress-info --without-sound --without-pop
 --without-sync-input --without-xpm --without-tiff --without-rsvg
 --without-gconf --without-gsettings --without-selinux --without-gpm
 --without-makeinfo --with-x 'CFLAGS=-march=corei7 -O2 -pipe''

Important settings:
  value of $LC_ALL: ja_JP.utf8
  value of $LC_CTYPE: ja_JP.utf8
  value of $LANG: ja_JP.utf8
  value of $XMODIFIERS: @im=skkinput
  locale-coding-system: utf-8-unix

Cheers,
--
rubikitch