]> git.eshelyaron.com Git - emacs.git/commitdiff
Define revert-buffer-function for *Memory Report*
authorMattias Engdegård <mattiase@acm.org>
Fri, 16 Jul 2021 11:04:14 +0000 (13:04 +0200)
committerMattias Engdegård <mattiase@acm.org>
Fri, 16 Jul 2021 18:05:31 +0000 (20:05 +0200)
* lisp/emacs-lisp/memory-report.el (memory-report):
Allow the memory report buffer to be updated by pressing 'g'.

lisp/emacs-lisp/memory-report.el

index f4f03133b0f4264f3decbee0200a0407b552293a..1125dde4055597f486aa953ec98910ddd51a35c1 100644 (file)
@@ -44,6 +44,8 @@ by counted more than once."
   (pop-to-buffer "*Memory Report*")
   (special-mode)
   (button-mode 1)
+  (setq-local revert-buffer-function (lambda (_ignore-auto _noconfirm)
+                                       (memory-report)))
   (setq truncate-lines t)
   (message "Gathering data...")
   (let ((reports (append (memory-report--garbage-collect)