]> code.delx.au - gnu-emacs-elpa/commitdiff
Minor debbugs fixes
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 29 Feb 2016 08:56:46 +0000 (09:56 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 29 Feb 2016 08:56:46 +0000 (09:56 +0100)
* packages/debbugs/debbugs-gnu.el (debbugs-gnu-show-reports):
Fix docstring.  Let-bind also `debbugs-cache-expiry'.

packages/debbugs/debbugs-gnu.el

index 77f9cc52c03e6dfd9c01390a559db3de5c9f05f2..d22dd81705bded41a9278267fe8214e63c4afc86 100644 (file)
@@ -579,7 +579,9 @@ marked as \"client-side filter\"."
      (t (apply 'debbugs-get-bugs args)))))
 
 (defun debbugs-gnu-show-reports (&optional offline)
-  "Show bug reports."
+  "Show bug reports.
+If OFFLINE is non-nil, the query is not sent to the server.  Bugs
+are taken from the cache instead."
   (let ((inhibit-read-only t)
        (buffer-name "*Emacs Bugs*"))
     ;; The tabulated mode sets several local variables.  We must get
@@ -591,14 +593,16 @@ marked as \"client-side filter\"."
 
     ;; Print bug reports.
     (dolist (status
-            (apply 'debbugs-get-status
-                   (if offline
-                       (let ((ids nil))
-                         (maphash (lambda (key elem)
-                                    (push (cdr (assq 'id elem)) ids))
-                                  debbugs-cache-data)
-                         (sort ids '<))
-                     (debbugs-gnu-get-bugs debbugs-gnu-local-query))))
+            (let ((debbugs-cache-expiry (if offline nil debbugs-cache-expiry))
+                  ids)
+              (apply 'debbugs-get-status
+                     (if offline
+                         (progn
+                           (maphash (lambda (key _elem)
+                                      (push key ids))
+                                    debbugs-cache-data)
+                           (sort ids '<))
+                       (debbugs-gnu-get-bugs debbugs-gnu-local-query)))))
       (let* ((id (cdr (assq 'id status)))
             (words
              (mapconcat