unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: What's the point of byte-compile-define-keymap?
Date: Sun, 28 Nov 2021 14:30:32 +0100	[thread overview]
Message-ID: <87czmk4dc7.fsf@gnus.org> (raw)
In-Reply-To: <YaJen7lrhOwNMEjW@ACM> (Alan Mackenzie's message of "Sat, 27 Nov 2021 16:36:47 +0000")

Alan Mackenzie <acm@muc.de> writes:

> It looks to me that byte-compile-define-keymap (in
> lisp/emacs-lisp/bytecomp.el) saves its FORM argument in ORIG-FORM and
> always returns it unchanged.  This looks like an oversight.

It was rewritten from a byte-optimize function (but it doesn't optimise
anything any more), so it should probably be cleaned up a bit more.

> Also, would this function not better be named
> byte-compile-FILE-FORM-define-keymap, since it is the value of a
> byte-hunk-handler symbol property.
>
> Also[2], is this function really necessary?  Is define-keymap used
> sufficiently often to justify a special byte-hunk-handler for it?

It just used to issue warnings for invalid keymap syntaxes at compile
time.  And, yes, it will be used everywhere.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



  reply	other threads:[~2021-11-28 13:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-27 16:36 What's the point of byte-compile-define-keymap? Alan Mackenzie
2021-11-28 13:30 ` Lars Ingebrigtsen [this message]
2021-11-28 13:43   ` Stefan Monnier
2021-11-28 13:45     ` Lars Ingebrigtsen
2021-11-28 17:15     ` Mattias Engdegård

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=87czmk4dc7.fsf@gnus.org \
    --to=larsi@gnus.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 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).