From unknown Fri Jun 20 19:45:22 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#4818 <4818@debbugs.gnu.org> To: bug#4818 <4818@debbugs.gnu.org> Subject: Status: 23.1; checkdoc noun at end of sentence Reply-To: bug#4818 <4818@debbugs.gnu.org> Date: Sat, 21 Jun 2025 02:45:22 +0000 retitle 4818 23.1; checkdoc noun at end of sentence reassign 4818 emacs submitter 4818 Kevin Ryde severity 4818 normal thanks From gg@zip.com.au Tue Oct 27 16:34:57 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 27 Oct 2009 23:34:58 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.9 required=4.0 tests=AWL,FOURLA,FVGT_m_MULTI_ODD autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9RNYuKV011741 for ; Tue, 27 Oct 2009 16:34:57 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N2vZ2-0008G2-2o for bug-gnu-emacs@gnu.org; Tue, 27 Oct 2009 19:34:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N2vYx-0008FK-E6 for bug-gnu-emacs@gnu.org; Tue, 27 Oct 2009 19:34:55 -0400 Received: from [199.232.76.173] (port=40591 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N2vYx-0008FH-6U for bug-gnu-emacs@gnu.org; Tue, 27 Oct 2009 19:34:51 -0400 Received: from mailout1-1.pacific.net.au ([61.8.2.208]:39728 helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N2vYw-00089o-CK for bug-gnu-emacs@gnu.org; Tue, 27 Oct 2009 19:34:50 -0400 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 2674E5086A7 for ; Wed, 28 Oct 2009 10:34:46 +1100 (EST) Received: from blah.blah (ppp2E54.dyn.pacific.net.au [61.8.46.84]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 22ECB27430 for ; Wed, 28 Oct 2009 10:34:45 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1N2vYM-0005Ti-3b for bug-gnu-emacs@gnu.org; Wed, 28 Oct 2009 10:34:14 +1100 From: Kevin Ryde To: bug-gnu-emacs@gnu.org Subject: 23.1; checkdoc noun at end of sentence Date: Wed, 28 Oct 2009 10:34:12 +1100 Message-ID: <87ocnsqumj.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) --=-=-= Running M-x checkdoc over the foo.el below I hoped it would ask to capitalize "emacs" to "Emacs" in each of the three places. A real-life example can be found in `vi-save-all-and-exit' of vi.el. I suspect the \\_> in checkdoc-proper-noun-regexp doesn't match a "." at the end of a sentence. Would relaxing that a bit like below cause any false positives? Incidentally, checkdoc-proper-noun-regexp could build its value with regexp-opt could it? Not that it needs to be optimized, just easier than an explicit concatenating loop. 2009-10-27 Kevin Ryde * emacs-lisp/checkdoc.el (checkdoc-proper-noun-regexp): Match noun at end of sentence. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=checkdoc.el.noun-end-sentence.diff --- checkdoc.el.~1.79.~ 2009-10-28 09:39:24.000000000 +1100 +++ checkdoc.el 2009-10-28 10:25:24.000000000 +1100 @@ -331,12 +331,15 @@ "List of words (not capitalized) which should be capitalized.") (defvar checkdoc-proper-noun-regexp + ;; "[.!?]" bit is for noun at end of a sentence, since those chars + ;; are symbol syntax in emacs-lisp-mode and so don't match \\_>. + ;; The \" allows it to be the last sentence in a docstring too. (let ((expr "\\_<\\(") (l checkdoc-proper-noun-list)) (while l (setq expr (concat expr (car l) (if (cdr l) "\\|" "")) l (cdr l))) - (concat expr "\\)\\_>")) + (concat expr "\\)\\(\\_>\\|[.!?][ \t\n\"]\\)")) "Regular expression derived from `checkdoc-proper-noun-regexp'.") (defvar checkdoc-common-verbs-regexp nil --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=foo.el Content-Transfer-Encoding: quoted-printable ;;; foo.el --- blah ;;; Commentary: ;;; History: ;;; Code: (defun foo () "Blah blah. One about emacs. About two emacs. Three times emacs.") (provide 'foo) ;;; foo.el ends here --=-=-= In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-09-14 on raven, modified by Debian configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t --=-=-=-- From cyd@stupidchicken.com Sat Nov 7 11:14:48 2009 Received: (at 4818) by emacsbugs.donarmstrong.com; 7 Nov 2009 19:14:49 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.4 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po25.its.yale.edu (pantheon-po25.its.yale.edu [130.132.50.119]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA7JElV8030325 for <4818@emacsbugs.donarmstrong.com>; Sat, 7 Nov 2009 11:14:48 -0800 Received: from furry (dhcp128036014244.central.yale.edu [128.36.14.244]) (authenticated bits=0) by pantheon-po25.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id nA7JEfBg018099 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 7 Nov 2009 14:14:41 -0500 Received: by furry (Postfix, from userid 1000) id 0EDE7C070; Sat, 7 Nov 2009 14:14:41 -0500 (EST) From: Chong Yidong To: Kevin Ryde Cc: 4818@debbugs.gnu.org Subject: Re: 23.1; checkdoc noun at end of sentence Date: Sat, 07 Nov 2009 14:14:41 -0500 Message-ID: <87y6mii1um.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) > Running M-x checkdoc over the foo.el below I hoped it would ask to > capitalize "emacs" to "Emacs" in each of the three places. A real-life > example can be found in `vi-save-all-and-exit' of vi.el. > I suspect the \\_> in checkdoc-proper-noun-regexp doesn't match a "." at > the end of a sentence. Would relaxing that a bit like below cause any > false positives? Look OK, feel free to check in (and close this bug). From gg@zip.com.au Sun Nov 8 14:03:39 2009 Received: (at 4818-done) by emacsbugs.donarmstrong.com; 8 Nov 2009 22:03:39 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.9 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout1.pacific.net.au (mailout1-1.pacific.net.au [61.8.2.208]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA8M3blD020479 for <4818-done@emacsbugs.donarmstrong.com>; Sun, 8 Nov 2009 14:03:39 -0800 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 9113950877A; Mon, 9 Nov 2009 09:03:35 +1100 (EST) Received: from blah.blah (ppp294D.dyn.pacific.net.au [61.8.41.77]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 757A927820; Mon, 9 Nov 2009 09:03:32 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1N7FqE-00030a-DN; Mon, 09 Nov 2009 09:02:34 +1100 From: Kevin Ryde To: 4818-done@debbugs.gnu.org Cc: Chong Yidong Subject: Re: 23.1; checkdoc noun at end of sentence References: <87y6mii1um.fsf@stupidchicken.com> Date: Mon, 09 Nov 2009 09:02:34 +1100 In-Reply-To: <87y6mii1um.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 07 Nov 2009 14:14:41 -0500") Message-ID: <873a4osmit.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Chong Yidong writes: > > Look OK, feel free to check in (and close this bug). Beaut, done. From unknown Fri Jun 20 19:45:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 07 Dec 2009 15:24:24 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator