From unknown Wed Jun 18 23:11:25 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#53618 <53618@debbugs.gnu.org> To: bug#53618 <53618@debbugs.gnu.org> Subject: Status: 29.0.50; macroexp-warn-and-return incompatible change Reply-To: bug#53618 <53618@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:11:25 +0000 retitle 53618 29.0.50; macroexp-warn-and-return incompatible change reassign 53618 emacs submitter 53618 Stefan Monnier severity 53618 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 28 19:37:18 2022 Received: (at submit) by debbugs.gnu.org; 29 Jan 2022 00:37:19 +0000 Received: from localhost ([127.0.0.1]:60749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDbjy-0000FX-65 for submit@debbugs.gnu.org; Fri, 28 Jan 2022 19:37:18 -0500 Received: from lists.gnu.org ([209.51.188.17]:47868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDbjw-0000FP-Fd for submit@debbugs.gnu.org; Fri, 28 Jan 2022 19:37:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDbjw-0007S3-4Z for bug-gnu-emacs@gnu.org; Fri, 28 Jan 2022 19:37:16 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18119) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDbjs-0002D2-AS for bug-gnu-emacs@gnu.org; Fri, 28 Jan 2022 19:37:14 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3C7D7100287 for ; Fri, 28 Jan 2022 19:37:10 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 7E492100136 for ; Fri, 28 Jan 2022 19:37:07 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1643416627; bh=34Ow8CPdOQ2KmFjvpKvJU7zdzdamzuMfOL1367ARL4E=; h=From:To:Subject:Date:From; b=UHOxFIBHfNGDqp4OeKcXSIEfIt9a8pcdMS87zzOlnpKGqIxnWDtpuso3tKiIbyWsM IyiPaBat1W1rB5jl3T0DMdNU6OSPg6pZvnMPBXanjERxg601vtIOHw2B96DGsctWd0 X1lT15dDNWkm6/u1i+YFLeB6gu+kqKfPb7CgjUHcQ2+E2xv06TqH82LSL2BcQC3M6a 7ZpRiaqwqKSOeFzLKPcSGQlJ6Tx8QT9oTJKk41kdNFMDO9Wq01zj/W6XzvP0JUHX3j bXRA/DU3g/F4nYNoYKyFQfM4Hwrs7FwN2bHlgiHHeu11czkAj65rNI8mbiYvIROWO3 HdTXXumjse/EA== Received: from ceviche (76-10-138-212.dsl.teksavvy.com [76.10.138.212]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5CBE41207DA for ; Fri, 28 Jan 2022 19:37:07 -0500 (EST) From: Stefan Monnier To: bug-gnu-emacs@gnu.org Subject: 29.0.50; macroexp-warn-and-return incompatible change X-Debbugs-Cc: Alan Mackenzie Date: Fri, 28 Jan 2022 19:37:01 -0500 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.007 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Package: Emacs Version: 29.0.50 Alan's symbols-with-pos has introduced a backward incompatible change to `macroexp-warn-and-return` by adding a new *first* argument `arg`. The patch below changes that so the new argument comes last (and is optional). Alan argued it's preferable for this arg to come first and the function was new in Emacs-28 so it's OK to break compatibility. The patch below shows that indeed the arg is almost always desirable/needed to get the right position information (the default behavior when the arg is absent is not as good), so it's kind of pain having it as last arg. And I'm not super happy with the long list of args of this function. But these arguments don't seem strong enough to justify breaking compatibility, hence the patch below. Any objection? Stefan --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=warn-and-ret.patch diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index 04c5b9f080..c6d64975ec 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -804,7 +804,6 @@ bindat--type (if (or (eq label '_) (not (assq label labels))) code (macroexp-warn-and-return - code (format "Duplicate label: %S" label) code)))) (`(,_ ,val) diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index fedc10cea4..159832c536 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -334,11 +334,10 @@ 'defmacro (let ((f (cdr (assq (car x) macro-declarations-alist)))) (if f (apply (car f) name arglist (cdr x)) (macroexp-warn-and-return - (car x) (format-message "Unknown macro property %S in %S" (car x) name) - nil)))) + nil nil nil (car x))))) decls))) ;; Refresh font-lock if this is a new macro, or it is an ;; existing macro whose 'no-font-lock-keyword declaration @@ -408,10 +407,9 @@ defun nil) (t (macroexp-warn-and-return - (car x) (format-message "Unknown defun property `%S' in %S" (car x) name) - nil))))) + nil nil nil (car x)))))) decls)) (def (list 'defalias (list 'quote name) diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 5e0e0834ff..b44dda6f9d 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -499,7 +499,7 @@ cl-defmethod lambda-doc ; documentation string def-body))) ; part to be debugged (let ((qualifiers nil) - (org-name name)) + (orig-name name)) (while (cl-generic--method-qualifier-p args) (push args qualifiers) (setq args (pop body))) @@ -514,9 +514,8 @@ cl-defmethod (byte-compile-warning-enabled-p 'obsolete name)) (let* ((obsolete (get name 'byte-obsolete-info))) (macroexp-warn-and-return - org-name (macroexp--obsolete-warning name obsolete "generic function") - nil))) + nil nil nil orig-name))) ;; You could argue that `defmethod' modifies rather than defines the ;; function, so warnings like "not known to be defined" are fair game. ;; But in practice, it's common to use `cl-defmethod' diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 470168177c..5085217250 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2431,10 +2431,9 @@ cl-symbol-macrolet (if malformed-bindings (let ((rev-malformed-bindings (nreverse malformed-bindings))) (macroexp-warn-and-return - rev-malformed-bindings (format-message "Malformed `cl-symbol-macrolet' binding(s): %S" rev-malformed-bindings) - expansion)) + expansion nil nil rev-malformed-bindings)) expansion))) (unless advised (advice-remove 'macroexpand #'cl--sm-macroexpand))))) @@ -3118,20 +3117,18 @@ cl-defstruct (when (cl-oddp (length desc)) (push (macroexp-warn-and-return - (car (last desc)) (format "Missing value for option `%S' of slot `%s' in struct %s!" (car (last desc)) slot name) - 'nil) + nil nil nil (car (last desc))) forms) (when (and (keywordp (car defaults)) (not (keywordp (car desc)))) (let ((kw (car defaults))) (push (macroexp-warn-and-return - kw (format " I'll take `%s' to be an option rather than a default value." kw) - 'nil) + nil nil nil kw) forms) (push kw desc) (setcar defaults nil)))) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 7bcb2f2936..688c76e0c5 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -230,7 +230,6 @@ define-minor-mode (warnwrap (if (or (null body) (keywordp (car body))) #'identity (lambda (exp) (macroexp-warn-and-return - exp "Use keywords rather than deprecated positional arguments to `define-minor-mode'" exp)))) keyw keymap-sym tmp) diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index 33aabf4a48..e063aaec37 100644 --- a/lisp/emacs-lisp/eieio-core.el +++ b/lisp/emacs-lisp/eieio-core.el @@ -748,9 +748,8 @@ eieio-oref ((and (or `',name (and name (pred keywordp))) (guard (not (memq name eieio--known-slot-names)))) (macroexp-warn-and-return - name (format-message "Unknown slot `%S'" name) - exp nil 'compile-only)) + exp nil 'compile-only name)) (_ exp)))) (gv-setter eieio-oset)) (cl-check-type slot symbol) @@ -785,15 +784,13 @@ eieio-oref-default ((and (or `',name (and name (pred keywordp))) (guard (not (memq name eieio--known-slot-names)))) (macroexp-warn-and-return - name (format-message "Unknown slot `%S'" name) - exp nil 'compile-only)) + exp nil 'compile-only name)) ((and (or `',name (and name (pred keywordp))) (guard (not (memq name eieio--known-class-slot-names)))) (macroexp-warn-and-return - name (format-message "Slot `%S' is not class-allocated" name) - exp nil 'compile-only)) + exp nil 'compile-only name)) (_ exp))))) (cl-check-type class (or eieio-object class)) (cl-check-type slot symbol) @@ -849,15 +846,13 @@ eieio-oset-default ((and (or `',name (and name (pred keywordp))) (guard (not (memq name eieio--known-slot-names)))) (macroexp-warn-and-return - name (format-message "Unknown slot `%S'" name) - exp nil 'compile-only)) + exp nil 'compile-only name)) ((and (or `',name (and name (pred keywordp))) (guard (not (memq name eieio--known-class-slot-names)))) (macroexp-warn-and-return - name (format-message "Slot `%S' is not class-allocated" name) - exp nil 'compile-only)) + exp nil 'compile-only name)) (_ exp))))) (setq class (eieio--class-object class)) (cl-check-type class eieio--class) diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 820e8383d8..ee41c45d44 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -246,7 +246,7 @@ defclass `(progn ,@(mapcar (lambda (w) (macroexp-warn-and-return - (car w) (cdr w) `(progn ',(cdr w)) nil 'compile-only)) + (cdr w) `(progn ',(cdr w)) nil 'compile-only (car w))) warnings) ;; This test must be created right away so we can have self- ;; referencing classes. ei, a class whose slot can contain only @@ -296,13 +296,13 @@ defclass (if (not (stringp (car slots))) whole (macroexp-warn-and-return - (car slots) (format "Obsolete name arg %S to constructor %S" (car slots) (car whole)) ;; Keep the name arg, for backward compatibility, ;; but hide it so we don't trigger indefinitely. `(,(car whole) (identity ,(car slots)) - ,@(cdr slots))))))) + ,@(cdr slots)) + nil nil (car slots)))))) (apply #'make-instance ',name slots)))))) diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index 91538d1f06..7cfa1f2dad 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el @@ -581,9 +581,7 @@ gv-ref Note: this only works reliably with lexical binding mode, except for very simple PLACEs such as (symbol-function \\='foo) which will also work in dynamic binding mode." - (let ((org-place place) ; It's too difficult to determine by inspection whether - ; the functions modify place. - (code + (let ((code (gv-letplace (getter setter) place `(cons (lambda () ,getter) (lambda (gv--val) ,(funcall setter 'gv--val)))))) @@ -595,9 +593,8 @@ gv-ref (eq (car-safe code) 'cons)) code (macroexp-warn-and-return - org-place "Use of gv-ref probably requires lexical-binding" - code)))) + code nil nil place)))) (defsubst gv-deref (ref) "Dereference REF, returning the referenced value. diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 256092599b..e91b302af1 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -160,14 +160,14 @@ macroexp--warn-wrap (define-obsolete-function-alias 'macroexp--warn-and-return #'macroexp-warn-and-return "28.1") -(defun macroexp-warn-and-return (arg msg form &optional category compile-only) +(defun macroexp-warn-and-return (msg form &optional category compile-only arg) "Return code equivalent to FORM labeled with warning MSG. -ARG is a symbol (or a form) giving the source code position of FORM -for the message. It should normally be a symbol with position. CATEGORY is the category of the warning, like the categories that can appear in `byte-compile-warnings'. COMPILE-ONLY non-nil means no warning should be emitted if the code -is executed without being compiled first." +is executed without being compiled first. +ARG is a symbol (or a form) giving the source code position for the message. +It should normally be a symbol with position and it defaults to FORM." (cond ((null msg) form) ((macroexp-compiling-p) @@ -177,7 +177,7 @@ macroexp-warn-and-return ;; macroexpand-all gets right back to macroexpanding `form'. form (puthash form form macroexp--warned) - (macroexp--warn-wrap arg msg form category))) + (macroexp--warn-wrap (or arg form) msg form category))) (t (unless compile-only (message "%sWarning: %s" @@ -233,12 +233,11 @@ macroexp-macroexpand (let* ((fun (car form)) (obsolete (get fun 'byte-obsolete-info))) (macroexp-warn-and-return - fun (macroexp--obsolete-warning fun obsolete (if (symbolp (symbol-function fun)) "alias" "macro")) - new-form (list 'obsolete fun))) + new-form (list 'obsolete fun) nil fun)) new-form))) (defun macroexp--unfold-lambda (form &optional name) @@ -289,12 +288,11 @@ macroexp--unfold-lambda (setq arglist (cdr arglist))) (if values (macroexp-warn-and-return - arglist (format (if (eq values 'too-few) "attempt to open-code `%s' with too few arguments" "attempt to open-code `%s' with too many arguments") name) - form) + form nil nil arglist) ;; The following leads to infinite recursion when loading a ;; file containing `(defsubst f () (f))', and then trying to @@ -365,9 +363,8 @@ macroexp--expand-all (if (null body) (macroexp-unprogn (macroexp-warn-and-return - fun (format "Empty %s body" fun) - nil nil 'compile-only)) + nil nil 'compile-only fun)) (macroexp--all-forms body)) (cdr form)) form))) @@ -405,11 +402,10 @@ macroexp--expand-all (eq 'lambda (car-safe (cadr arg)))) (setcar (nthcdr funarg form) (macroexp-warn-and-return - (cadr arg) (format "%S quoted with ' rather than with #'" (let ((f (cadr arg))) (if (symbolp f) f `(lambda ,(nth 1 f) ...)))) - arg))))) + arg nil nil (cadr arg)))))) ;; Macro expand compiler macros. This cannot be delayed to ;; byte-optimize-form because the output of the compiler-macro can ;; use macros. diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index c3dbfe2947..0330a2a0ab 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -433,10 +433,9 @@ pcase-compile-patterns (memq (car case) pcase--dontwarn-upats)) (setq main (macroexp-warn-and-return - (car case) (format "pcase pattern %S shadowed by previous pcase pattern" (car case)) - main)))) + main nil nil (car case))))) main))) (defun pcase--expand (exp cases) @@ -941,9 +940,8 @@ pcase--u1 (let ((code (pcase--u1 matches code vars rest))) (if (eq upat '_) code (macroexp-warn-and-return - upat "Pattern t is deprecated. Use `_' instead" - code)))) + code nil nil upat)))) ((eq upat 'pcase--dontcare) :pcase--dontcare) ((memq (car-safe upat) '(guard pred)) (if (eq (car upat) 'pred) (pcase--mark-used sym)) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 28 21:31:02 2022 Received: (at control) by debbugs.gnu.org; 29 Jan 2022 02:31:02 +0000 Received: from localhost ([127.0.0.1]:60785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDdW2-00036p-BQ for submit@debbugs.gnu.org; Fri, 28 Jan 2022 21:31:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDdW0-00036K-04 for control@debbugs.gnu.org; Fri, 28 Jan 2022 21:31:00 -0500 Received: from [2001:470:142:3::e] (port=60250 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDdVu-0007W7-N8 for control@debbugs.gnu.org; Fri, 28 Jan 2022 21:30:54 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1nDdVu-0002oj-IK for control@debbugs.gnu.org; Fri, 28 Jan 2022 21:30:54 -0500 Subject: control message for bug 53618 To: X-Mailer: mail (GNU Mailutils 3.4) Message-Id: From: Glenn Morris Date: Fri, 28 Jan 2022 21:30:54 -0500 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) merge 53526 53618 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 29 06:28:19 2022 Received: (at 53618) by debbugs.gnu.org; 29 Jan 2022 11:28:19 +0000 Received: from localhost ([127.0.0.1]:32821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDltz-0007MX-AV for submit@debbugs.gnu.org; Sat, 29 Jan 2022 06:28:19 -0500 Received: from colin.muc.de ([193.149.48.1]:57994 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1nDltx-0007MJ-Av for 53618@debbugs.gnu.org; Sat, 29 Jan 2022 06:28:17 -0500 Received: (qmail 76895 invoked by uid 3782); 29 Jan 2022 11:28:10 -0000 Received: from acm.muc.de (p4fe158ec.dip0.t-ipconnect.de [79.225.88.236]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 29 Jan 2022 12:28:10 +0100 Received: (qmail 7531 invoked by uid 1000); 29 Jan 2022 11:28:10 -0000 Date: Sat, 29 Jan 2022 11:28:10 +0000 To: Stefan Monnier Subject: Re: bug#53618: 29.0.50; macroexp-warn-and-return incompatible change Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 53618 Cc: 53618@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Stefan. On Fri, Jan 28, 2022 at 19:37:01 -0500, Stefan Monnier wrote: > Package: Emacs > Version: 29.0.50 > Alan's symbols-with-pos has introduced a backward incompatible change to > `macroexp-warn-and-return` by adding a new *first* argument `arg`. Yes. > The patch below changes that so the new argument comes last (and is > optional). Alan argued it's preferable for this arg to come first and > the function was new in Emacs-28 so it's OK to break compatibility. Something along those lines, yes. The new argument is not in any sense optional. It is absolutely required in order to generate a correct warning position. > The patch below shows that indeed the arg is almost always > desirable/needed to get the right position information (the default > behavior when the arg is absent is not as good), so it's kind of pain > having it as last arg. And I'm not super happy with the long list of > args of this function. It is a kind of wierd function. A long list of arguments is half to be expected. > But these arguments don't seem strong enough to justify > breaking compatibility, hence the patch below. There can be no compatibility here. The new function needs that extra argument. How about, instead, declaring the old function to be obsolete, to be replaced by a new one. The new name could be something like macroexp-warn-and-return-x. The position of the new argument in the argument list is not terribly important, though given its importance, being in first position might not be such a bad thing. > Any objection? Yes. See above. > Stefan [ .... ] -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 29 09:46:57 2022 Received: (at 53618) by debbugs.gnu.org; 29 Jan 2022 14:46:57 +0000 Received: from localhost ([127.0.0.1]:32976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDp0D-0006TX-Kp for submit@debbugs.gnu.org; Sat, 29 Jan 2022 09:46:57 -0500 Received: from quimby.gnus.org ([95.216.78.240]:53200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDp0C-0006T9-Ah for 53618@debbugs.gnu.org; Sat, 29 Jan 2022 09:46:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=n5Bil4QwPpISrdxWE2K0ag/UzOsmmd2OsCnQpjp1Mho=; b=dd3rMHy0ADxxloG2RbWW9X3mLH 1l3ioO9Ii/3TBP8Utj0G+dIrqdV5uOZQYb+a6fJ3CZ3S9wXchk71eIZnw+VLHRaxPdZ3af1AlWpBV IYAcSN/QeJ58AUbLpuMLX1xwgkoMrCxu+hBl8KeeE5ru23iNPk8xlJwGMVr7pz3jkdxk=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nDp02-0003dK-PR; Sat, 29 Jan 2022 15:46:49 +0100 From: Lars Ingebrigtsen To: Alan Mackenzie Subject: Re: bug#53618: 29.0.50; macroexp-warn-and-return incompatible change References: X-Now-Playing: Flux's _Uncarved Block_: "The Value of Nothing" Date: Sat, 29 Jan 2022 15:46:44 +0100 In-Reply-To: (Alan Mackenzie's message of "Sat, 29 Jan 2022 11:28:10 +0000") Message-ID: <875yq2d2gb.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alan Mackenzie writes: > Something along those lines, yes. The new argument is not in any sense > optional. It is absolutely required in order to generate a correct > warning position. But generating a correct warning position is new (optional) behaviour -- we didn't have that before. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53618 Cc: 53618@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Alan Mackenzie writes: > Something along those lines, yes. The new argument is not in any sense > optional. It is absolutely required in order to generate a correct > warning position. But generating a correct warning position is new (optional) behaviour -- we didn't have that before. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 29 10:02:51 2022 Received: (at 53618) by debbugs.gnu.org; 29 Jan 2022 15:02:52 +0000 Received: from localhost ([127.0.0.1]:34423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDpFb-0001AF-OM for submit@debbugs.gnu.org; Sat, 29 Jan 2022 10:02:51 -0500 Received: from colin.muc.de ([193.149.48.1]:63757 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1nDpFa-00015q-A8 for 53618@debbugs.gnu.org; Sat, 29 Jan 2022 10:02:50 -0500 Received: (qmail 42630 invoked by uid 3782); 29 Jan 2022 15:02:43 -0000 Received: from acm.muc.de (p4fe158ec.dip0.t-ipconnect.de [79.225.88.236]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 29 Jan 2022 16:02:42 +0100 Received: (qmail 9804 invoked by uid 1000); 29 Jan 2022 15:02:41 -0000 Date: Sat, 29 Jan 2022 15:02:41 +0000 To: Lars Ingebrigtsen Subject: Re: bug#53618: 29.0.50; macroexp-warn-and-return incompatible change Message-ID: References: <875yq2d2gb.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <875yq2d2gb.fsf@gnus.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 53618 Cc: 53618@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Lars. On Sat, Jan 29, 2022 at 15:46:44 +0100, Lars Ingebrigtsen wrote: > Alan Mackenzie writes: > > Something along those lines, yes. The new argument is not in any sense > > optional. It is absolutely required in order to generate a correct > > warning position. > But generating a correct warning position is new (optional) behaviour -- > we didn't have that before. You forgot the smiley! > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 11 16:24:49 2022 Received: (at 53618) by debbugs.gnu.org; 11 Feb 2022 21:24:49 +0000 Received: from localhost ([127.0.0.1]:32876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIdPN-0001B4-01 for submit@debbugs.gnu.org; Fri, 11 Feb 2022 16:24:49 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIdPK-0001Al-Hi for 53618@debbugs.gnu.org; Fri, 11 Feb 2022 16:24:47 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6E7994422BD; Fri, 11 Feb 2022 16:24:40 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 25B084422BB; Fri, 11 Feb 2022 16:24:39 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1644614679; bh=WqtxsJXkxxxz4f6qDYHhBTekCWDlZJo4u9TRnahIu9I=; h=From:To:Subject:References:Date:In-Reply-To:From; b=J1DwF50yiSTDf8kqznkUt3obdn2FfXAjDqCXlB3lKgYT42PNzD8SfQDQ4vHYKfEgz oANhCoMQPaZhYVlzfZ6SUQ3Y8zqbTfV3JfGswcDzt3xnYBHnFV0ndf+JqIg2ec9vg5 HP3Z8pN+7Ae7yIKi+gbeygmA77akJIiD2Zy3akHZz/grsGBFCrtHxRWNqc344FWG8k ZA78t5HKRXQ/ZmL3PfgSdu3kjRL3Dk0aRN2lkicYzO4b000fj3dWEM3UWg9wfTCGr9 JdIQCm8JLEGDJ/xwiCYODrqWy81ckyy3FX0vr3eN7A/8T1+BUMfezcRdhwbDMYrFMK UB93ANSX2gmIA== Received: from ceviche (unknown [45.72.237.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EED24120B37; Fri, 11 Feb 2022 16:24:38 -0500 (EST) From: Stefan Monnier To: 53618@debbugs.gnu.org Subject: Re: bug#53618: 29.0.50; macroexp-warn-and-return incompatible change Message-ID: References: <875yq2d2gb.fsf@gnus.org> Date: Fri, 11 Feb 2022 16:24:37 -0500 In-Reply-To: <875yq2d2gb.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 29 Jan 2022 15:46:44 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.064 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53618 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) I think both Alan and I have stated our diverging opinions. I don't think either of us is going to convince the other: we both have good reasons which we mutually understand, we just disagree on the importance to put on the various parts of the tradeoff. So I'd appreciate a decision from the maintainers: Should we keep the backward-incompatible code we currently have on `master` or should we take my patch with its someone annoyingly placed extra argument (or some yet distinct option)? Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 12 01:50:56 2022 Received: (at 53618) by debbugs.gnu.org; 12 Feb 2022 06:50:56 +0000 Received: from localhost ([127.0.0.1]:33229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nImFC-0007DF-Ba for submit@debbugs.gnu.org; Sat, 12 Feb 2022 01:50:55 -0500 Received: from quimby.gnus.org ([95.216.78.240]:38920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nImFA-0007D1-H7 for 53618@debbugs.gnu.org; Sat, 12 Feb 2022 01:50:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jX8Hj3bKnr5/PNg/7rT4uew02i4s2Qq8F8DSgGcpZk8=; b=U4uHrp0M65n4mIRgp8/lKajmOJ UboB3kmN0bgF5UUn8P3QZod8A2cbIWO+L3pKTNn+vPAwHQaPsF8Cs+ZVIJqzlU5HQsfBB1GQqHT/B RR9hxcI/gjSSsU2kv3hr1OP+OcuOQfmp2AtU7qwC+8ELwucnxMfqMn4iaXVeIUABDiRw=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nImF0-0004Le-Cp; Sat, 12 Feb 2022 07:50:45 +0100 From: Lars Ingebrigtsen To: 53618@debbugs.gnu.org Subject: Re: bug#53618: 29.0.50; macroexp-warn-and-return incompatible change References: <875yq2d2gb.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEX046vr7dilur2G fHlPPDj///+AV5IAAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+YCDAYvBsMtXw0AAAGaSURBVDjLlZRh cuMwCIXtpAcI5AIB9gCN0AFaS/c/0z5hWVbazOwszo+ETw8Q4CxLt5VebTEzVbWffjoE9H+A3tjb xP8Gy0XNYTlpGLN2oJprybV2AHsMUIT0z1uARAOw3F5ALnVTlV+K29Vrfb4DjvwFXuEJbER3+Gv1 sO0A7itlr8PKDjwpP24haOnxpSscMe2+n0VMhEodwH+99iDEng+gj3W5WG1VBRgKTYtevPoe6gVo slwj+xfpDHJNHyXAd0zgAIZefPTkjs8AWiv1qnL1MisK9XugWcXTqdjo3osiLmkK9dUVT4At+dFd h4MDJCXSGWBjeM8gIDYAQivl6K0wnYPybxbi3CarcJ+jzXAoytrsB3CMWSgZmiYvy5CIW04c9rYl LAcIAUy17ZzoCUIBgbVAiHYCAiNlPIhLA1BTMAnHQ2RpACiU4sAMPF4ivblLuwiJfe4ghYLvXlbk Rm0TaL8NG+l7vT35swUSzW0NWnNGE+MOT4wU45b5VYvcCTt7dQ+/DIUwJ2mhVjZk4c/Fj3+Tiy6z /QW+xX8mOL9oVAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMi0xMlQwNjo0NzowNSswMDowMPam 3yIAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDItMTJUMDY6NDc6MDUrMDA6MDCH+2eeAAAAAElF TkSuQmCC X-Now-Playing: Yukihiro Takahashi's _Blue Moon Blue_: "Blue Moon Blue" Date: Sat, 12 Feb 2022 07:50:39 +0100 In-Reply-To: (Stefan Monnier via's message of "Fri, 11 Feb 2022 16:24:37 -0500") Message-ID: <87fsoo60jk.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > So I'd appreciate a decision from the maintainers: > > Should we keep the backward-incompatible code we currently have on > `master` or should we take my patch with its someone annoyingly > placed e [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53618 Cc: Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > So I'd appreciate a decision from the maintainers: > > Should we keep the backward-incompatible code we currently have on > `master` or should we take my patch with its someone annoyingly > placed extra argument (or some yet distinct option)? We can't break compatibility in this way, so please go ahead and push your patch. (A longer term solution would be to introduce a new function with a less confusing signature, and make the old one obsolete.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 19 14:20:41 2022 Received: (at 53618-done) by debbugs.gnu.org; 19 Feb 2022 19:20:41 +0000 Received: from localhost ([127.0.0.1]:58750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLVHd-00069f-6Q for submit@debbugs.gnu.org; Sat, 19 Feb 2022 14:20:41 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:41606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLVHa-00069Q-Gy for 53618-done@debbugs.gnu.org; Sat, 19 Feb 2022 14:20:39 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0F25580508; Sat, 19 Feb 2022 14:20:32 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 6CFD2800AE; Sat, 19 Feb 2022 14:20:26 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1645298426; bh=wZWRMpY6uE3nNQ3Qd/nCGCcHk2/RkNQzXD1HUE9DVG4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=gIf1j0UpA0GUxTA8b2bE+DbOzDU9wc9fV7Y9Js60MMSycr6hGlyKnxMKStoOnLI9P NEcAKW7g4/G7sGBR8Gb3hq8JBfEmFuw0ofjk49fAAIC66pRPPS+eJn0EGAxKmsxFnF rY2p8KfkjzdZY+amfiRqGGnDsx8d9uOh3d52t3M+tI7rSnJ17cQz5A6m2DsARdxkSG pXQJpvgFeDzjdVsi/BIvi/SQuJQTJzYMpV0jFboyn4V8gOAgJpaDl+UuwU45kYpqqJ swFxLRNXEQbl6SsAD6KC45irtTq+Fc/arCNLxoAAt0bBBTh1TLTTRLzQBO/s5BTTxt K6+xZnY+6qJ7Q== Received: from ceviche (unknown [45.72.237.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2FE62120CEB; Sat, 19 Feb 2022 14:20:26 -0500 (EST) From: Stefan Monnier To: Lars Ingebrigtsen Subject: Re: bug#53618: 29.0.50; macroexp-warn-and-return incompatible change Message-ID: References: <875yq2d2gb.fsf@gnus.org> <87fsoo60jk.fsf@gnus.org> Date: Sat, 19 Feb 2022 14:20:25 -0500 In-Reply-To: <87fsoo60jk.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 12 Feb 2022 07:50:39 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.058 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53618-done Cc: 53618-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > We can't break compatibility in this way, so please go ahead and push > your patch. Thanks, done, Stefan From unknown Wed Jun 18 23:11:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 20 Mar 2022 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator