From unknown Fri Jun 20 07:24:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21627: 24.5; [generic-x]rul-generic-mode and font-lock bug Resent-From: rubikitch Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Oct 2015 01:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21627 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 21627@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14440935934828 (code B ref -1); Tue, 06 Oct 2015 01:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Oct 2015 01:06:33 +0000 Received: from localhost ([127.0.0.1]:55654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZjGi9-0001Fn-2A for submit@debbugs.gnu.org; Mon, 05 Oct 2015 21:06:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56896) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZjGi6-0001Ff-Bu for submit@debbugs.gnu.org; Mon, 05 Oct 2015 21:06:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjGi5-0008FY-6m for submit@debbugs.gnu.org; Mon, 05 Oct 2015 21:06:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjGi5-0008FU-4I for submit@debbugs.gnu.org; Mon, 05 Oct 2015 21:06:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjGi4-0007YO-4C for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2015 21:06:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjGi0-0008FA-PN for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2015 21:06:28 -0400 Received: from ofb14.esk.m4.zaq.ne.jp ([220.152.48.21]:53126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjGi0-0008Eu-BF for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2015 21:06:24 -0400 Received: from omx23.esk.m4.zaq.ne.jp ([220.152.49.19] [220.152.49.19]) by omx23.esk.m4.zaq.ne.jp with ESMTP id <20151006010603083.FYHY.9047.omx23.esk.m4.zaq.ne.jp@omx23.esk.m4.zaq.ne.jp> for ; Tue, 6 Oct 2015 10:06:03 +0900 Received: from smtp31.esk.m4.zaq.ne.jp ([119.171.28.116] [119.171.28.116]) by smtp31.esk.m4.zaq.ne.jp with ESMTP id <20151006010603005.LKDE.21239.smtp31.esk.m4.zaq.ne.jp@smtp31.esk.m4.zaq.ne.jp> for ; Tue, 6 Oct 2015 10:06:03 +0900 Date: Tue, 06 Oct 2015 10:06:02 +0900 (JST) Message-Id: <20151006.100602.1933052032710436942.rubikitch@ruby-lang.org> From: rubikitch X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) 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 From unknown Fri Jun 20 07:24:50 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: rubikitch Subject: bug#21627: closed (fixed) Message-ID: References: <87lh8m2g2v.fsf@tromey.com> <20151006.100602.1933052032710436942.rubikitch@ruby-lang.org> X-Gnu-PR-Message: they-closed 21627 X-Gnu-PR-Package: emacs Reply-To: 21627@debbugs.gnu.org Date: Tue, 22 Dec 2015 23:57:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1450828622-28553-1" This is a multi-part message in MIME format... ------------=_1450828622-28553-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #21627: 24.5; [generic-x]rul-generic-mode and font-lock bug which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 21627@debbugs.gnu.org. --=20 21627: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D21627 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1450828622-28553-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 21627-done) by debbugs.gnu.org; 22 Dec 2015 23:56:23 +0000 Received: from localhost ([127.0.0.1]:60250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aBWn1-0007Pd-26 for submit@debbugs.gnu.org; Tue, 22 Dec 2015 18:56:23 -0500 Received: from gproxy10-pub.mail.unifiedlayer.com ([69.89.20.226]:40258) by debbugs.gnu.org with smtp (Exim 4.84) (envelope-from ) id 1aBWmx-0007PT-TB for 21627-done@debbugs.gnu.org; Tue, 22 Dec 2015 18:56:21 -0500 Received: (qmail 21060 invoked by uid 0); 22 Dec 2015 23:56:16 -0000 Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy10.mail.unifiedlayer.com with SMTP; 22 Dec 2015 23:56:16 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw3 with id wuwA1r00r2f2jeq01uwDk5; Tue, 22 Dec 2015 23:56:14 -0700 X-Authority-Analysis: v=2.1 cv=bej4Do/B c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=zstS-IiYAAAA:8 a=PnD2wP_eR3oA:10 a=o7QNmaAbDssA:10 a=wUQvQvOEmiQA:10 a=8Y3iPfzg4sW45rtPuncA:9 a=V-4awrVuYm4A:10 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=O56M3/i3gwgdQHtkSCbT7x6Of1ke0zgsifrbxDMUckg=; b=FHXahC5wtCLX+sBKuaZwLddk3aJt0BUPlCDNcdRqr6Ema7YelFvWPqVaaPAHMlIEyK1EMnFmlgts27EaLVVaodM1wcjJBFRrSRXJJvjRmWvSsviuS0jDuX9TxFtAt2f+; Received: from [184.96.130.92] (port=60195 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.84) (envelope-from ) id 1aBWmr-0003Bo-45; Tue, 22 Dec 2015 16:56:13 -0700 From: Tom Tromey To: 21627-done@debbugs.gnu.org Subject: fixed X-Attribution: Tom Date: Tue, 22 Dec 2015 16:56:08 -0700 Message-ID: <87lh8m2g2v.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain X-Identified-User: {36111:box522.bluehost.com:elynrobi:tromey.com} {sentby:smtp auth 184.96.130.92 authed with tom+tromey.com} X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21627-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) I checked in a fix for this on the emacs-25 branch. Tom ------------=_1450828622-28553-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 6 Oct 2015 01:06:33 +0000 Received: from localhost ([127.0.0.1]:55654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZjGi9-0001Fn-2A for submit@debbugs.gnu.org; Mon, 05 Oct 2015 21:06:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56896) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZjGi6-0001Ff-Bu for submit@debbugs.gnu.org; Mon, 05 Oct 2015 21:06:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjGi5-0008FY-6m for submit@debbugs.gnu.org; Mon, 05 Oct 2015 21:06:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjGi5-0008FU-4I for submit@debbugs.gnu.org; Mon, 05 Oct 2015 21:06:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjGi4-0007YO-4C for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2015 21:06:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjGi0-0008FA-PN for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2015 21:06:28 -0400 Received: from ofb14.esk.m4.zaq.ne.jp ([220.152.48.21]:53126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjGi0-0008Eu-BF for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2015 21:06:24 -0400 Received: from omx23.esk.m4.zaq.ne.jp ([220.152.49.19] [220.152.49.19]) by omx23.esk.m4.zaq.ne.jp with ESMTP id <20151006010603083.FYHY.9047.omx23.esk.m4.zaq.ne.jp@omx23.esk.m4.zaq.ne.jp> for ; Tue, 6 Oct 2015 10:06:03 +0900 Received: from smtp31.esk.m4.zaq.ne.jp ([119.171.28.116] [119.171.28.116]) by smtp31.esk.m4.zaq.ne.jp with ESMTP id <20151006010603005.LKDE.21239.smtp31.esk.m4.zaq.ne.jp@smtp31.esk.m4.zaq.ne.jp> for ; Tue, 6 Oct 2015 10:06:03 +0900 Date: Tue, 06 Oct 2015 10:06:02 +0900 (JST) Message-Id: <20151006.100602.1933052032710436942.rubikitch@ruby-lang.org> To: bug-gnu-emacs@gnu.org Subject: 24.5; [generic-x]rul-generic-mode and font-lock bug From: rubikitch X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) 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 ------------=_1450828622-28553-1--