Stefan Kangas <stefankangas@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Stefan Kangas <stefankangas@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 66264) by debbugs.gnu.org; 30 Sep 2023 08:18:08 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 30 04:18:08 2023 Received: from localhost ([127.0.0.1]:57649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qmVAt-0004si-Js for submit <at> debbugs.gnu.org; Sat, 30 Sep 2023 04:18:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <rms@HIDDEN>) id 1qmVAp-0004s5-Jn for 66264 <at> debbugs.gnu.org; Sat, 30 Sep 2023 04:18:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <rms@HIDDEN>) id 1qmVAU-0006Kf-T7; Sat, 30 Sep 2023 04:17:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=ac9WgWr3sbBrxf1eQG6eG+55Yb8noO3L7NsffUtpQxw=; b=VWCdmRMRTHVr UyUzORwMq/fcFLzFKHDuB1rer5RgwamWB8aLXv1FoeoZ4BPW9bY5zFq/3Wi5CDwI7RFKYKLJIos/Q Kr/veGRDm/NoO9kW3p/gFp2qsGOhG0yvx/E9pNz9HNS/4djVQHbf0S88+nZiwgxrHB5TwSP8ExU7t 1JsfKUCEtLcDEp/Lt6wYBo37Ni2Jk386uejYCMow9t8gYqHNVrhNSI5cxrMAlJ1blzyk/jwco0M4z f/JCDOZ4pT4d0YTSCn7VHk4P3FewtkmoW08YgPjsIUWc/aTt2VwxPxJl6VEipu0GNHe/inpURCpWL MV6p29bD6CXe7GYQIKqa2g==; Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from <rms@HIDDEN>) id 1qmVAU-0008S1-Lj; Sat, 30 Sep 2023 04:17:42 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman <rms@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <83y1gpx9vs.fsf@HIDDEN> (message from Eli Zaretskii on Fri, 29 Sep 2023 18:43:51 +0300) Subject: Re: bug#66264: Disable warning about wide doc strings by default References: <BBDC0288-4B79-4B4D-A0F2-25181B3E28DF@HIDDEN> <83y1gpx9vs.fsf@HIDDEN> Message-Id: <E1qmVAU-0008S1-Lj@HIDDEN> Date: Sat, 30 Sep 2023 04:17:42 -0400 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66264 Cc: mattias.engdegard@HIDDEN, 66264 <at> debbugs.gnu.org, stefankangas@HIDDEN, raman@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Reply-To: rms@HIDDEN Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > This is a proposal to disable the warning about doc string line length by default. > Thanks, but I'm against this change. It has been, and continues to > be, tremendously useful in making sure our doc strings are in a good > shape. I agree. The point of a warning is to remind programmers to write things the way that will give good results, and the width of a doc string is part of what determines whether it gives good results when users look at it. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)
bug-gnu-emacs@HIDDEN
:bug#66264
; Package emacs
.
Full text available.Received: (at 66264) by debbugs.gnu.org; 29 Sep 2023 15:44:33 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 29 11:44:33 2023 Received: from localhost ([127.0.0.1]:56979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qmFfN-000527-6z for submit <at> debbugs.gnu.org; Fri, 29 Sep 2023 11:44:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1qmFfL-00051t-Kk for 66264 <at> debbugs.gnu.org; Fri, 29 Sep 2023 11:44:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1qmFf1-0007Fy-EH; Fri, 29 Sep 2023 11:44:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=pcPMgWE07druOz2yJDLA4bu7ydnMqSObDzREVjj/il4=; b=Ex9IsyBncsPhURnG1LCD SJYBvXBrWAfOQ80HKOAbh8JzFmKs1Tog/SFIN3KEUVAOK3dMrBcxb+SfMCukQBCmYxqZVUEPEcis6 0L5qzpSwEdqSQCPXT8Z+6OA0RWHvcjE1NQsrerSGmNaxrt3y2zmy2ARVpnPqqFCdPu+/SSGl2R9f0 K6lyOCMIO8jSLLt/car4ALBJYKT5wW9osDOwNMpGz4zdmXS/UkU2WW3ItSqiexpf28k8hEWJWHJZB m4a4y9t+pW83o44flfGZJiTR4bVkXL31dNbCqjsTjvB3tIdK9I3WUpYqD2qQ3yT0N6ICc4vHNvc+t XZ3EnB2Do+MW0g==; Date: Fri, 29 Sep 2023 18:43:51 +0300 Message-Id: <83y1gpx9vs.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN> In-Reply-To: <BBDC0288-4B79-4B4D-A0F2-25181B3E28DF@HIDDEN> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Fri, 29 Sep 2023 14:59:09 +0200) Subject: Re: bug#66264: Disable warning about wide doc strings by default References: <BBDC0288-4B79-4B4D-A0F2-25181B3E28DF@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66264 Cc: raman@HIDDEN, stefankangas@HIDDEN, 66264 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Cc: Stefan Kangas <stefankangas@HIDDEN>, "T.V Raman" <raman@HIDDEN> > From: Mattias Engdegård <mattias.engdegard@HIDDEN> > Date: Fri, 29 Sep 2023 14:59:09 +0200 > > This is a proposal to disable the warning about doc string line length by default. Thanks, but I'm against this change. It has been, and continues to be, tremendously useful in making sure our doc strings are in a good shape. I don't see how leaving this on only in "Emacs builds" is TRT, since this means ELPA packages will be exempt from the same scrutiny, and it also means that byte-compiling a file manually (i.e. not via lisp/Makefile) will not produce this warning. I think the small annoyance of some people about overly-long doc strings produced by macros is not a sufficient reason to turn this off by default, and that those who are annoyed can turn it off in their configurations.
bug-gnu-emacs@HIDDEN
:bug#66264
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 29 Sep 2023 12:59:52 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 29 08:59:52 2023 Received: from localhost ([127.0.0.1]:55501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qmD5u-0005Z1-4g for submit <at> debbugs.gnu.org; Fri, 29 Sep 2023 08:59:52 -0400 Received: from lists.gnu.org ([2001:470:142::17]:55710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mattias.engdegard@HIDDEN>) id 1qmD5o-0005Yi-Eb for submit <at> debbugs.gnu.org; Fri, 29 Sep 2023 08:59:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <mattias.engdegard@HIDDEN>) id 1qmD5U-0003ao-12 for bug-gnu-emacs@HIDDEN; Fri, 29 Sep 2023 08:59:20 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <mattias.engdegard@HIDDEN>) id 1qmD5P-0001RA-6N for bug-gnu-emacs@HIDDEN; Fri, 29 Sep 2023 08:59:19 -0400 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2bfed7c4e6dso228581301fa.1 for <bug-gnu-emacs@HIDDEN>; Fri, 29 Sep 2023 05:59:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695992352; x=1696597152; darn=gnu.org; h=to:cc:date:message-id:subject:mime-version:from:sender:from:to:cc :subject:date:message-id:reply-to; bh=eCMYUygds/I5aR/l0JOrbPKdDav3T5f0h06mFeEz6Lc=; b=KPBF3mURBA14Yz1fkjZWSlnCGKjON1TLAX0N00XQ3MD7UDhM4RlYbZpJMID6o4yQkd 5KsKAuSSRf5S9+Fjw1mm+g2bHGygD92pYmQKWVZU7EHJPsECLLkRRPeCxcts9onGwP4H noHhoiiVZhFXfea+AAW1q0ozp+Q5lkyajApefF+tv0HAe5z0+qOlZ6Q8mQ+L3Gcrh2bT 7R6/KoeMH0jcat91uCI0ZKa06smvvbvZ3+QKgSg2ZbfIR6B3BRmkUOgs8zYH/FKMgbeb G6hCpCckPBlARxR8qt0s+Lq8PH5lXzZJ1TMu9d/bHMD9dr+ZWNfq7JK8aEsNFFjYzoi9 Kfsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695992352; x=1696597152; h=to:cc:date:message-id:subject:mime-version:from:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eCMYUygds/I5aR/l0JOrbPKdDav3T5f0h06mFeEz6Lc=; b=WIbqX0LA5j73zdgHCzuddBUyHwB507CNiA/BpdkQjqLSgYeaXFkLGyK6t5XAGk6UDf OtOHvK+HXS1lIwfFwb7fz1TKK2FdNDFafcP9FIKekjB0hPfhOQA3d7TT2Uv7W1fNjMXK ldKIL7St2WzzrcyVlmOZkBhuOT+WwkrH6hS7nt8UZXMo/eYIlUI5M72GAAVWNgZcHVeB 9wsc1l33mtswAe74ne+83uDoPYc4Hd9SDrPyToFUGGbH3vsmt3TTlAzut1F0Gi/j9BHf I6UonvAtT2eVNeKU37W53JaH7TjDpIyPd4I7yXKXFKeeZ86DhvRyOrmCU0m9DVla1r1r xyDg== X-Gm-Message-State: AOJu0YwI+mNXsjgRSxRhxsV8L4DdcJCs3vXugKDcGcxGXxw7B+KY6iDR CsXcdBD6nNgUuuy6h+EhuBzj16Mj9VGbMA== X-Google-Smtp-Source: AGHT+IHXM09TjhYt47f+gWkjOMmL/jgzK4acub6sFrqEM9ZvdlKWcHm8UNhUQPmfaYAoyzZaZNTuOA== X-Received: by 2002:a05:6512:34c4:b0:503:258f:fd15 with SMTP id w4-20020a05651234c400b00503258ffd15mr3513879lfr.20.1695992351625; Fri, 29 Sep 2023 05:59:11 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id w17-20020ac254b1000000b004fe8593b67fsm3496761lfk.107.2023.09.29.05.59.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Sep 2023 05:59:10 -0700 (PDT) From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN> Content-Type: multipart/mixed; boundary="Apple-Mail=_97403ADE-D3D7-4C8A-BAF7-13A0BC5D7792" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Disable warning about wide doc strings by default Message-Id: <BBDC0288-4B79-4B4D-A0F2-25181B3E28DF@HIDDEN> Date: Fri, 29 Sep 2023 14:59:09 +0200 To: Emacs Bug Report <bug-gnu-emacs@HIDDEN> X-Mailer: Apple Mail (2.3654.120.0.1.15) Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=mattias.engdegard@HIDDEN; helo=mail-lj1-x22c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: Stefan Kangas <stefankangas@HIDDEN>, "T.V Raman" <raman@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --Apple-Mail=_97403ADE-D3D7-4C8A-BAF7-13A0BC5D7792 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii This is a proposal to disable the warning about doc string line length = by default. While it is a useful warning, it does not actually indicate that = anything may be wrong in the code, nor that the doc string would risk = being misinterpreted by the user. It is rather a stylistic complaint, = such as the ones produced by checkdoc. There have been complaints about the warning being difficult to avoid in = code where the doc string is generated by macros, sometimes outside the = control of the programmer. See = https://lists.gnu.org/archive/html/emacs-devel/2023-09/msg01326.html for = one such recent discussion. For this reason I'm proposing that it be disabled by default but remain = enabled in builds of Emacs itself, like the warning about curved single = quotes. Patch attached. --Apple-Mail=_97403ADE-D3D7-4C8A-BAF7-13A0BC5D7792 Content-Disposition: attachment; filename=docstrings-wide.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="docstrings-wide.diff" Content-Transfer-Encoding: 7bit diff --git a/etc/NEWS b/etc/NEWS index 97ebc9a5de4..7e29a987c76 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1220,6 +1220,10 @@ name 'ignored-return-value'. The warning will only be issued for calls to functions declared 'important-return-value' or 'side-effect-free' (but not 'error-free'). +--- +*** The warning about too-wide doc strings is now disabled by default. +It can be enabled by setting 'byte-compile-warning-types' to 'all'. + +++ ** New function declaration and property 'important-return-value'. The declaration '(important-return-value t)' sets the diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 387d7ef4de1..2fcadc19a5a 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -295,7 +295,7 @@ byte-compile-warning-types '(redefine callargs free-vars unresolved obsolete noruntime interactive-only make-local mapcar constants suspicious lexical lexical-dynamic - docstrings docstrings-non-ascii-quotes not-unused + docstrings docstrings-wide docstrings-non-ascii-quotes not-unused empty-body) "The list of warning types used when `byte-compile-warnings' is t.") (defcustom byte-compile-warnings t @@ -322,12 +322,15 @@ byte-compile-warnings is likely to be a mistake not-unused warning about using variables with symbol names starting with _. constants let-binding of, or assignment to, constants/nonvariables. - docstrings docstrings that are too wide (longer than - `byte-compile-docstring-max-column' or - `fill-column' characters, whichever is bigger) or - have other stylistic issues. - docstrings-non-ascii-quotes docstrings that have non-ASCII quotes. - This depends on the `docstrings' warning type. + docstrings various docstring stylistic issues, such as incorrect use + of single quotes + docstrings-wide + docstrings that are too wide, containing lines longer than both + `byte-compile-docstring-max-column' and `fill-column' characters. + Only enabled when `docstrings' also is. + docstrings-non-ascii-quotes + docstrings that have non-ASCII quotes. + Only enabled when `docstrings' also is. suspicious constructs that usually don't do what the coder wanted. empty-body body argument to a special form or macro is empty. mutate-constant @@ -345,7 +348,7 @@ byte-compile-warnings byte-compile-warning-types)))) (defconst byte-compile--emacs-build-warning-types - '(docstrings-non-ascii-quotes) + '(docstrings-non-ascii-quotes docstrings-wide) "List of warning types that are only enabled during Emacs builds. This is typically either warning types that are being phased in (but shouldn't be enabled for packages yet), or that are only relevant @@ -1753,7 +1756,8 @@ byte-compile-docstring-style-warn (setq name (cadr name))) (setq name (if name (format " `%s' " name) "")) (when (and kind docs (stringp docs)) - (when (byte-compile--wide-docstring-p docs col) + (when (and (byte-compile-warning-enabled-p 'docstrings-wide) + (byte-compile--wide-docstring-p docs col)) (byte-compile-warn-x name "%s%sdocstring wider than %s characters" diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index e644417c3d4..45cf8b577ba 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -925,20 +925,21 @@ bytecomp-tests--warnings ;; Should not warn that mt--test2 is not known to be defined. (should-not (re-search-forward "my--test2" nil t)))) -(defun bytecomp--with-warning-test (re-warning form) +(defun bytecomp--with-warning-test (re-warning form &optional warnings) (declare (indent 1)) (with-current-buffer (get-buffer-create "*Compile-Log*") (let ((inhibit-read-only t)) (erase-buffer)) (ert-info ((prin1-to-string form) :prefix "form: ") - (let ((text-quoting-style 'grave)) + (let ((text-quoting-style 'grave) + (byte-compile-warnings (or warnings t))) (bytecomp-tests--with-fresh-warnings (byte-compile form))) (ert-info ((prin1-to-string (buffer-string)) :prefix "buffer: ") (should (re-search-forward (string-replace " " "[ \n]+" re-warning))))))) -(defun bytecomp--without-warning-test (form) - (bytecomp--with-warning-test "\\`\\'" form)) +(defun bytecomp--without-warning-test (form &optional warnings) + (bytecomp--with-warning-test "\\`\\'" form warnings)) (ert-deftest bytecomp-warn--ignore () (bytecomp--with-warning-test "unused" @@ -966,39 +967,49 @@ bytecomp-tests--docstring (ert-deftest bytecomp-warn-wide-docstring/defconst () (bytecomp--with-warning-test "defconst.*foo.*wider than.*characters" - `(defconst foo t ,bytecomp-tests--docstring))) + `(defconst foo t ,bytecomp-tests--docstring) + 'all)) (ert-deftest bytecomp-warn-wide-docstring/defvar () (bytecomp--with-warning-test "defvar.*foo.*wider than.*characters" - `(defvar foo t ,bytecomp-tests--docstring))) + `(defvar foo t ,bytecomp-tests--docstring) + 'all)) (ert-deftest bytecomp-warn-wide-docstring/cl-defsubst () (bytecomp--without-warning-test `(cl-defsubst short-name () - "Do something.")) + "Do something." + 'all)) (bytecomp--without-warning-test `(cl-defsubst long-name-with-less-80-characters-but-still-quite-a-bit () - "Do something.")) + "Do something.") + 'all) (bytecomp--with-warning-test "wider than.*characters" `(cl-defsubst long-name-with-more-than-80-characters-yes-this-is-a-very-long-name-but-why-not!! () - "Do something."))) + "Do something.") + 'all)) (ert-deftest bytecomp-warn-wide-docstring/cl-defstruct () (bytecomp--without-warning-test `(cl-defstruct short-name - field)) + field) + 'all) (bytecomp--without-warning-test `(cl-defstruct short-name - long-name-with-less-80-characters-but-still-quite-a-bit)) + long-name-with-less-80-characters-but-still-quite-a-bit) + 'all) (bytecomp--without-warning-test `(cl-defstruct long-name-with-less-80-characters-but-still-quite-a-bit - field)) + field) + 'all) (bytecomp--with-warning-test "wider than.*characters" `(cl-defstruct short-name - long-name-with-more-than-80-characters-yes-this-is-a-very-long-name-but-why-not!!)) + long-name-with-more-than-80-characters-yes-this-is-a-very-long-name-but-why-not!!) + 'all) (bytecomp--with-warning-test "wider than.*characters" `(cl-defstruct long-name-with-more-than-80-characters-yes-this-is-a-very-long-name-but-why-not!! - field))) + field) + 'all)) (ert-deftest bytecomp-warn-quoted-condition () (bytecomp--with-warning-test @@ -1060,11 +1071,13 @@ bytecomp-warn-dodgy-args-memq (bytecomp--with-warning-test (msg2 "integer") (form2 #x10000000000)) (bytecomp--with-warning-test (msg2 "float") (form2 1.0)))))) -(defmacro bytecomp--define-warning-file-test (file re-warning &optional reverse) +(defmacro bytecomp--define-warning-file-test (file re-warning + &optional reverse warnings) `(ert-deftest ,(intern (format "bytecomp/%s" file)) () (with-current-buffer (get-buffer-create "*Compile-Log*") (let ((inhibit-read-only t)) (erase-buffer)) - (byte-compile-file ,(ert-resource-file file)) + (let ((byte-compile-warnings ,(or warnings t))) + (byte-compile-file ,(ert-resource-file file))) (ert-info ((buffer-string) :prefix "buffer: ") (,(if reverse 'should-not 'should) (re-search-forward ,re-warning nil t)))))) @@ -1170,71 +1183,71 @@ "warn-variable-setq-odd.el" (bytecomp--define-warning-file-test "warn-wide-docstring-autoload.el" - "autoload .foox. docstring wider than .* characters") + "autoload .foox. docstring wider than .* characters" nil 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-custom-declare-variable.el" - "custom-declare-variable .foo. docstring wider than .* characters") + "custom-declare-variable .foo. docstring wider than .* characters" nil 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-defalias.el" - "defalias .foo. docstring wider than .* characters") + "defalias .foo. docstring wider than .* characters" nil 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-defconst.el" - "defconst .foo-bar. docstring wider than .* characters") + "defconst .foo-bar. docstring wider than .* characters" nil 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-define-abbrev-table.el" - "define-abbrev-table .foo. docstring wider than .* characters") + "define-abbrev-table .foo. docstring wider than .* characters" nil 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-define-obsolete-function-alias.el" - "defalias .foo. docstring wider than .* characters") + "defalias .foo. docstring wider than .* characters" nil 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-define-obsolete-variable-alias.el" - "defvaralias .foo. docstring wider than .* characters") + "defvaralias .foo. docstring wider than .* characters" nil 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-defun.el" - "Warning: docstring wider than .* characters") + "Warning: docstring wider than .* characters" nil 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-defvar.el" - "defvar .foo-bar. docstring wider than .* characters") + "defvar .foo-bar. docstring wider than .* characters" nil 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-defvaralias.el" - "defvaralias .foo-bar. docstring wider than .* characters") + "defvaralias .foo-bar. docstring wider than .* characters" nil 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-ignore-fill-column.el" - "defvar .foo-bar. docstring wider than .* characters" 'reverse) + "defvar .foo-bar. docstring wider than .* characters" 'reverse 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-ignore-function-signature.el" - "defvar .foo-bar. docstring wider than .* characters" 'reverse) + "defvar .foo-bar. docstring wider than .* characters" 'reverse 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-ignore-override.el" - "defvar .foo-bar. docstring wider than .* characters" 'reverse) + "defvar .foo-bar. docstring wider than .* characters" 'reverse 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-ignore-substitutions.el" - "defvar .foo-bar. docstring wider than .* characters" 'reverse) + "defvar .foo-bar. docstring wider than .* characters" 'reverse 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-ignore.el" - "defvar .foo-bar. docstring wider than .* characters" 'reverse) + "defvar .foo-bar. docstring wider than .* characters" 'reverse 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-multiline-first.el" - "defvar .foo-bar. docstring wider than .* characters") + "defvar .foo-bar. docstring wider than .* characters" nil 'all) (bytecomp--define-warning-file-test "warn-wide-docstring-multiline.el" - "defvar .foo-bar. docstring wider than .* characters") + "defvar .foo-bar. docstring wider than .* characters" nil 'all) (bytecomp--define-warning-file-test "nowarn-inline-after-defvar.el" --Apple-Mail=_97403ADE-D3D7-4C8A-BAF7-13A0BC5D7792--
Mattias Engdegård <mattias.engdegard@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#66264
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.