emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ChangeLog fontifications


From: Stefan Monnier
Subject: Re: ChangeLog fontifications
Date: 12 May 2004 08:55:18 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>> > 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)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]