From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#50482: Unhelpful error message whilst byte-compiling a function. Date: Wed, 8 Sep 2021 20:37:45 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25882"; mail-complaints-to="usenet@ciao.gmane.io" To: 50482@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 08 22:39:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mO4Lh-0006aA-Bi for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Sep 2021 22:39:13 +0200 Original-Received: from localhost ([::1]:53550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mO4Lg-0004hB-DF for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Sep 2021 16:39:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO4LW-0004fL-3d for bug-gnu-emacs@gnu.org; Wed, 08 Sep 2021 16:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50346) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mO4LV-0004RI-Sc for bug-gnu-emacs@gnu.org; Wed, 08 Sep 2021 16:39:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mO4LV-00013u-Pu for bug-gnu-emacs@gnu.org; Wed, 08 Sep 2021 16:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Sep 2021 20:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50482 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16311334864002 (code B ref -1); Wed, 08 Sep 2021 20:39:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Sep 2021 20:38:06 +0000 Original-Received: from localhost ([127.0.0.1]:33658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mO4Kb-00012U-T7 for submit@debbugs.gnu.org; Wed, 08 Sep 2021 16:38:06 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mO4Ka-00012N-58 for submit@debbugs.gnu.org; Wed, 08 Sep 2021 16:38:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO4KZ-0003wG-Ts for bug-gnu-emacs@gnu.org; Wed, 08 Sep 2021 16:38:03 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:61619 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1mO4KX-0003cx-0B for bug-gnu-emacs@gnu.org; Wed, 08 Sep 2021 16:38:03 -0400 Original-Received: (qmail 6124 invoked by uid 3782); 8 Sep 2021 20:37:45 -0000 Original-Received: from acm.muc.de (p4fe15ce6.dip0.t-ipconnect.de [79.225.92.230]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 08 Sep 2021 22:37:45 +0200 Original-Received: (qmail 5293 invoked by uid 1000); 8 Sep 2021 20:37:45 -0000 Content-Disposition: inline X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:213865 Archived-At: Hello, Emacs I'm working on Emacs 28. Not emacs -Q, but it shouldn't matter. I'm working on a function which begins thus: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun jit-lock--run-functions-new (beg end &optional last-fun) (let ((tight-beg nil) (tight-end nil) ; The region we have fully fontified. (loose-beg beg) (loose-end end)) ; The maximum region we have fontified ; with at least some of ; `jit-lock-functions'. (run-hook-wrapped 'jit-lock-functions ...... ...... ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; On doing M-x compile-defun on this function, I get as sum total of the output in *Compile-Log* this: Buffer jit-lock.el:416:1: Error: Wrong number of arguments: #, 3 .. I don't know what this means. Line 416 is the line where the defun starts. I don't have `macroexp--warn-wrap' anywhere in my source code, it's not clear to what form 3 arguments are being wrongly passed, or where. Emacs compilation messages should not be so obscure. This message should be so formulated that I can see immediately what needs fixing. ######################################################################### Second curiosity. I can evaluate that defun form, and when I do C-h C-f on it, I get: jit-lock--run-functions-new is a Lisp closure in `jit-lock.el'. A "closure" for crying out loud. It's a FUNCTION, created by defun. Calling a function a "closure" seems very pretentious and somewhat patronising. Not all users will know what it means. Was there some discussion on emacs-devel which I somehow missed, where this was agreed to? If not, can we restore this word to "function", please? -- Alan Mackenzie (Nuremberg, Germany).