From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex Branham Newsgroups: gmane.emacs.bugs Subject: bug#5126: 23.1; checkdoc-comment-style-hooks stops at first error Date: Fri, 16 Aug 2019 14:14:08 -0500 Message-ID: <87sgq0ly7z.fsf@gmail.com> References: <87ws12jr51.fsf@blah.blah> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="266511"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 5126@debbugs.gnu.org, Kevin Ryde To: Andrew Hyatt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 16 21:15:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hyhgt-0017Ex-KP for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Aug 2019 21:15:11 +0200 Original-Received: from localhost ([::1]:59340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyhgs-0002IQ-9D for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Aug 2019 15:15:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43780) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyhgl-0002I5-5b for bug-gnu-emacs@gnu.org; Fri, 16 Aug 2019 15:15:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hyhgk-0005IW-80 for bug-gnu-emacs@gnu.org; Fri, 16 Aug 2019 15:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46062) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hyhgk-0005II-2b for bug-gnu-emacs@gnu.org; Fri, 16 Aug 2019 15:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hyhgj-0006Ds-Rm for bug-gnu-emacs@gnu.org; Fri, 16 Aug 2019 15:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Aug 2019 19:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5126 X-GNU-PR-Package: emacs Original-Received: via spool by 5126-submit@debbugs.gnu.org id=B5126.156598285723834 (code B ref 5126); Fri, 16 Aug 2019 19:15:01 +0000 Original-Received: (at 5126) by debbugs.gnu.org; 16 Aug 2019 19:14:17 +0000 Original-Received: from localhost ([127.0.0.1]:54883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyhg0-0006CM-Tu for submit@debbugs.gnu.org; Fri, 16 Aug 2019 15:14:17 -0400 Original-Received: from mail-ot1-f43.google.com ([209.85.210.43]:35174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyhfz-0006C7-Hk for 5126@debbugs.gnu.org; Fri, 16 Aug 2019 15:14:16 -0400 Original-Received: by mail-ot1-f43.google.com with SMTP id g17so9767312otl.2 for <5126@debbugs.gnu.org>; Fri, 16 Aug 2019 12:14:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=0SlxRr0rz0uxWHgOAPTnnhOnFZx9KxbKg/brIz1gfa8=; b=JCRR8v3FSbyBZasT45aIMWYACRoDdEV3QgNJHc+f/2cMmn3zvUfl3A0pblc97kaaM9 rOI+eTZ3YPWpRH+Xu/rFIojNP6JwN8GuVtdL9NKLXV3t+lPC8YlK2HHT+fatR2to4WB4 we4A1Hz2MxR+Udb+0UHzP0/Ydndmc42JHHZKm6vFxb0Hn5gPIic8WOg34wsO+BH/POVo LlARO6yBh90gBlGcrcBzunttXsnFhutWHCYZD0yKzqCkOARHqu6ttlrpcuqOARVTG7Mm gkkjZZMAaPVyYPS5/EMB5HiYiWRdsXg0580G4bahRGCR/hgjF33QvUPdBz4RAGzngHEY tShw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=0SlxRr0rz0uxWHgOAPTnnhOnFZx9KxbKg/brIz1gfa8=; b=K98OvEMyYpEJoyrubJ9+ZH3OZ+NcvOWVVpOvvxp4mUU9OnGTpaTcZnUQoyQRYfqwUb eSvtAUyPQ6oWnI8PFnMewUi5po77adD20YlOMgfyPm4gGwN+4uye30NAuZX8Z/jFg5s2 vetZp6yFbodsRLkhiKd6UBvwpCU6wsVVAgxnvPYchN+lE48Wv1G1m8QqoiMXRC91hiZC 3ZGnA+qeQP8ilwGZtxWCRoX1VRcm3/OqEXCpXDUFd16ynTwLt8wryXaaedoOTIS+pGho EADp9K8wITyCFOTpvcL2ZXZMJyI0g0weWEmXeKjX871KoZ9Y9yBMek83lo1UY7PHocVF m4nQ== X-Gm-Message-State: APjAAAXOUXSIhgKbXJgZkhrxf+0W1SSauxbpNLMNWqZ0xItVlui7AYa2 qVgcnDuW6HsI/Hw4gq15MpYiqBiu2/Y= X-Google-Smtp-Source: APXvYqwqSjweHP2jed5yHfUuTywE5tQXrzUUnKvywu41t+VRcRU42PUlrDaMs1iKZYOfqTzu6Kn1tw== X-Received: by 2002:a9d:bb0:: with SMTP id 45mr9235669oth.34.1565982849762; Fri, 16 Aug 2019 12:14:09 -0700 (PDT) Original-Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id n109sm2521016ota.36.2019.08.16.12.14.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2019 12:14:09 -0700 (PDT) In-Reply-To: (Andrew Hyatt's message of "Sat, 09 Jul 2016 09:27:27 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:165224 Archived-At: On Sat 09 Jul 2016 at 09:27, Andrew Hyatt wrote: > This still is the case in Emacs 25. I agree that this seems like a > problem. > > Kevin Ryde writes: > >> 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. Maybe I'm misunderstanding this bug report, but this works for me: ;; foobar (defun my/checkdoc-comments-foobar () "Check if foobar is in a comment." (save-excursion (goto-char (point-min)) (unless (re-search-forward "^;; foobar" nil t) (checkdoc-create-error ";; foobar doesn't exist" (1- (point-max)) (point-max))))) (defun my/checkdoc-comments-foobaz () "Check if foobaz is in a comment." (save-excursion (goto-char (point-min)) (unless (re-search-forward "^;; foobaz" nil t) (checkdoc-create-error ";; foobaz doesn't exist" (1- (point-max)) (point-max))))) (add-hook 'checkdoc-comment-style-functions #'my/checkdoc-comments-foobar) (add-hook 'checkdoc-comment-style-functions #'my/checkdoc-comments-foobaz) Now checkdoc warns that foobaz is missing. You can change foobar to foobaz and it warns that foobar is missing. Can we close this bug report? Alex