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

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

[elpa] externals/gnorb 6cdf064 365/449: Remove useless use of progn, up


From: Stefan Monnier
Subject: [elpa] externals/gnorb 6cdf064 365/449: Remove useless use of progn, update usage status function
Date: Fri, 27 Nov 2020 23:16:12 -0500 (EST)

branch: externals/gnorb
commit 6cdf06459b7586f175fde32b9570440c4d284784
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    Remove useless use of progn, update usage status function
    
    * packages/gnorb/gnorb-registry.el (gnorb-report-tracking-usage): Not
      necessary. Also `gnorb-refresh-usage-status' needs to accept
      optional arguments.
---
 gnorb-registry.el | 37 ++++++++++++++++++-------------------
 1 file changed, 18 insertions(+), 19 deletions(-)

diff --git a/gnorb-registry.el b/gnorb-registry.el
index e6c9e8f..2b3912c 100644
--- a/gnorb-registry.el
+++ b/gnorb-registry.el
@@ -212,25 +212,24 @@ key."
 registry to track message/heading associations.  Reports the
 number of tracked messages, the number of tracked headings, and how much of 
the registry is occupied."
   (interactive)
-  (progn
-    (pop-to-buffer
-     (get-buffer-create "*Gnorb Usage*")
-     '(nil . ((window-height . 10))))
-    (gnorb-refresh-usage-status)
-    (special-mode)
-    (setq revert-buffer-function #'gnorb-refresh-usage-status)
-    (local-set-key (kbd "d") (lambda ()
-                              (interactive)
-                              (progn
-                                (gnorb-flush-dead-associations)
-                                (gnorb-refresh-usage-status))))
-    (local-set-key (kbd "D") (lambda ()
-                              (interactive)
-                              (progn
-                                (gnorb-flush-dead-associations t)
-                                (gnorb-refresh-usage-status))))))
-
-(defun gnorb-refresh-usage-status ()
+  (pop-to-buffer
+   (get-buffer-create "*Gnorb Usage*")
+   '(nil . ((window-height . 10))))
+  (gnorb-refresh-usage-status)
+  (special-mode)
+  (setq revert-buffer-function #'gnorb-refresh-usage-status)
+  (local-set-key (kbd "d") (lambda ()
+                            (interactive)
+                            (progn
+                              (gnorb-flush-dead-associations)
+                              (gnorb-refresh-usage-status))))
+  (local-set-key (kbd "D") (lambda ()
+                            (interactive)
+                            (progn
+                              (gnorb-flush-dead-associations t)
+                              (gnorb-refresh-usage-status)))))
+
+(defun gnorb-refresh-usage-status (&optional _ignore-auto _noconfirm)
   "Clear and re-format the *Gnorb Usage* buffer."
   (let ((messages (length (gnorb-registry-tracked-messages)))
        (headings (length (gnorb-registry-tracked-headings)))



reply via email to

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