summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>2019-06-25 18:09:54 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-06-25 18:09:54 +0200
commit9de1177a1ee788bc217cbd34350ed1dbba1a9c22 (patch)
tree304eddac8949d5a9c0e38bd9e1a9d2f246262da3
parent90c25b245259e99013dfb9292bea054a0ab4ffb6 (diff)
downloademacs-9de1177a1ee788bc217cbd34350ed1dbba1a9c22.tar.gz
emacs-9de1177a1ee788bc217cbd34350ed1dbba1a9c22.tar.bz2
emacs-9de1177a1ee788bc217cbd34350ed1dbba1a9c22.zip
Preserve header lines from derived modes in tabulated lists
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header): Preserve header line set by derived modes (bug#21025).
-rw-r--r--lisp/emacs-lisp/tabulated-list.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index 05ce6912e0f..5617992aae8 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -73,6 +73,11 @@ frames."
:type 'character
:version "27.1")
+(defface tabulated-list-fake-header
+ '((t :overline t :underline t :weight bold))
+ "Face used on fake header lines."
+ :version "27.1")
+
;; The reason `tabulated-list-format' and other variables are
;; permanent-local is to make it convenient to switch to a different
;; major mode, switch back, and have the original Tabulated List data
@@ -308,7 +313,6 @@ Populated by `tabulated-list-init-header'.")
(setq cols (apply 'concat (nreverse cols)))
(if tabulated-list-use-header-line
(setq header-line-format cols)
- (setq header-line-format nil)
(setq-local tabulated-list--header-string cols))))
(defun tabulated-list-print-fake-header ()
@@ -322,7 +326,8 @@ Do nothing if `tabulated-list--header-string' is nil."
(move-overlay tabulated-list--header-overlay (point-min) (point))
(setq-local tabulated-list--header-overlay
(make-overlay (point-min) (point))))
- (overlay-put tabulated-list--header-overlay 'face 'underline))))
+ (overlay-put tabulated-list--header-overlay
+ 'face 'tabulated-list-fake-header))))
(defsubst tabulated-list-header-overlay-p (&optional pos)
"Return non-nil if there is a fake header.