• 0 Posts
  • 10 Comments
Joined 1 year ago
cake
Cake day: October 9th, 2023

help-circle

  • Compared to being the kind of person who reads use-package like JSON and treats it like a declaration language, you will be light years ahead at configuration if you just know lists, quoting, alists, plists, and writing functions.

    Hey, use-package user here. I switched from my half-baked NIH init framework with a bunch of functions and other stuff you’re talking about, and never looked back.

    My 1670kLoC config doesn’t contain any definitions and mostly declarative. If I need to defun something (so, there’s no package with similar functionality) - there’s definitely time to start another package. I don’t even need to publish it on MELPA, since installation from git sources hasn’t been an issue since Quelpa appeared (like 10 years ago).

    Users who don’t go at least that far will be constantly shooting themselves in the foot and spending much more time with minor, novice level bugs that are completely obvious.

    Debugging use-package forms is very easy if you know about macro expansion.




  • add-hooks

    aware of use-package?

    is-savable-buffer-p

    -p suffix already means a predicate, you don’t need is-

    also, let evals all bindings, while and is a short-circuit thing, I don’t see any reasons to bind all these, especially is-file-buffer

    defvar

    most of these look like user-customizable variables, so defcustom should fit better

    (when (when

    an antipattern, use and

    #'(lambda

    don’t

    also, avoid using lambdas in hooks

    defmacro

    never ever use macros if a function can do the job

    P.S. flycheck-package is your friend