]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/debbugs/debbugs-gnu.el
Make the `t' "tag" command persist over reordering
[gnu-emacs-elpa] / packages / debbugs / debbugs-gnu.el
index b2a66989de69ef6f5311cb3fefca6f4a6143dc1a..03a83238286867d6714cb732c608cc7468e669ac 100644 (file)
   ;; <http://debbugs.gnu.org/Packages.html>
   ;; <http://debbugs.gnu.org/cgi/pkgindex.cgi>
   :group 'debbugs-gnu
-  :type '(set (const "automake")
+  :type '(set (const "auctex")
+             (const "automake")
              (const "cc-mode")
              (const "coreutils")
              (const "cppi")
              (const "gzip")
              (const "idutils")
              (const "libtool")
-             (const "ns")
+             (const "mh-e")
              (const "org-mode")
              (const "parted")
              (const "vc-dwim")
-             (const "w32")
              (const "woodchuck"))
   :version "24.4")
 
@@ -956,7 +956,9 @@ Subject fields."
     (forward-line 1)))
 
 (defun debbugs-gnu-toggle-tag ()
-  "Toggle tag of the report in the current line."
+  "Toggle the local tag of the report in the current line.
+If a report is tagged locally, it is presumed to be of little
+interest to you."
   (interactive)
   (save-excursion
     (beginning-of-line)
@@ -969,9 +971,22 @@ Subject fields."
        (add-to-list 'debbugs-gnu-local-tags id)
        (put-text-property
         (+ (point) (- 5 (length (number-to-string id)))) (+ (point) 5)
-        'face 'debbugs-gnu-tagged))))
+        'face 'debbugs-gnu-tagged)
+       (debbugs-gnu--update-tag-face id))))
   (debbugs-gnu-dump-persistency-file))
 
+(defun debbugs-gnu--update-tag-face (id)
+  (dolist (entry tabulated-list-entries)
+    (when (equal (cdr (assq 'id (car entry))) id)
+      (aset (cadr entry) 0
+           (propertize
+            (format "%5d" id)
+            'face
+            ;; Mark tagged bugs.
+            (if (memq id debbugs-gnu-local-tags)
+                'debbugs-gnu-tagged
+              'default))))))
+
 (defun debbugs-gnu-toggle-suppress ()
   "Suppress bugs marked in `debbugs-gnu-suppress-bugs'."
   (interactive)