all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: 58319@debbugs.gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	Jean Louis <bugs@rcdrun.com>
Subject: bug#58319: 29.0.50; Not logical compilation warnings
Date: Thu, 6 Oct 2022 12:54:29 +0200	[thread overview]
Message-ID: <26A6DA68-340D-41CB-8CC8-992C86320399@gmail.com> (raw)
In-Reply-To: <86o7uq5ds3.fsf@protected.rcdrun.com>

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

The warnings not being "logical" is of course nonsense, but I actually agree that '5+' is a tad on the obscure side. This is a human-facing message and we can be nicer: either '5 or more' or 'at least 5' would be clearer.

'5-10' is not quite as problematic. 'from 5 to 10' would probably do, and 'between 5 and 10' is better but also worse since it could be misinterpreted as the set {6..9} unless we append ' inclusive'. No strong opinion here.

As a special case, '5-6' is always better written as '5 or 6'.

I've looked through the various contexts where the messages appear and the patch below (which keeps 'X-Y') should be an improvement in all cases. Anyone strongly against?


[-- Attachment #2: arity-warning-message.diff --]
[-- Type: application/octet-stream, Size: 693 bytes --]

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 03c45e44a5..74ba8984f2 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1469,9 +1469,11 @@ byte-compile-arglist-signatures-congruent-p
 
 (defun byte-compile-arglist-signature-string (signature)
   (cond ((null (cdr signature))
-	 (format "%d+" (car signature)))
+	 (format "%d or more" (car signature)))
 	((= (car signature) (cdr signature))
 	 (format "%d" (car signature)))
+	((= (1+ (car signature)) (cdr signature))
+	 (format "%d or %d" (car signature) (cdr signature)))
 	(t (format "%d-%d" (car signature) (cdr signature)))))
 
 (defun byte-compile-function-warn (f nargs def)

  parent reply	other threads:[~2022-10-06 10:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05 18:25 bug#58319: 29.0.50; Not logical compilation warnings Jean Louis
2022-10-06  5:33 ` Eli Zaretskii
2022-10-06 10:06   ` Jean Louis
2022-10-06 10:54 ` Mattias Engdegård [this message]
2022-10-06 12:22   ` Lars Ingebrigtsen
2022-10-07 11:00     ` Jean Louis
2022-10-07 12:07     ` Mattias Engdegård
2022-10-07 10:58   ` Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26A6DA68-340D-41CB-8CC8-992C86320399@gmail.com \
    --to=mattias.engdegard@gmail.com \
    --cc=58319@debbugs.gnu.org \
    --cc=bugs@rcdrun.com \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.