jwiegley / use-package

A use-package declaration for simplifying your .emacs
https://jwiegley.github.io/use-package
GNU General Public License v3.0
4.39k stars 259 forks source link

Inconsistent form indentation with local maps #957

Closed memeplex closed 1 year ago

memeplex commented 2 years ago

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.

doolio commented 2 years ago

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.

skangas commented 1 year ago

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)))