emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: Propose to add setup-wizard.el to ELPA


From: Drew Adams
Subject: RE: [External] : Re: Propose to add setup-wizard.el to ELPA
Date: Sun, 2 Jan 2022 18:47:15 +0000

> I would need to insert keybinding configurations
> as code into init.el and the rest into custom.
> And they are separate and confusing for a user
> to modify/remove.

Yes, the Customize UI could use some improvement
wrt key bindings.
___

Personally, I use this.  I'm sure there are other
widget definitions out there for key bindings.

(I'm not proposing this - just saying I use it.
E.g., this definition assumes a single keymap.)


(define-widget 'icicle-key-definition 'lazy
  "Key definition type for Icicle mode keys.
A list of three components: KEY, COMMAND, CONDITION, that represents
an `icicle-mode-map' binding of COMMAND according to KEY, if CONDITION
evaluates to non-nil.

KEY is either a key sequence (string or vector) or a command.
COMMAND is a command.
CONDITION is a sexp.

If KEY is a command, then the binding represented is its remapping to
COMMAND."
  :indent 1 :offset 0
  :type
  '(list
    (choice
     (key-sequence :tag "Key" :value [ignore])
     ;; Use `symbolp' instead of `commandp', in case the library
     ;; defining the command is not loaded.
     (restricted-sexp :tag "Command to remap"
                      :match-alternatives (symbolp)
                      :value ignore))
     ;; Use `symbolp' instead of `commandp'...
    (restricted-sexp :tag "Command"
                     :match-alternatives (symbolp)
                     :value ignore)
    (sexp :tag "Condition")))

reply via email to

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