diff options
| -rw-r--r-- | lisp/emacs-lisp/package.el | 1 | ||||
| -rw-r--r-- | lisp/emacs-lisp/tabulated-list.el | 12 |
2 files changed, 8 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 4245294457f..2404ccd14e9 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -2751,6 +2751,7 @@ KEYWORDS should be nil or a list of keywords." | |||
| 2751 | (push pkg info-list)))))) | 2751 | (push pkg info-list)))))) |
| 2752 | 2752 | ||
| 2753 | ;; Print the result. | 2753 | ;; Print the result. |
| 2754 | (tabulated-list-init-header) | ||
| 2754 | (setq tabulated-list-entries | 2755 | (setq tabulated-list-entries |
| 2755 | (mapcar #'package-menu--print-info-simple info-list)))) | 2756 | (mapcar #'package-menu--print-info-simple info-list)))) |
| 2756 | 2757 | ||
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index f900354b3f2..6844c25b1aa 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el | |||
| @@ -191,11 +191,13 @@ Populated by `tabulated-list-init-header'.") | |||
| 191 | ;; line-number-display-width returns the value for the selected | 191 | ;; line-number-display-width returns the value for the selected |
| 192 | ;; window, which might not be the window in which the current buffer | 192 | ;; window, which might not be the window in which the current buffer |
| 193 | ;; is displayed. | 193 | ;; is displayed. |
| 194 | (let ((cbuf-window (get-buffer-window (current-buffer)))) | 194 | (if (not display-line-numbers) |
| 195 | (if (window-live-p cbuf-window) | 195 | 0 |
| 196 | (with-selected-window cbuf-window | 196 | (let ((cbuf-window (get-buffer-window (current-buffer)))) |
| 197 | (+ (line-number-display-width) 2)) | 197 | (if (window-live-p cbuf-window) |
| 198 | (if display-line-numbers 4 0)))) | 198 | (with-selected-window cbuf-window |
| 199 | (+ (line-number-display-width) 2)) | ||
| 200 | 4)))) | ||
| 199 | 201 | ||
| 200 | (defun tabulated-list-init-header () | 202 | (defun tabulated-list-init-header () |
| 201 | "Set up header line for the Tabulated List buffer." | 203 | "Set up header line for the Tabulated List buffer." |