[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/debbugs c584de1b1b 1/2: Call 'tabulated-list-print-entr
From: |
Michael Albinus |
Subject: |
[elpa] externals/debbugs c584de1b1b 1/2: Call 'tabulated-list-print-entry' in 'debbugs-gnu-print-entry' |
Date: |
Sun, 18 Jun 2023 06:09:53 -0400 (EDT) |
branch: externals/debbugs
commit c584de1b1b7841b1c6d11d9badda2e890eb45c18
Author: Morgan Smith <Morgan.J.Smith@outlook.com>
Commit: Michael Albinus <michael.albinus@gmx.de>
Call 'tabulated-list-print-entry' in 'debbugs-gnu-print-entry'
Some of the features of 'tabulated-list' (tabulated-list-next-column,
tabulated-list-sort) didn't work properly because 'debbugs-gnu-print-entry'
didn't set the 'tabulated-list-column-name' text property. Instead of
trying
to duplicate code we can simply call 'tabulated-list-print-entry'.
* debbugs-gnu.el (debbugs-gnu-print-entry): Remove all printing logic
and replace with a call to 'tabulated-list-print-entry'. (Bug#64064)
---
debbugs-gnu.el | 40 ++--------------------------------------
1 file changed, 2 insertions(+), 38 deletions(-)
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 3feca518f6..d66a9eaecf 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1052,18 +1052,7 @@ are taken from the cache instead."
(defun debbugs-gnu-print-entry (list-id cols)
"Insert a debbugs entry at point.
Used instead of `tabulated-list-print-entry'."
- (let ((beg (point))
- (pos 0)
- (case-fold-search t)
- (id (aref cols 0))
- (id-length (nth 1 (aref tabulated-list-format 0)))
- (state (aref cols 1))
- (state-length (nth 1 (aref tabulated-list-format 1)))
- (submitter (aref cols 2))
- (submitter-length (nth 1 (aref tabulated-list-format 2)))
- (title (aref cols 3))
- ;; (title-length (nth 1 (aref tabulated-list-format 3)))
- )
+ (let ((case-fold-search t))
(when (and
;; We may have a narrowing in effect.
(or (not debbugs-gnu-limit)
@@ -1090,32 +1079,7 @@ Used instead of `tabulated-list-print-entry'."
(> (cddr check) val)))
(throw :suppress t))))))))
- ;; Insert id.
- (indent-to (- id-length (length id)))
- (insert id)
- ;; Insert state.
- (indent-to (setq pos (+ pos id-length 1)) 1)
- (insert (if (> (length state) state-length)
- (propertize (substring state 0 state-length)
- 'help-echo state)
- state))
- ;; Insert submitter.
- (indent-to (setq pos (+ pos state-length 1)) 1)
- (insert (if (> (length submitter) submitter-length)
- (propertize (substring submitter 0 submitter-length)
- 'help-echo submitter)
- submitter))
- (indent-to (+ pos (1- submitter-length)))
- ;; Insert title.
- (indent-to (setq pos (+ pos submitter-length 1)) 1)
- (insert (propertize title 'help-echo title))
- ;; Add properties.
- (add-text-properties
- beg (point)
- `(tabulated-list-id ,list-id
- tabulated-list-entry ,cols
- mouse-face highlight))
- (insert ?\n))))
+ (tabulated-list-print-entry list-id cols))))
(defun debbugs-gnu-menu-map-emacs-enabled ()
"Whether \"Show Release Blocking Bugs\" is enabled in the menu."