From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Customize face according to extension
Date: Tue, 27 May 2008 21:33:17 -0600 [thread overview]
Message-ID: <g1ijpn$5lm$1@ger.gmane.org> (raw)
In-Reply-To: <871w3nyerk.fsf@literaturlatenight.de>
henry atting wrote:
> how can I customize the face of a file according to a certain suffix?
> Let's say the extension is *.nry, now I want to see all files with that
> extension listed in a specific colour in eshell or dired.
Check out this entry in dired-font-lock-keywords:
;; Files suffixed with `completion-ignored-extensions'.
'(eval .
;; It is quicker to first find just an extension, then go back to the
;; start of that file name. So we do this complex MATCH-ANCHORED
form.
(list (concat "\\(" (regexp-opt completion-ignored-extensions)
"\\|#\\)$")
'(".+" (dired-move-to-filename) nil (0 dired-ignored-face))))
That suggests you could define a new face and add a similar entry to
dired-font-lock-keywords that references it instead of
dired-ignored-face, for the simple regexp "\\.nry\\'".
--
Kevin Rodgers
Denver, Colorado, USA
next prev parent reply other threads:[~2008-05-28 3:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 14:59 Customize face according to extension henry atting
2008-05-28 3:33 ` Kevin Rodgers [this message]
2008-05-29 6:57 ` Kevin Rodgers
[not found] ` <mailman.12370.1212044415.18990.help-gnu-emacs@gnu.org>
2008-05-30 13:30 ` henry atting
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='g1ijpn$5lm$1@ger.gmane.org' \
--to=kevin.d.rodgers@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.