emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/gcmh 8867533 20/32: Improve messaging


From: Andrea Corallo
Subject: [elpa] externals/gcmh 8867533 20/32: Improve messaging
Date: Mon, 16 Nov 2020 17:32:06 -0500 (EST)

branch: externals/gcmh
commit 8867533a736f2098917904c26fd833feca2310a5
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    Improve messaging
---
 gcmh.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/gcmh.el b/gcmh.el
index bbccbc9..d78b505 100644
--- a/gcmh.el
+++ b/gcmh.el
@@ -75,11 +75,14 @@ This is to be used with the `pre-command-hook'."
 (defun gcmh-idle-garbage-collect ()
   "Run garbage collection after `gcmh-idle-delay'."
   (if gcmh-verbose
-      (progn (message "Garbage collecting...")
-             (message "Garbage Collector ran for %.06f sec"
-                      (gcmh-time (garbage-collect))))
-    (garbage-collect))
-  (setq gc-cons-threshold gcmh-low-cons-threshold))
+      (progn
+       (message "Garbage collecting...")
+       (condition-case-unless-debug e
+           (message "Garbage collecting...done (%.3fs)"
+                    (gcmh-time (garbage-collect)))
+         (error (message "Garbage collecting...failed")
+                (signal (car e) (cdr e)))))
+    (garbage-collect)))
 
 ;;;###autoload
 (define-minor-mode gcmh-mode



reply via email to

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