[Top][All Lists]

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

Re: Suggestion for improving ergonomics of repeat-maps: define-repeat-ma

From: Juri Linkov
Subject: Re: Suggestion for improving ergonomics of repeat-maps: define-repeat-map
Date: Mon, 04 Oct 2021 21:18:35 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

> But I guess it's a bit confusing how the syntaxes are similar but
> different?  I went back and forth a number of time on the syntax --
> define-keymap is a function, so it can't do the function-line macro
> syntax that defvar-keymap can (which is better).  But having the first
> argument of define-keymap be a list (which would be preferable in most
> ways) just looked awkward.
> (define-keymap (list :full t)
>   ...)
> But I'm open to changing it if it's too confusing the way it is now.

But why not to unify them in another direction, i.e. not to use a list
for options in defvar-keymap.  Then both syntaxes would be the same:

    :full t
    "g" #'eww-reload)

  (defvar-keymap eww-textarea-map
    :full t
    "g" #'eww-reload)

instead of

  (defvar-keymap eww-textarea-map
    (:full t)
    "g" #'eww-reload)

reply via email to

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