Fix unresolved implicit dependency of c_ppline.st state on c.st
[enscript.git] / states / hl / elisp.st
1 /**
2  * Name: elisp
3  * Description: Emacs LISP.
4  */
5
6 state elisp extends HighlightEntry
7 {
8   /* Comments. */
9   /;/ {
10     comment_face (true);
11     language_print ($0);
12     call (eat_one_line);
13     comment_face (false);
14   }
15
16   /* String constants. */
17   /\"/ {
18     string_face (true);
19     language_print ($0);
20     call (c_string);
21     string_face (false);
22   }
23
24   /* Definitions. */
25   /(\([ \t]*)(defun)([ \t]+\(?)([!\$%&\*\/:<=>\?~_^a-zA-Z][!\$%&\*\/:<=>\?~_^a-zA-Z0-9.+\-]*)/ {
26     /* Starting garbage. */
27     language_print ($1);
28
29     /* Keyword `defun'. */
30     keyword_face (true);
31     language_print ($2);
32     keyword_face (false);
33
34     /* Middle garbage. */
35     language_print ($3);
36
37     /* Function name. */
38     function_name_face (true);
39     language_print ($4);
40     function_name_face (false);
41   }
42
43   /* ':'-names, Emacs highlights these, so do we. */
44   /([ \t])(:[!\$%&\*\/:<=>\?~_^a-zA-Z0-9.+\-]*)/ {
45     language_print ($1);
46     reference_face (true);
47     language_print ($2);
48     reference_face (false);
49   }
50
51   /* Keywords taken out of fond-lock.el.  Added: and, or, lambda.
52      (build-re '(and or lambda cond if while let let* prog progn
53      progv prog1 prog2 prog* inline catch throw save-restriction
54      save-excursion save-window-excursion save-selected-window
55      save-match-data unwind-protect condition-case track-mouse
56      eval-after-load eval-and-compile eval-when-compile when
57      unless do flet labels return return-from with-output-to-temp-buffer
58      with-timeout))
59    */
60   /\b(and|c(atch|ond(|ition-case))|do\
61 |eval-(a(fter-load|nd-compile)|when-compile)|flet|i(f|nline)\
62 |l(a(bels|mbda)|et(|*))|or|prog(|*|1|2|n|v)|return(|-from)\
63 |save-(excursion|match-data|restriction|selected-window|window-excursion)\
64 |t(hrow|rack-mouse)|un(less|wind-protect)\
65 |w(h(en|ile)|ith-(output-to-temp-buffer|timeout)))\b/ {
66     keyword_face (true);
67     language_print ($0);
68     keyword_face (false);
69   }
70 }
71
72 \f
73 /*
74 Local variables:
75 mode: c
76 End:
77 */