diff options
Diffstat (limited to 'lisp/acdw.el')
-rw-r--r-- | lisp/acdw.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 95e1147..43cb5c7 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el | |||
@@ -75,5 +75,13 @@ ARGS." | |||
75 | (run-at-time sunset-time (* 60 60 24) sunset-command) | 75 | (run-at-time sunset-time (* 60 60 24) sunset-command) |
76 | (run-at-time "12:00am" (* 60 60 24) sunset-command))) | 76 | (run-at-time "12:00am" (* 60 60 24) sunset-command))) |
77 | 77 | ||
78 | (defun +ensure-after-init (function) | ||
79 | "Ensure FUNCTION runs after init, or now if already initialized. | ||
80 | If Emacs is already started, run FUNCTION. Otherwise, add it to | ||
81 | `after-init-hook'. FUNCTION is called with no arguments." | ||
82 | (if after-init-time | ||
83 | (funcall function) | ||
84 | (add-hook 'after-init-hook function))) | ||
85 | |||
78 | (provide 'acdw) | 86 | (provide 'acdw) |
79 | ;;; acdw.el ends here | 87 | ;;; acdw.el ends here |