From: Alan Mackenzie <acm@muc.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 21466@debbugs.gnu.org
Subject: bug#21466: [PATCH] Avoid defining (temporarily) vars and functions
Date: Tue, 11 May 2021 20:34:30 +0000 [thread overview]
Message-ID: <YJrqVlJR4iMvf2s1__43253.4688314021$1620765421$gmane$org@ACM> (raw)
In-Reply-To: <87eeeestgu.fsf@gnus.org>
Hello, Lars.
On Mon, May 10, 2021 at 13:45:21 +0200, Lars Ingebrigtsen wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > CC-mode currently defines various non-CC-mode variables and functions
> > with dummy values, as a way to avoid byte-compiler warnings when using
> > those external vars/functions.
> > Since this is dangerous business, CC-mode has to be extra careful to
> > undo such settings when they're not needed any more.
> This was five years ago, but skimming the code, it seems like it's
> generally applicable still?
> Alan, do you have any comments on this patch?
I meant to comment on it back then, but the patch is unusually difficult
to follow: most of the context lines are unhelpful in giving the
context, and the git macros identifying the current function in the diff
aren't working here, to a large degree.
There are little things I'm unhappy about with the patch: it explicitly
tests (featurep 'xemacs), which is not done in CC Mode, being regarded
as somewhat vulgar. Instead specific functionalities are always tested
for.
Also, in place of cc-bytecomp-defun is proposed declare-function.
However this is in an inconsistent state, with the documentation
requiring a FILE argument, but Stefan's patch supplying nil.
It seems that cc-bytecomp-defvar has long (?always) been unnecessary,
given that (defvar foo) has ?always had the desired effect, even in
XEmacs. So I don't have anything against clearing out the
cc-bytecomp-defvar's.
So, I don't object on principle to the principle of the patch, just
there are these little irritations about it, and it will need me to
study it more closely to check nothing subtle would get lost (I doubt it
would).
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2021-05-11 20:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-12 3:36 bug#21466: [PATCH] Avoid defining (temporarily) vars and functions Stefan Monnier
2015-10-29 13:09 ` Stefan Monnier
2019-11-06 1:29 ` Stefan Kangas
2021-05-10 11:45 ` Lars Ingebrigtsen
2021-05-11 20:34 ` Alan Mackenzie [this message]
[not found] ` <YJrqVlJR4iMvf2s1@ACM>
2021-05-11 22:03 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-23 13:14 ` Lars Ingebrigtsen
2021-07-23 15:01 ` Glenn Morris
2021-07-24 10:26 ` Lars Ingebrigtsen
2022-03-23 20:13 ` Lars Ingebrigtsen
2022-03-25 21:09 ` Alan Mackenzie
2022-03-26 14:45 ` Alan Mackenzie
2022-03-26 16:47 ` Lars Ingebrigtsen
2022-03-26 19:51 ` Alan Mackenzie
2022-03-29 12:26 ` Lars Ingebrigtsen
2022-03-29 21:02 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
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='YJrqVlJR4iMvf2s1__43253.4688314021$1620765421$gmane$org@ACM' \
--to=acm@muc.de \
--cc=21466@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
/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.