nowislewis / nowisemacs

A full-blown emacs configuration framework with easy abstraction
48 stars 8 forks source link

:delay not work for user value #1

Closed QiangF closed 2 years ago

QiangF commented 2 years ago

This fixes it:

(setup-define :delay
  (lambda (&optional time)
    `(run-with-idle-timer ,(or time 1) nil
                          (lambda () (require ',(setup-get 'feature)))))
  :documentation "Delay loading the feature until a certain amount of idle time has passed.")
nowislewis commented 2 years ago

Already used, thanks a lot for suggestions! 😊