unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: "Basil L. Contovounesios" <basil@contovou.net>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Adding a DECLARE spec equivalent to DECLARE-FUNCTION
Date: Sat, 16 Mar 2024 23:09:59 -0500	[thread overview]
Message-ID: <524535f0-19f3-42ec-a25b-fafad81d3ce8@alphapapa.net> (raw)
In-Reply-To: <87frwqqypj.fsf@epfl.ch>

Hi Basil,

Thanks for your thoughtful reply.

On 3/16/24 05:04, Basil L. Contovounesios wrote:

> My vote is for instead teaching the compiler to treat declare-function
> more like it treats defvar, in that the effect of declare-function
> should be made local to the current lexical scope.  [It is already
> possible to write this way, and I've been known to, but sadly the effect
> is global.]  This wish has been raised and agreed on here (at least in
> passing) before.
> 
> This would reap all the benefits of points 1-4, as well as an additional
> one: that declare-function is lexically closer to the implementation
> through which the need for the declaration arises.  I think a
> declaration at the top of a function is more likely to be forgotten and
> become stale as the implementation changes.

You raise some good points.  I would be happy with that as well.

--Adam



      reply	other threads:[~2024-03-17  4:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-03 19:17 Adding a DECLARE spec equivalent to DECLARE-FUNCTION Adam Porter
2024-03-16 10:04 ` Basil L. Contovounesios
2024-03-17  4:09   ` Adam Porter [this message]

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=524535f0-19f3-42ec-a25b-fafad81d3ce8@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=basil@contovou.net \
    --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).