bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Basil L. Contovounesios
Subject: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el
Date: Tue, 16 Jun 2020 21:31:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Theodor Thornhill <theo@thornhill.no> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]