unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Stefan Kangas <stefan@marxist.se>
Cc: 39233@debbugs.gnu.org
Subject: bug#39233: .elc file - possibly outdated backward compatibility comments
Date: Thu, 23 Jan 2020 11:26:52 -0500	[thread overview]
Message-ID: <jwva76eqha2.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87zhefkhi9.fsf@marxist.se> (Stefan Kangas's message of "Wed, 22 Jan 2020 09:44:14 +0100")

> In the .elc files on my machine, I see the following:
>     ;;; This file uses dynamic docstrings, first added in Emacs 19.29.

It's factually correct, but indeed it not really relevant, we can drop
this to save some bytes.

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

Here, this is indeed likely not factually correct: some .elc files might
indeed work in earlier versions, but that will depend on many other
things:
- byte codes have been added in Emacs-24 for the lexical-binding
  support, others were added in Emacs-25, yet more in Emacs-26)
- macros which expand to code which relies on functions/features only
  provided in newer versions).
- changes in the reader (e.g. the readable syntax for hash-tables, or
  that of records).

I think more useful would be to emit a warning any time a .elc file is
loaded into an Emacs that's older than the one with which it
was compiled since that's a case we "don't support" (at least when the
major-version is different).

> 1. Is it still correct that the byte compiled file can be loaded on
>    Emacs 22?

It's quite likely that *some* do.  But I expect that the vast
majority don't.

> 3. Following up on point 2, I also see:
>    
>        "\n;;; This file uses "
>        (if dynamic-docstrings
>            "dynamic docstrings, first added in Emacs 19.29"
>          "opcodes that do not exist in Emacs 18")
>    
>    I'm not sure what to do here, but it doesn't seem to make sense to
>    mention Emacs 18 in any case.  Of course, this file might use
>    opcodes that do not exist in Emacs 23, or perhaps an even later
>    version.

Throw it all away.


        Stefan






  parent reply	other threads:[~2020-01-23 16:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22  8:44 bug#39233: .elc file - possibly outdated backward compatibility comments Stefan Kangas
2020-01-22 17:13 ` Eli Zaretskii
2020-01-23 16:26 ` Stefan Monnier [this message]
2020-01-24  9:20   ` Eli Zaretskii
2020-01-24 14:22     ` Stefan Monnier
2020-01-24 14:36       ` Lars Ingebrigtsen
2020-01-24 16:08         ` Stefan Kangas
2020-01-24 15:23       ` Eli Zaretskii
2020-01-24 17:29         ` Stefan Monnier
2020-01-24 18:45           ` Stefan Monnier
2020-01-24 19:06             ` Stefan Kangas
2020-01-24 19:14               ` Stefan Monnier
2020-01-24 19:19             ` Glenn Morris
2020-01-24 20:08             ` Eli Zaretskii
2020-09-21 12:56             ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwva76eqha2.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=39233@debbugs.gnu.org \
    --cc=stefan@marxist.se \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).