diff options
Diffstat (limited to 'lisp/emacs-lisp')
-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." (push pkg info-list)))))) ;; Print the result. + (tabulated-list-init-header) (setq tabulated-list-entries (mapcar #'package-menu--print-info-simple info-list)))) 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'.") ;; line-number-display-width returns the value for the selected ;; window, which might not be the window in which the current buffer ;; is displayed. - (let ((cbuf-window (get-buffer-window (current-buffer)))) - (if (window-live-p cbuf-window) - (with-selected-window cbuf-window - (+ (line-number-display-width) 2)) - (if display-line-numbers 4 0)))) + (if (not display-line-numbers) + 0 + (let ((cbuf-window (get-buffer-window (current-buffer)))) + (if (window-live-p cbuf-window) + (with-selected-window cbuf-window + (+ (line-number-display-width) 2)) + 4)))) (defun tabulated-list-init-header () "Set up header line for the Tabulated List buffer." |