From 43e8ddbc6d9b66979aa8af29f4948b70cc6b67ca Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 18 Oct 2019 22:08:22 -0400 Subject: [PATCH] Add docstrings to GC hooks And correct grammar in a comment. --- core/core.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/core.el b/core/core.el index a31c79244..b9bc671e5 100644 --- a/core/core.el +++ b/core/core.el @@ -267,11 +267,11 @@ users).") ;; To speed up minibuffer commands (like helm and ivy), we defer garbage ;; collection while the minibuffer is active. (defun doom-defer-garbage-collection-h () - "TODO" + "Increase `gc-cons-threshold' to stave off garbage collection." (setq gc-cons-threshold most-positive-fixnum)) (defun doom-restore-garbage-collection-h () - "TODO" + "Restore `gc-cons-threshold' to a reasonable value so the GC can do its job." ;; Defer it so that commands launched immediately after will enjoy the ;; benefits. (run-at-time @@ -284,7 +284,7 @@ users).") (add-hook 'emacs-startup-hook #'doom-restore-garbage-collection-h) ;; When Emacs loses focus seems like a great time to do some garbage collection -;; all sneaky breeky like, so we can return a fresh(er) Emacs. +;; all sneaky breeky like, so we can return to a fresh(er) Emacs. (add-hook 'focus-out-hook #'garbage-collect)