all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: How to cause a compiler warning?
Date: Tue, 16 Jan 2024 22:29:11 -0500	[thread overview]
Message-ID: <E1rPwc3-0000si-Cr@fencepost.gnu.org> (raw)
In-Reply-To: <ZaQLU1hGH6YrwMIc@ACM> (message from Alan Mackenzie on Sun, 14 Jan 2024 16:26:59 +0000)

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Thanks to all those who have posted answers.  I've removed all
but one of you (the one this is a direct reply to) from the CC
so you won't get two copies.

  > > > Since 29.1, the correct function for a warning has been
  > > > byte-compile-warn-x.

  > > What about `macroexp-warn-and-return'?

  > It is a complicated way of calling byte-compile-warn-x.

Since the warning would come from expansion of the cond* pacro, I get
the impression from the doc string that `macroexp-warn-and-return' MAY
be exactly what I want.  But I can't br quite sure.

`byte-compile-warn-x' has a feature of an argument (unhelpfully named ARG)
which says, 
    ARG is the source element (likely a symbol with position) central to
      the warning, intended to supply source position information.

Does `macroexp-warn-and-return' have a similar feature?  Does it use
FORM for that?  If so, it woukd be helpful for its doc string to say
FORM will be used this way.  With the current doc string it is not
clear what it WILL do with FORM.

Can someone please clarify these minor points so I can tell what to do?

Also, it would be good to rename the argument ARG and improve the doc string
as described above.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





  reply	other threads:[~2024-01-17  3:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-14  3:09 How to cause a compiler warning? Richard Stallman
2024-01-14  3:20 ` João Távora
2024-01-14 13:01   ` Alan Mackenzie
2024-01-14 15:43     ` João Távora
2024-01-14 16:21       ` Alan Mackenzie
2024-01-15  0:16         ` João Távora
2024-01-17 12:25           ` Alan Mackenzie
2024-01-17 13:40             ` João Távora
2024-01-18 12:05               ` Alan Mackenzie
2024-01-18 12:26                 ` João Távora
2024-01-14 15:54     ` Ihor Radchenko
2024-01-14 16:26       ` Alan Mackenzie
2024-01-17  3:29         ` Richard Stallman [this message]
2024-01-17 11:59           ` Alan Mackenzie

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=E1rPwc3-0000si-Cr@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=acm@muc.de \
    --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 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.