all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "47198@debbugs.gnu.org" <47198@debbugs.gnu.org>
Subject: bug#47198: [External] : Re: bug#47198: 27.1; Why bind some commands by default if they're not defined?
Date: Tue, 16 Mar 2021 19:35:39 +0000	[thread overview]
Message-ID: <SA2PR10MB44744E84E1054A6B9353101FF36B9@SA2PR10MB4474.namprd10.prod.outlook.com> (raw)
In-Reply-To: <83a6r3djsi.fsf@gnu.org>

> >  M-s h f		hi-lock-find-patterns
> >
> > This is apparently because file `bindings.el' adds the key binding:
> >
> >   (define-key search-map "hf"   'hi-lock-find-patterns)
> >
> > Is it a good idea that we do this even though the
> > command is not yet defined?
> >
> > Seems like such a binding should be in hi-lock.el,
> > and be created only after the command is created, no?
> 
> If the command is in hi-lock.el, how do you cause hi-lock
> to autoload when first invoked?

I didn't say anything about autoloading anything.

`search-map' will always be defined in Emacs.
`hi-lock.el' can itself create that binding.

But yes, autoloading based on the command isn't
the same thing as binding a key that will, by
invoking the (undefined) command, cause its
definition to be loaded.

Feel free to fix this some other way.

We're binding a key to a command that doesn't
(yet) exist.

Is it important that that key be available at
the outset as a way to autoload that library?

At least in my use, I see only that command and
`vc-ignore' that are listed in `C-h b' but without
the commands having links.

What's so special about them?  Put differently,
how have we succeeded in solving the same problem
for other commands in files not loaded by default?





  reply	other threads:[~2021-03-16 19:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 17:57 bug#47198: 27.1; Why bind some commands by default if they're not defined? Drew Adams
2021-03-16 18:40 ` Eli Zaretskii
2021-03-16 19:35   ` Drew Adams [this message]
2021-03-16 19:42     ` bug#47198: [External] : " Eli Zaretskii
2021-03-16 19:46     ` Eli Zaretskii
2021-03-16 19:48       ` Drew Adams
2021-03-16 20:12         ` Eli Zaretskii

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=SA2PR10MB44744E84E1054A6B9353101FF36B9@SA2PR10MB4474.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=47198@debbugs.gnu.org \
    --cc=eliz@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.