[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Dired - highlight the name of the directory in directory headers
From: |
Drew Adams |
Subject: |
RE: Dired - highlight the name of the directory in directory headers |
Date: |
Wed, 18 Nov 2020 15:08:51 -0800 (PST) |
> I thought it would be easy to highlight the name of the directory in
> directory headers in Dired buffers. For example:
>
> /home/bob/Notes:
> ^^^^^
> My first approach was to use font-lock-add-keywords:
>
> (font-lock-add-keywords 'dired-mode '("\\([^/]+\\):\n" . (1 'bold)))
>
> but try as I might I could not get this to work.
FWIW, Dired+ highlights this line (with face
`diredp-dir-heading') using this font-lock entry:
'("^ \\(.+:\\)$" 1 diredp-dir-heading) ; Directory headers
https://www.emacswiki.org/emacs/download/dired%2b.el