Article View: gnu.emacs.bug
Article #87521Font Lock mode & Makefile mode (Was: small additions to 19.27 elisps)
From: Simon Marshall
Date: Tue, 20 Sep 1994 09:05
Date: Tue, 20 Sep 1994 09:05
24 lines
1694 bytes
1694 bytes
Erez> I have a couple of additions. First, makefile-mode support for
Erez> font-locking. It's simple and does not consume too much resources
Erez> to fontify:
Thanks for the regexps. Here are some I've been using, based on Andreas
Ernst's, with input from you:
(defconst makefile-font-lock-keywords
'(;; Targets:
("^\\([^ \t#=\n:][^#=\n:]*\\):" 1 font-lock-function-name-face)
;; Variable definitions:
("\\<\\([a-zA-Z0-9_]+\\)[ \t]*=" 1 font-lock-variable-name-face)
;; Variable references even in targets/strings/comments:
("\\$[({]\\([a-zA-Z0-9_]+\\)[})]" 1 font-lock-reference-face t))
"Additional expressions to highlight in Makefile mode.")
Note that you will have to use different faces than
font-lock-variable-name-face and font-lock-reference-face. You should
also patch makefile.el so that ' is a quotation character in the syntax
table.
I'll submit my patches to font-lock.el and makefile.el some time.
Simon.
Technical Details
Message-ID:
<9409200905.AA13659@plod.esrin.esa.it>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!mail.ESrin.ESa.IT!Simon.MarshallShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,af3f5934e6befa6b,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-09-20 23:12:13 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!mail.ESrin.ESa.IT!Simon.Marshall From: Simon.Marshall@mail.ESrin.ESa.IT (Simon Marshall) Newsgroups: gnu.emacs.bug Subject: Font Lock mode & Makefile mode (Was: small additions to 19.27 elisps) Date: 20 Sep 1994 05:05:14 -0400 Organization: GNUs Not Usenet Lines: 24 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9409200905.AA13659@plod.esrin.esa.it>