On Mon, Dec 26, 2022 at 3:13 AM Milan Glacier wrote: > use-package is a macro, so if someone uses use-package to configure the > package, when he needs to debug (for example minimal configuration), he > can always present the expanded form. (which basically just expands to > stuffs like setq, autoload, add-hook stuffs). > Yes, this was my initial hope too, that something like `pp-macroexpand-last-sexp` could help me. But it's got enough fluff to make it tiring to read. Here's what a simple '(use-package foo)' with no options expands to: (progn (defvar use-package--warning1 #'(lambda (keyword err) (let ((msg (format "%s/%s: %s" 'foo keyword (error-message-string err)))) (display-warning 'use-package msg :error)))) (condition-case-unless-debug err (if (not (require 'foo nil t)) (display-warning 'use-package (format "Cannot load %s" 'foo) :error)) (error (funcall use-package--warning1 :catch err)))) I'm afraid mode options will make this even more complicated. And what's with that defvar? -- João