all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Vigouroux via "Emacs development discussions." <emacs-devel@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: pcase map binding form expansion failure on Emacs 27 only
Date: Wed, 08 Sep 2021 18:47:57 +0200	[thread overview]
Message-ID: <87fsufdneq.fsf@laposte.net> (raw)
In-Reply-To: <87wnnr3zw6.fsf@alphapapa.net> (Adam Porter's message of "Wed, 08 Sep 2021 09:28:25 -0500")

Adam Porter <adam@alphapapa.net> writes:

> I am not using the version of map.el included with Emacs 27.2.  As I
> wrote in the original message.

>> What does the compiler really generate?

> It generates an incorrect macro expansion, which causes the eager macro
> expansion/void-variable errors which precipitated this thread.

However, in my test, the macro expansion returns a good result. Why?

It seems to me that I proceeded as indicated by first loading ‘map v3.1’
and then compiling the code.

#+begin_quote
;ELC\0\0
;;; Compiled
;;; in Emacs version 27.2
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(defvar plist (list :max-height 3 :max-width 2))
(byte-code "\300\301\302\303!\"\207" [message "EXPANSION TEST: %S" macroexpand-all (pcase-let* (((map :max-width) plist)) max-width)] 4)
#+end_quote

The message displayed in the echo area is:

#+begin_quote
EXPANSION TEST: (let* ((x3 (map-elt plist :max-width))) (let ((max-width x3)) max-width))
#+end_quote

> I'm not sure you understand the problem I'm describing.  Please see my
> original message.

>> Looking at things again, I'm not sure that imposing a given version for
>> a package is a good thing.

> I don't know what you mean by "imposing a given version for a package."
> The "Package-Requires" header instructs package.el to ensure that
> certain dependencies are installed at certain minimum versions.  This is
> a standard practice in Emacs packages.

Maybe I’m not right.
-- 
Best regards,
Kevin Vigouroux



  reply	other threads:[~2021-09-08 16:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 12:08 pcase map binding form expansion failure on Emacs 27 only Adam Porter
2021-09-07 16:44 ` Kevin Vigouroux via Emacs development discussions.
2021-09-07 23:49   ` Michael Heerdegen
2021-09-08 11:58     ` Kevin Vigouroux via Emacs development discussions.
2021-09-08  5:43   ` Adam Porter
2021-09-08 13:07 ` Kevin Vigouroux via Emacs development discussions.
2021-09-08 14:28   ` Adam Porter
2021-09-08 16:47     ` Kevin Vigouroux via Emacs development discussions. [this message]
2021-09-08 18:48       ` Adam Porter
2021-09-09  6:20         ` Kevin Vigouroux via Emacs development discussions.
2021-09-10 18:35         ` Kevin Vigouroux via Emacs development discussions.

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=87fsufdneq.fsf@laposte.net \
    --to=emacs-devel@gnu.org \
    --cc=ke.vigouroux@laposte.net \
    /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.