diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 2f7899ec51..7079eaad03 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -480,6 +480,11 @@ tabulated-list-print (forward-line 1) (delete-region old (point)))))) (setq entries (cdr entries))) + ;; Remove empty last line. + (save-excursion + (let ((inhibit-read-only t)) + (goto-char (point-max)) + (delete-char -1))) (set-buffer-modified-p nil) ;; If REMEMBER-POS was specified, move to the "old" location. (if saved-pt