[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gcmh 8bf0666 30/32: Rename `gcmh-register-idle-timer' i

From: Andrea Corallo
Subject: [elpa] externals/gcmh 8bf0666 30/32: Rename `gcmh-register-idle-timer' into `gcmh-register-idle-gc'
Date: Mon, 16 Nov 2020 17:32:08 -0500 (EST)

branch: externals/gcmh
commit 8bf06660dd3f9ac788e79b26f23f585bd9cccfdc
Author: Andrea Corallo <andrea.corallo@arm.com>
Commit: Andrea Corallo <andrea.corallo@arm.com>

    Rename `gcmh-register-idle-timer' into `gcmh-register-idle-gc'
 gcmh.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcmh.el b/gcmh.el
index 0a6fac4..e576704 100644
--- a/gcmh.el
+++ b/gcmh.el
@@ -83,7 +83,7 @@ This is to be used with the `pre-command-hook'."
 (defvar gcmh-last-gc-time 0.1
   "How long it took to perform the last garbage collection.")
-(defun gcmh-register-idle-timer ()
+(defun gcmh-register-idle-gc ()
   "Register a timer to run `gcmh-idle-garbage-collect'.
 Cancel the previous one if present."
   (let ((idle-t (if (eq gcmh-idle-delay 'auto)
@@ -121,11 +121,11 @@ Cancel the previous one if present."
         (setf gc-cons-threshold gcmh-high-cons-threshold)
        ;; Release severe GC strategy before the user restart to working
        (add-hook 'pre-command-hook #'gcmh-set-high-threshold)
-       (add-hook 'post-command-hook #'gcmh-register-idle-timer))
+       (add-hook 'post-command-hook #'gcmh-register-idle-gc))
     (setf gc-cons-threshold gcmh-low-cons-threshold
           gcmh-idle-timer nil)
     (remove-hook 'pre-command-hook #'gcmh-set-high-threshold)
-    (remove-hook 'post-command-hook #'gcmh-register-idle-timer)))
+    (remove-hook 'post-command-hook #'gcmh-register-idle-gc)))
 (provide 'gcmh)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]