unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: compile.el legacy compatibility
Date: Sun, 24 Mar 2019 13:51:04 -0400	[thread overview]
Message-ID: <jwvef6w89g3.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: CAO_0tj=tk1v+-ZamOn_H_5-05RxVjxOOu2A6EPY62=Zrd_VgAg@mail.gmail.com

> I was wondering what is your policy on removing obsolete content. I think
> it would be a much better for current users if "line" was handled like all
> the other fields instead of reverting the entire error to legacy mode in an
> undocumented way.

This current case can be handled as follows (by order of my own preferences):
- Drop this old compatibility.
- Refine the compatibility check: the old code only allowed (FILE LINE COLUMN)
  and not the more general (BEG-LINE . END-LINE) case, so we could still support
  the old (FILE LINE COLUMN) case where LINE is a function while also
  supporting the case where LINE is (BEG-LINE . END-LINE) and BEG-LINE
  and END-LINE can be functions.
- Refine the compatibility by catching a `wrong-number-of-arguments`
  error when calling the LINE function with 2 args and considering it
  a tell-tale sign that it's not an old-style LINE function but
  a new-style function instead.
- Refine the compatibility by catching a `wrong-number-of-arguments`
  error when calling the LINE function with 0 args and considering it
  a sign that it's probably an old-style LINE function.


        Stefan




  reply	other threads:[~2019-03-24 17:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-23 13:55 compile.el legacy compatibility Troy Hinckley
2019-03-24 17:51 ` Stefan Monnier [this message]
2019-03-25 19:23   ` Troy Hinckley
2019-03-26 14:05     ` Stefan Monnier
2019-03-30 10:11       ` Eli Zaretskii
2019-04-03 15:20         ` Stefan Monnier
2019-04-06 13:14           ` Troy Hinckley
2019-04-06 22:50             ` Stefan Monnier

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=jwvef6w89g3.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /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).