unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: rms@gnu.org
Cc: 46636@debbugs.gnu.org
Subject: bug#46636: [External] : bug#46636: 28.0.50; M-: (funcall #'or) doesn't throw an error
Date: Mon, 22 Feb 2021 08:41:03 +0000	[thread overview]
Message-ID: <CAOqdjBeSuiwdGkZd670teUehQ-Ew8Qmq5rSPTLLrkm9S5hB4=w@mail.gmail.com> (raw)
In-Reply-To: <E1lE4Zf-0006Hs-Eu@fencepost.gnu.org>

On Mon, Feb 22, 2021 at 6:20 AM Richard Stallman <rms@gnu.org> wrote:
> I think I agree that funcalling `or' should give an error.

This applies to all macros. I chose #'or as an example because it is
often used as though it were a function, so people might be confused
into trying it (as I have, I must confess).

(funcall #'setq x 3)

also "works", and it's clear in that case that it should not.

I think the right way to fix this is not to macroexpand (funcall #'f)
in eval-expression, but to leave it to the byte compiler to do so; the
byte compiler often assumes that function bindings don't change, so it
would not be a new problem for it to also assume that if #'or is a
macro at compile time, it will be a macro at runtime, so it can avoid
simplifying calls to well-known macros, at least.





  parent reply	other threads:[~2021-02-22  8:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 13:26 bug#46636: 28.0.50; M-: (funcall #'or) doesn't throw an error Pip Cet
2021-02-19 13:35 ` Lars Ingebrigtsen
2021-02-19 14:01 ` Andreas Schwab
2021-02-19 16:46   ` Philipp Stephani
2021-02-19 18:10     ` Pip Cet
2021-02-19 18:28 ` bug#46636: [External] : " Drew Adams
2021-02-22  6:20   ` Richard Stallman
2021-02-22  8:25     ` Andreas Schwab
2021-02-22  9:16       ` Pip Cet
2021-02-22  8:41     ` Pip Cet [this message]
2022-06-17 17:39 ` 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='CAOqdjBeSuiwdGkZd670teUehQ-Ew8Qmq5rSPTLLrkm9S5hB4=w@mail.gmail.com' \
    --to=pipcet@gmail.com \
    --cc=46636@debbugs.gnu.org \
    --cc=rms@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).