GNU logs - #5126, boring messages

Message sent to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:

X-Loop: owner@HIDDEN
Subject: bug#5126: 23.1; checkdoc-comment-style-hooks stops at first error
Reply-To: Kevin Ryde <user42@HIDDEN>, 5126 <at>
Resent-From: Kevin Ryde <user42@HIDDEN>
Resent-To: bug-submit-list@HIDDEN
Resent-CC: Emacs Bugs <bug-gnu-emacs@HIDDEN>
2Resent-Date: Fri, 04 Dec 2009 22:50:10 +0000
Resent-Message-ID: <handler.5126.B.12599667162979@HIDDEN>
Resent-Sender: help-debbugs@HIDDEN
X-Emacs-PR-Message: report 5126
X-Emacs-PR-Package: emacs
Received: via spool by submit@HIDDEN id=B.12599667162979
          (code B ref -1); Fri, 04 Dec 2009 22:50:10 +0000
Received: (at submit) by; 4 Dec 2009 22:45:16 +0000
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-0.8 required=4.0 tests=AWL,FOURLA autolearn=no
Received: from ( [])
	by (8.14.3/8.14.3/Debian-5) with ESMTP id nB4MjDAq002952
	for <submit@HIDDEN>; Fri, 4 Dec 2009 14:45:15 -0800
Received: from mailman by with tmda-scanned (Exim 4.43)
	id 1NGgtk-0006i9-Ve
	for bug-gnu-emacs@HIDDEN; Fri, 04 Dec 2009 17:45:13 -0500
Received: from exim by with spam-scanned (Exim 4.43)
	id 1NGgtg-0006gL-4n
	for bug-gnu-emacs@HIDDEN; Fri, 04 Dec 2009 17:45:12 -0500
Received: from [] (port=43978
	by with esmtp (Exim 4.43)
	id 1NGgtf-0006gI-Rt
	for bug-gnu-emacs@HIDDEN; Fri, 04 Dec 2009 17:45:07 -0500
Received: from ([]:58552
	by with esmtp (Exim 4.60)
	(envelope-from <gg@HIDDEN>)
	id 1NGgtf-000509-8n
	for bug-gnu-emacs@HIDDEN; Fri, 04 Dec 2009 17:45:07 -0500
Received: from ( [])
	by (Postfix) with ESMTP id 011461A2D24
	for <bug-gnu-emacs@HIDDEN>; Sat,  5 Dec 2009 09:45:01 +1100 (EST)
Received: from blah.blah ( [])
	by (Postfix) with ESMTP id D532027411
	for <bug-gnu-emacs@HIDDEN>; Sat,  5 Dec 2009 09:44:59 +1100 (EST)
Received: from gg by blah.blah with local (Exim 4.69)
	(envelope-from <gg@HIDDEN>)
	id 1NGgtG-0004QA-DF
	for bug-gnu-emacs@HIDDEN; Sat, 05 Dec 2009 09:44:42 +1100
From: Kevin Ryde <user42@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Date: Sat, 05 Dec 2009 09:44:42 +1100
Message-ID: <87ws12jr51.fsf@HIDDEN>
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
X-detected-operating-system: by GNU/Linux 2.6, seldom 2.4 (older, 4)

checkdoc-comment-style-hooks is run by checkdoc-file-comments-engine
with run-hook-with-args-until-success, which means if one of the hook
functions returns an error string (as described in the hook's docstring)
then no further functions are run.

I hoped the hook functions would instead run like the builtin checks of

    (setq err (or (some check)

so that all checks are always run, with an error reported if any one of
them reports an error.

Or alternately perhaps I misunderstand the docstring of
checkdoc-comment-style-hooks, and that a "problem discovered" means
something fatal and unrecoverable, or something, and that hook functions
should almost always return nil no matter what they find.

I threw down the few lines below for a hook run which returns the last
true value, but I'm not sure I like it much.  An alternative to picking
out a list of functions from a hook might be a
"run-hook-with-accumulator-function" or even a "map-hook" -- unless that
exists already.

(defun checkdoc-run-hooks-last-true (hookvar)
  "Run hooks in HOOKVAR and return the last true value."
  (let (ret)
    (dolist (func (checkdoc-hook-functions hookvar))
      (setq ret (or (funcall func) ret)))))

(defun checkdoc-hook-functions (hookvar)
  "Return a list of functions HOOKVAR should run.
HOOKVAR can be a single function or list of functions, the return
is always a list.  `t' in a buffer-local value means use the
global `default-value' at that point, and it can likewise be a
function or list."
  (let ((hooks (symbol-value hookvar)))
    (if (and hooks
	     ;; same test as run_hook_with_args()
	     (or (not (consp hooks))
		 (eq 'lambda (car hooks))))
	(list hooks) ;; single function listified

      ;; expand `t' to global value
      (apply 'append
	     (mapcar (lambda (func)
		       (if (eq t func)
			   (let ((global (default-value hookvar)))
			     ;; same test as run_hook_with_args()
			     (if (or (not (consp global))
				     (eq 'lambda (car global)))
				 (list global)
			 (list func)))

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

Message sent:

Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain; charset=utf-8
X-Loop: owner@HIDDEN
From: help-debbugs@HIDDEN (Emacs bug Tracking System)
To: Kevin Ryde <user42@HIDDEN>
Subject: bug#5126: Acknowledgement (23.1; checkdoc-comment-style-hooks
 stops at first error)
Message-ID: <handler.5126.B.12599667162979.ack@HIDDEN>
References: <87ws12jr51.fsf@HIDDEN>
X-Emacs-PR-Message: ack 5126
X-Emacs-PR-Package: emacs
Reply-To: 5126 <at>
Date: Fri, 04 Dec 2009 22:50:11 +0000

Thank you for filing a new bug report with Emacs.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 Emacs Bugs <bug-gnu-emacs@HIDDEN>

If you wish to submit further information on this problem, please
send it to 5126 <at>

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

Emacs Bug Tracking System
Contact help-debbugs@HIDDEN with problems

Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.