]> code.delx.au - gnu-emacs-elpa/commitdiff
* debbugs-gnu.el (debbugs-gnu-usertags): Show also local tags.
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 26 Oct 2012 06:54:21 +0000 (08:54 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 26 Oct 2012 06:54:21 +0000 (08:54 +0200)
packages/debbugs/debbugs-gnu.el

index 6eab007438b2ceab54d7993fc00d63d8429022f8..41492acbee3427e12184d416c46e7e0558266a03 100644 (file)
@@ -1170,6 +1170,13 @@ The following commands are available:
            (user-tab-length
             (1+ (apply 'max (length "User") (mapcar 'length packages)))))
 
+       ;; Initialize variables.
+       (when (and (file-exists-p debbugs-gnu-persistency-file)
+                  (not debbugs-gnu-local-tags))
+         (with-temp-buffer
+           (insert-file-contents debbugs-gnu-persistency-file)
+           (eval (read (current-buffer)))))
+
        ;; Create buffer.
        (when (get-buffer buffer-name)
          (kill-buffer buffer-name))
@@ -1183,7 +1190,7 @@ The following commands are available:
 
        ;; Retrieve user tags.
        (dolist (package packages)
-         (dolist (tag (debbugs-get-usertag :package package))
+         (dolist (tag (sort (debbugs-get-usertag :package package) 'string<))
            (add-to-list
             'tabulated-list-entries
             ;; `tabulated-list-id' is the parameter list for `debbugs-gnu'.
@@ -1192,6 +1199,14 @@ The following commands are available:
                        (propertize tag 'mouse-face widget-mouse-face)))
             'append)))
 
+       ;; Add local tags.
+       (when debbugs-gnu-local-tags
+         (add-to-list
+            'tabulated-list-entries
+            `((("tagged"))
+              ,(vector "" (propertize "(local tags)"
+                                      'mouse-face widget-mouse-face)))))
+
        ;; Show them.
        (tabulated-list-init-header)
        (tabulated-list-print)