unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Font locking for apt-sources.el
@ 2006-04-17 22:01 jiri.pejchal
  0 siblings, 0 replies; only message in thread
From: jiri.pejchal @ 2006-04-17 22:01 UTC (permalink / raw)


Hi,

I'm trying to improve font locking in apt-sources.el (available in
debian-el package).
What do think of the following code:


(defvar apt-sources-font-lock-keywords
  (list
   ;; Comments
   '("#.*$" . font-lock-comment-face)
   '("\\(^deb \\|^deb-src \\)" . font-lock-constant-face)
   '("\\(^deb \\|^deb-src
\\)\\(\\(http://\\|https://\\|ftp://\\|ssh://\\|rsh://copy://\\|cdrom:\\(\\[.*]\\)?\\|file:/\\)[^
\]+\\)" . (2 font-lock-variable-name-face))
   '("\\(^deb \\|^deb-src \\)\\([^ ]+\\|\\(cdrom:\\[.*][^ ]\\)\\)
\\(\\(experimental\\|unstable\\|testing\\|stable\\|etch\\|\woody\\sarge\\|sid\\|\\(\\(warty\\|hoary\\|breezy\\|dapper\\)\\(-updates\\|-security\\)?\\)\\)\\(/[^
\n]*\\)*\\)\\( \\|$\\)"\ . (4 font-lock-type-face))
   '("\\(^deb \\|^deb-src \\)\\([^ \n]+ \\)\\{2,\\}\\(main\\(
\\|$\\)\\)" . (3 font-lock-keyword-face))
   '("\\(^deb \\|^deb-src \\)\\([^ \n]+ \\)\\{2,\\}\\(contrib\\(
\\|$\\)\\)" . (3 font-lock-keyword-face))
   '("\\(^deb \\|^deb-src \\)\\([^ \n]+ \\)\\{2,\\}\\(non-free\\(
\\|$\\)\\)" . (3 font-lock-keyword-face))
   '("\\(^deb \\|^deb-src \\)\\([^ \n]+ \\)\\{2,\\}\\(restricted\\(
\\|$\\)\\)" . (3 font-lock-keyword-face))
   '("\\(^deb \\|^deb-src \\)\\([^ \n]+ \\)\\{2,\\}\\(universe\\(
\\|$\\)\\)" . (3 font-lock-keyword-face))
   '("\\(^deb \\|^deb-src \\)\\([^ \n]+ \\)\\{2,\\}\\(multiverse\\(
\\|$\\)\\)" . (3 font-lock-keyword-face))
)

--
Jiri Pejchal

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-17 22:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-17 22:01 Font locking for apt-sources.el jiri.pejchal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).