[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#53771: 29.0.50; highlight-regexp not working after tabulated-list-co
From: |
Jean Louis |
Subject: |
bug#53771: 29.0.50; highlight-regexp not working after tabulated-list-col-sort |
Date: |
Sat, 5 Feb 2022 10:13:59 +0300 |
User-agent: |
Mutt/2.1.5+104 (cd3a5c8) (2022-01-09) |
* Lars Ingebrigtsen <larsi@gnus.org> [2022-02-05 09:49]:
> As the doc string says:
>
> ---
> Use Font lock mode, if enabled, to highlight REGEXP. Otherwise,
> use overlays for highlighting. If overlays are used, the
> highlighting will not update as you type. The Font Lock mode
> is considered "enabled" in a buffer if its ‘major-mode’
> causes ‘font-lock-specified-p’ to return non-nil, which means
> the major mode specifies support for Font Lock.
I wish to use the function highlight-regexp for reasons of
simplicity. The above description does not tell me HOW to use font
lock mode to highlight regexp.
I can see that font-lock-mode is T inthe buffer before and after
sorting. My understanding is that I am already using
font-lock-mode. It is enabled, and I cannot get highlighting.
Description such as "Use Font lock mode, if enabled, to highlight
REGEXP." with its "REGEXP" relates to the argument REGEXP. It is
related to the function. It tells little how is that supposed to work.
I have followed the above instructions by my (mis)understanding and
have specified `font-lock-specified-p' below, and after sorting I
still cannot invoke highlight-regexp neither with M-x neither by
evaluation.
Please, help me resolve this.
(define-derived-mode hyperscope-list-mode tabulated-list-mode "Hyperscope"
"Hyperscope mode"
(hyperscope-text-scale-adjust 'hyperscope-list-mode)
(let ((id-length (length (number-to-string (rcd-sql-first "SELECT
hyobjects_id FROM hyobjects ORDER BY hyobjects_id DESC LIMIT 1" hs-db)))))
(setq tabulated-list-format (vconcat (list (list "ID" id-length t
:right-align t))
(list (list "Hyperdocument" 70 t))
(list (list "Type" 12 t))
(list (list "Action" 9 t))))
(setq font-lock-specified-p t)
(setq tabulated-list-padding 1)
;; (setq tabulated-list-sort-key (cons "ID" nil))
(tabulated-list-init-header)))
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/