use-package icon indicating copy to clipboard operation
use-package copied to clipboard

Inconsistent form indentation with local maps

Open memeplex opened this issue 2 years ago • 1 comments

Compare

  :bind (("x" . x)
         :map local-map
         ("y" . y)))

to

  :bind (:map local-map
              ("y" . y)))

The inconsistent indentation happens when you only have local bindings so then :bind clause starts with :map.

I understand the specific indentation rules are defined by use-package.

memeplex avatar Oct 09 '21 18:10 memeplex

Yes, I notice the same inconsistency but resolved it as follows:

  :bind (nil
         :map local-mode-map
         ("y" . y)))

That is be explicit that you are not configuring any global bindings. Hope that helps. Note this issue was raised previously with #887.

doolio avatar Oct 31 '21 16:10 doolio

Closing this as a duplicate of #887. The recommended workaround for now is to add a space, like so:

(use-package foo
  :bind ( :map local-map
          ("y" . y)))

skangas avatar Nov 27 '22 17:11 skangas