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#34290: [PATCH] checkdoc byte compile warnings Date: Sat, 02 Feb 2019 10:28:13 -0600 Message-ID: <87womi9mua.fsf@gmail.com> References: <87zhre9opq.fsf@gmail.com> <83imy2w4xt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="7751"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: 34290@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 02 17:29:16 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.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gpyAN-0001tP-E8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Feb 2019 17:29:15 +0100 Original-Received: from localhost ([127.0.0.1]:44008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpyAM-0007qR-E4 for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Feb 2019 11:29:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpyAB-0007qL-SA for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 11:29:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpyAA-0008Jt-W4 for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 11:29:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57257) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpyAA-0008JW-R6 for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 11:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gpyAA-0007Ca-HS for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 11:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Feb 2019 16:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34290 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 34290-submit@debbugs.gnu.org id=B34290.154912490327634 (code B ref 34290); Sat, 02 Feb 2019 16:29:02 +0000 Original-Received: (at 34290) by debbugs.gnu.org; 2 Feb 2019 16:28:23 +0000 Original-Received: from localhost ([127.0.0.1]:56537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gpy9X-0007Be-FN for submit@debbugs.gnu.org; Sat, 02 Feb 2019 11:28:23 -0500 Original-Received: from mail-oi1-f195.google.com ([209.85.167.195]:45976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gpy9V-0007BS-U2 for 34290@debbugs.gnu.org; Sat, 02 Feb 2019 11:28:22 -0500 Original-Received: by mail-oi1-f195.google.com with SMTP id y1so8314064oie.12 for <34290@debbugs.gnu.org>; Sat, 02 Feb 2019 08:28:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=8Jaub9lnAxLB1DVHoaY42LN/tZgqhEgqOi2h0p5JyOI=; b=SdlbxqyIHC8TGZfvoLMIdqPLpRXfH/JdoS9BBK76uWO85iifTyqzzDmLsQfNRRl/GZ iYL2B3gpqZDf/jnd2pJE9DFi+99fBbYjnxdIMmvYQlnoh8Bunn6FqUNqmq4cpHCXgk4E Ut4GdDD/BNqE9ZoTW7E0+P9b+gE7/Vc+z7LUyx9wj6j2MI76peWEGMZcYqfacwFUOvin Le4zl9RB7YrJ8EO3Mr/459cEIAYnt011YsRN1n3RqPLSWCQLPOq/0lLm5KodXryKzzFN Rirbe+sUce6OceoGtaxT4kN8cgjl846kAl1KwPxvEprzhIJxRNTG7MdaWejjlWRFXadr USpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=8Jaub9lnAxLB1DVHoaY42LN/tZgqhEgqOi2h0p5JyOI=; b=RfXS14pjunBy1EaxlALzCGihm0dbUp19ISIyzfUewHU8lGoE9+zdbYupIbc2c2UAhU 2NFz43wV27q3P2VUIylKqQFju3Wc0DECpN7TwOba3CouxZJUKxFmeLOa5VtZBxEX5zta taqd58Ym/AsnmT5Gw9Q+C5PwVa9N7mZl59cOljN51tgkvfnOAKi8Ay2RuQSp2M5g3cNz unCVDmo87uLjNyx1t77vZOXIxNJauSnW79gEsjq23ltkWz5lP058IDuN8b8zKlxR2/K2 7rHxWQSSOs53++jAmVC3z0omebcvPjNJ+55qmEA+kkj4PyHRrrhDPKTMoXCdGj6wtiNt wL6g== X-Gm-Message-State: AHQUAuaEqdmsgkP0nn8SoXkTUHvp6DNSYcxywjrmrVVriNeHJ3ItVkex kZHOSOpGeepkEmTgqecgkpgsnu2A X-Google-Smtp-Source: ALg8bN6+EjBBOTXxFb5/6h0aTzvb9v1DrzGvnWAFgoyUHhlPobzsK16nVjt4kt/EkoUIXwC2mlNNXA== X-Received: by 2002:aca:e6c1:: with SMTP id d184mr20808407oih.316.1549124895713; Sat, 02 Feb 2019 08:28:15 -0800 (PST) Original-Received: from mars (72-47-130-203.brhmcmtc01.res.dyn.suddenlink.net. [72.47.130.203]) by smtp.gmail.com with ESMTPSA id 62sm4179845otu.42.2019.02.02.08.28.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Feb 2019 08:28:14 -0800 (PST) In-reply-to: <83imy2w4xt.fsf@gnu.org> 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:155024 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain On Sat 02 Feb 2019 at 10:06, Eli Zaretskii wrote: > AFAIU, declare-function is useful when the function in question is > auto-loaded, but we don't want to load its package unconditionally, > e.g. because that function is used only in a small part of the package > being compiled. None of which seems to be the case here, or did I > miss something? I was just following with what the file was already doing. More than happy to require lisp-mnt top-level though, patch attached. Alex --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-byte-compile-warnings-in-checkdoc.el.patch Content-Transfer-Encoding: quoted-printable From=203327f9d74f6e063104726ec7aa4df805aa51decd Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Sat, 2 Feb 2019 09:45:11 -0600 Subject: [PATCH] Fix byte compile warnings in checkdoc.el * lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): Fix byte compile warnings by requiring lisp-mnt top-level, remove XEmacs compatibility code. =2D-- lisp/emacs-lisp/checkdoc.el | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index c0da61a589..dca2f16956 100644 =2D-- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -174,6 +174,7 @@ (require 'cl-lib) (require 'help-mode) ;; for help-xref-info-regexp (require 'thingatpt) ;; for handy thing-at-point-looking-at +(require 'lisp-mnt) =20 (defvar compilation-error-regexp-alist) (defvar compilation-mode-font-lock-keywords) @@ -2205,21 +2206,10 @@ News agents may remove it" ;; (defvar generate-autoload-cookie) =20 =2D(eval-when-compile (require 'lisp-mnt)) ; expand silly defsubsts =2D(declare-function lm-summary "lisp-mnt" (&optional file)) =2D(declare-function lm-section-start "lisp-mnt" (header &optional after)) =2D(declare-function lm-section-end "lisp-mnt" (header)) =2D (defun checkdoc-file-comments-engine () "Return a message list if this file does not match the Emacs standard. This checks for style only, such as the first line, Commentary:, Code:, and others referenced in the style guide." =2D (if (featurep 'lisp-mnt) =2D nil =2D (require 'lisp-mnt) =2D ;; Old XEmacs don't have `lm-commentary-mark' =2D (if (and (not (fboundp 'lm-commentary-mark)) (fboundp 'lm-commentary= )) =2D (defalias 'lm-commentary-mark #'lm-commentary))) (save-excursion (let* ((f1 (file-name-nondirectory (buffer-file-name))) (fn (file-name-sans-extension f1)) @@ -2280,7 +2270,7 @@ Code:, and others referenced in the style guide." (if (or (not checkdoc-force-history-flag) (file-exists-p "ChangeLog") (file-exists-p "../ChangeLog") =2D (and (fboundp 'lm-history-mark) (funcall #'lm-history-ma= rk))) + (lm-history-mark)) nil (progn (goto-char (or (lm-commentary-mark) (point-min))) =2D-=20 2.19.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEeEJ4XAMgliXNXicpHkInolPpmscFAlxVxR0ACgkQHkInolPp msf1eQf/VLHBbSHIGAtSaWQN1timGr4no8BISazhZ22VZSIDsHwMTdTSW3Vyafy9 fenurJ6kgeQ0Io22v09Q89Yvl1hvU0pQDojvIHbhrEYjvzlAHcg1oMyV6ufm3hkg 6fuv8aeKkf3xOyLmgPxhzucRFdSpe8yV7R2c2g8cpNmg2NJV/QyCsB3dY7wBdXSK nSUs5nFKGYaC2dDW8j9XU4S2M7DLjld7eDcH5kf2jpFcXhLIx1ZYxn2V0Vl922BW DO506HXfAgSykb7Xm4bsoLW6WbOBygJec3jlPG4HeCkbwZd/aUcjQfrDqLQNUbgn UidhEJ4OIuq+y3cJhMO1UJ/TkGqITQ== =AVvL -----END PGP SIGNATURE----- --==-=-=--