From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: ChangeLog fontifications Date: 12 May 2004 08:55:18 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <874qqmdep6.fsf@mail.jurta.org> <87brku8q2b.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084367756 2154 80.91.224.253 (12 May 2004 13:15:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 May 2004 13:15:56 +0000 (UTC) Cc: Juri Linkov , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed May 12 15:15:42 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNtaI-0008J4-00 for ; Wed, 12 May 2004 15:15:42 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNtaH-00073l-01 for ; Wed, 12 May 2004 15:15:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNtHl-00064E-VV for emacs-devel@quimby.gnus.org; Wed, 12 May 2004 08:56:34 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BNtHh-00063i-5m for emacs-devel@gnu.org; Wed, 12 May 2004 08:56:29 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BNtHB-0005yy-CK for emacs-devel@gnu.org; Wed, 12 May 2004 08:56:28 -0400 Original-Received: from [206.47.199.165] (helo=simmts7-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNtGe-0005tW-Ta; Wed, 12 May 2004 08:55:25 -0400 Original-Received: from empanada.local ([67.68.218.161]) by simmts7-srv.bellnexxia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040512125524.KBLP11651.simmts7-srv.bellnexxia.net@empanada.local>; Wed, 12 May 2004 08:55:24 -0400 Original-Received: by empanada.local (Postfix, from userid 502) id 26C7618765D; Wed, 12 May 2004 08:55:18 -0400 (EDT) Original-To: Eli Zaretskii In-Reply-To: Original-Lines: 35 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23240 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23240 >> > It's not the highlighting that's incorrect, it's the syntax. >> > Actually I have extended my font-lock regexes to recognize the above and >> > mark it in font-lock-warning-face. >> > I also have a highlight pattern to try and recognize when the past tense is >> > used ;-) >> It seems your rules are useful to be added to add-log.el to help the >> developers to write more correct entries in ChangeLog files. > Seconded. Problem is, I expect many people use change-log-mode in files where they do not follow all the rules and they'd be annoyed by such changes. And of course the "detect past tense" thingy is english-only, so it's also inappropriate in general. Stefan + ;; Style warnings. + ("[ \t]+$" (0 'trailing-whitespace t)) + ("^ +" (0 'trailing-whitespace t)) + ;; Use + ;; * foo.el (bla, bli) + ;; (blo, blu): Toto. + ;; Rather than + ;; * foo.el (bla, bli, + ;; blo, blu): Toto. + ("^\\s-+\\(\\* .*\\)?([^\n)]*,\\s-*$" (0 font-lock-warning-face t)) + ;; Don't cut a sentence right after the first word (better to move + ;; the sentence on the next line, then). + ("[.:]\\s-+\\(\\sw+\\)\\s-*$" (1 font-lock-warning-face t)) + ;; Change Log entries should use present tense. + ("):[ \t\n]*[[:alpha:]]+\\(ed\\)\\>" (1 font-lock-warning-face t)) + ;; Change log entries start with a capital letter. + ("): [a-z]" (0 font-lock-warning-face t)))