From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: (no subject) Date: Tue, 17 May 2005 11:17:13 +0900 (JST) Message-ID: <200505170217.LAA13527@etlken.m17n.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1116371742 31376 80.91.229.2 (17 May 2005 23:15:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 May 2005 23:15:42 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 18 01:15:34 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DYBGu-0007SK-BN for ged-emacs-devel@m.gmane.org; Wed, 18 May 2005 01:14:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DYBJE-0002kt-51 for ged-emacs-devel@m.gmane.org; Tue, 17 May 2005 19:17:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DXtdd-0007tK-T7 for emacs-devel@gnu.org; Tue, 17 May 2005 00:25:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DXsUC-0002X9-Kr for emacs-devel@gnu.org; Mon, 16 May 2005 23:11:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DXrhI-0000Q8-0B for emacs-devel@gnu.org; Mon, 16 May 2005 22:20:40 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DXrlf-0007hn-2F for emacs-devel@gnu.org; Mon, 16 May 2005 22:25:11 -0400 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id j4H2HD86029054 for ; Tue, 17 May 2005 11:17:13 +0900 Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by nfs.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id j4H2HDCq008003 for ; Tue, 17 May 2005 11:17:13 +0900 Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id LAA13527; Tue, 17 May 2005 11:17:13 +0900 (JST) Original-To: emacs-devel@gnu.org Original-References: problem of makefile-mode with font-lock User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:37203 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37203 With today's CVS, I found that makefile-mode got unusable when font-lock is on. When I visit, for instance, emacs/Makefile.in, it is displayed with font-lock correctly fairly soon. But when I hit C-v, I feel a delay in displaying the next page. When I hit more C-v's, the screen update gets slower and slower, and, at last Emacs hangups. Typing C-g doesn't work. Gdb shows that Emacs is executing re-search-forward. (gdb) xba "re-search-forward" "byte-code" "makefile-match-dependency" "font-lock-fontify-keywords-region" "font-lock-default-fontify-region" "font-lock-fontify-region" "run-hook-with-args" "byte-code" "jit-lock-fontify-now" "jit-lock-function" Isn't it because of this change? 2005-05-16 Daniel Pfeiffer * font-lock.el (lisp-font-lock-keywords-1): Set `font-lock-negation-char-face' for [^...] char group. (lisp-font-lock-keywords-2): Highlight regexp's \\( \\| \\). * progmodes/make-mode.el (makefile-dependency-regex): Turn it into a var, and refine it to mask one more level of nested vars. (makefile-rule-action-regex): Turn it into a var, and refine it so it recognizes backslashed continuation lines as belonging to the same command. (makefile-macroassign-regex): Refine it so it recognizes backslashed continuation lines as belonging to the same command. (makefile-var-use-regex): Don't look at the next char, because it might be the same one to be skipped by the initial [^$], leading to an overlooked variable use. (makefile-make-font-lock-keywords): Remove two parameters, which are now variables that some of the modes set locally. Handle dependency and rule action matching through functions, because regexps alone match too often. Dependency matching now comes last, so it can check, whether a colon already matched something else. (makefile-mode): Inform that font-lock improves makefile parsing capabilities. (makefile-match-dependency, makefile-match-action): New functions. --- Ken'ichi HANDA handa@m17n.org