Subject: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el

From: "Basil L. Contovounesios" <[email-masked]>
Date: Tue, 16 Jun 2020 21:31:53 +0100

Theodor Thornhill <[email-masked]> writes:

>> This should be:
>>
>>   (defvar project-prefix-map
>>     (let ((map (make-sparse-keymap)))
>>       (define-key map ...)
>>       ...
>>       map)
>>     "...")
>>
>>   (define-key ctl-x-map "p" project-prefix-map)
>>
>> See the end of (info "(elisp) Tips for Defining").
>>
>> Maybe it should also be autoloaded.
>
> Below is another patch with your suggestions incorporated. Is it correct to also
> autoload the (define-key ctl-x-map "p" project-prefix-map)?

I'm not an autoload expert, so I'd appreciate if someone else chimed in,
but according to the commentary in lisp/bookmark.el,

  ;;;###autoload (define-key ...)

is preferable to

  ;;;###autoload
  (define-key ...)

since the former is copied to lisp/ldefs-boot.el at build time and
skipped at load time (since it's in a comment), so it doesn't override
existing user settings.  Would that do what we want?

Thanks,

-- 
Basil