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 09:47:45 -0600 Message-ID: <87zhre9opq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="101071"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.1.0; emacs 27.0.50 To: 34290@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 02 16:49:21 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 1gpxXk-000QCX-Ta for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Feb 2019 16:49:21 +0100 Original-Received: from localhost ([127.0.0.1]:43672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpxXj-0002F8-LI for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Feb 2019 10:49:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpxXT-0002Em-M5 for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 10:49:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpxXS-0002vI-Ur for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 10:49:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57240) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpxXS-0002v9-QA for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 10:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gpxXS-0006D3-FQ for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 10:49: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 15:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34290 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.154912248323789 (code B ref -1); Sat, 02 Feb 2019 15:49:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Feb 2019 15:48:03 +0000 Original-Received: from localhost ([127.0.0.1]:56521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gpxWV-0006Bc-DK for submit@debbugs.gnu.org; Sat, 02 Feb 2019 10:48:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gpxWU-0006B9-CD for submit@debbugs.gnu.org; Sat, 02 Feb 2019 10:48:02 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:55341) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpxWN-0002Ti-01 for submit@debbugs.gnu.org; Sat, 02 Feb 2019 10:47:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpxWM-00021d-4z for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 10:47:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpxWL-0002TG-D2 for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 10:47:54 -0500 Original-Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]:34283) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpxWJ-0002Sg-Fg for bug-gnu-emacs@gnu.org; Sat, 02 Feb 2019 10:47:53 -0500 Original-Received: by mail-ot1-x32a.google.com with SMTP id t5so8722510otk.1 for ; Sat, 02 Feb 2019 07:47:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=+7iWqKk5YqrpWkP7Qgdw54Q/Cq3kYCCbepNQpESe2B4=; b=FZJMGtgDaxgY0Y9+e8qFo2Z/2U/uS/W9nT4lo5PiKeHcNG8EPOTUJDSfnwIgCZJ4LG 1Er3sBhZLsXfcU0yGZMS6tHPKHUFYaqlcauIntzgDoSulZD/i3oRABvoXPdhBHmop92V wQ5x0A7OMSB9M1+B7+kheqxyrRDU/6mjLl1+B1D9G4LEdHgGEmKfKELC/bx0yYD/Ho1z k/Fk8arJN8fRQPnFYzE7Pq3a8hVJLp9fyF26ckVFXuL7O7cbxcNXkIO8U7579Vnx/gTB 2Rj2NdkGqbh14eugqGa0ZeT5ASiIwzvDhSF7oo2X757eKjw/unEJpDYXG+7PA92cNOiB T4rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=+7iWqKk5YqrpWkP7Qgdw54Q/Cq3kYCCbepNQpESe2B4=; b=TmBRUhJ0HWKCHWlcBKYNw/KyXjuU+yczQPv6cKrLo0n0ebyX5oGJK2asaDW7dfIT2M ksMIsxXtSiGQsJ/mWW7SpzcA07/kCUgqze+JMONEc25Y2pegFGtVwgCitb/Zk9iLQWRH lHmqgVwUWthQ/HVv3+Ezy0nqUqsTWAjlTMByySBfI+GtJ8zfIMS28IcBTAgLI+Idqhao hgDuqVK6+u+VdwuHHPUPpvBel/1he4GMIi0kjaIdoD2IWiTDrv2mB+oGqg6FiiKmOfR3 QdAZ8i2BfkpttB33g7UcXi9tuunvHN9Wlf7k9gGly6A8AMp5F6TyF0HwUdjJ+vBMJoB6 Wueg== X-Gm-Message-State: AJcUukcc7eH7jcJ9kv4gUs1E9zc0C4sr2+NfsW85SRP3mXTsIipWzcC3 2tfqMkLV3A0Rb0K2Mvof/tMLe9xb X-Google-Smtp-Source: ALg8bN6L6IGQcVb4d1J2jOALnJRPt22PPd6dJ2sxK+5RbyuMm4hestl9/1cEatu8XLqzCL2jljD8kQ== X-Received: by 2002:a9d:2aa2:: with SMTP id e31mr29957545otb.246.1549122468899; Sat, 02 Feb 2019 07:47:48 -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 z9sm4945972oiz.21.2019.02.02.07.47.47 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Feb 2019 07:47:47 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:155021 Archived-At: --=-=-= Content-Type: text/plain Hi all - The attached patch fixes the byte compiler warnings that checkdoc issues currently by declaring the functions for the byte compiler. It also removes some old XEmacs compatibility code. Thanks, Alex --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-byte-compile-warnings-in-checkdoc.el.patch >From 78ec520b6214d768d340d0ab07159605e1f1b3e1 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 declaring functions, remove XEmacs compatibility code. --- lisp/emacs-lisp/checkdoc.el | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index c0da61a589..1289e1cbc9 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -2205,21 +2205,17 @@ News agents may remove it" ;; (defvar generate-autoload-cookie) -(eval-when-compile (require 'lisp-mnt)) ; expand silly defsubsts -(declare-function lm-summary "lisp-mnt" (&optional file)) -(declare-function lm-section-start "lisp-mnt" (header &optional after)) -(declare-function lm-section-end "lisp-mnt" (header)) +(declare-function lm-summary "lisp-mnt" (&optional file)) +(declare-function lm-commentary-mark "lisp-mnt") +(declare-function lm-history-mark "lisp-mnt") +(declare-function lm-code-mark "lisp-mnt") +(declare-function lm-commentary-end "lisp-mnt") (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." - (if (featurep 'lisp-mnt) - nil - (require 'lisp-mnt) - ;; Old XEmacs don't have `lm-commentary-mark' - (if (and (not (fboundp 'lm-commentary-mark)) (fboundp 'lm-commentary)) - (defalias 'lm-commentary-mark #'lm-commentary))) + (require 'lisp-mnt) (save-excursion (let* ((f1 (file-name-nondirectory (buffer-file-name))) (fn (file-name-sans-extension f1)) @@ -2280,7 +2276,7 @@ Code:, and others referenced in the style guide." (if (or (not checkdoc-force-history-flag) (file-exists-p "ChangeLog") (file-exists-p "../ChangeLog") - (and (fboundp 'lm-history-mark) (funcall #'lm-history-mark))) + (lm-history-mark)) nil (progn (goto-char (or (lm-commentary-mark) (point-min))) -- 2.19.2 --=-=-=--