Article View: gnu.emacs.bug
Article #87512small additions to 19.27 elisps
From: Erez Zadok, HWank1
Date: Mon, 19 Sep 1994 22:01
Date: Mon, 19 Sep 1994 22:01
64 lines
3033 bytes
3033 bytes
In GNU Emacs 19.27.1 (sparc-sun-solaris2, X toolkit) of Wed Sep 14 1994 on ober.cs.columbia.edu
I have a couple of additions. First, makefile-mode support for
font-locking. It's simple and does not consume too much resources to
fontify:
*** font-lock.el.orig Mon Sep 19 17:49:59 1994
--- font-lock.el Mon Sep 19 17:44:33 1994
***************
*** 687,692 ****
--- 687,701 ----
("^..d.* \\([^ ]+\\)$" 1 font-lock-keyword-face))
"Additional expressions to highlight in Dired mode.")
+ (defvar makefile-font-lock-keywords
+ (list
+ ;; highlight variables
+ '("^[ \t]*\\([a-zA-Z0-9_]+\\)[ \t]*=" 1 font-lock-string-face t)
+ ;; highlight targets
+ '("^\\([a-zA-Z0-9-_\.]+\\):" 1 font-lock-function-name-face t)
+ )
+ "Additional expressions to highlight in makefile mode.")
+
(defvar rmail-font-lock-keywords
'(;; Put From field in bold.
("^From: \\(.*\\)$" 1 font-lock-keyword-face)
***************
*** 732,737 ****
--- 741,747 ----
((eq major-mode 'texinfo-mode) texi-font-lock-keywords)
((eq major-mode 'shell-mode) shell-font-lock-keywords)
((eq major-mode 'dired-mode) dired-font-lock-keywords)
+ ((eq major-mode 'makefile-mode) makefile-font-lock-keywords)
((eq major-mode 'rmail-mode) rmail-font-lock-keywords)
((eq major-mode 'rmail-summary-mode)
rmail-summary-font-lock-keywords)
Secondly, I found that lisp/files.el does not provide default modes for some
extensions I commonly use. It would be nice if you could add the following:
(setq auto-mode-alist (append '(
("\\.sh$" . ksh-mode)
("\\.ksh$" . ksh-mode)
("\\.bash$" . ksh-mode)
("\\.S$" . S-mode)
("\\.otl$" . outline-mode)
("\\([Mm]\\|GNUm\\)akefile$" . makefile-mode)
("\\.pl$" . perl-mode)
("\\.ph$" . perl-mode)
)
auto-mode-alist))
Of course you might want to write better regexps than I did. Thanks for
considering these.
Erez Zadok.
Mobile Computing Lab.
Columbia University Department of Computer Science.
---
"A wank's morning starts one jiffy | Arpa: ezk@cs.columbia.edu
after midnight." | Usenet: ...!rutgers!columbia!cs!ezk
-HebrewWank #1 (US meaning, not UK!) | Bitnet: erzus@cuvmb.BITNET
Member of the League for Programming Freedom -- write to lpf@uunet.uu.net
Technical Details
Message-ID:
<199409192155.RAA29475@shekel.mcl.cs.columbia.edu>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!cs.columbia.edu!ezkShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,ddbcb52cce63be24,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-09-20 09:16:57 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!cs.columbia.edu!ezk From: ezk@cs.columbia.edu (Erez Zadok, HWank1) Newsgroups: gnu.emacs.bug Subject: small additions to 19.27 elisps Date: 19 Sep 1994 18:01:08 -0400 Organization: GNUs Not Usenet Lines: 64 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <199409192155.RAA29475@shekel.mcl.cs.columbia.edu>