Mercurial > emacs
annotate lisp/obsolete/awk-mode.el @ 69705:296901e2dded
updated link(s)
author | Ramprasad B <ramprasad_i82@yahoo.com> |
---|---|
date | Tue, 28 Mar 2006 10:25:15 +0000 |
parents | e8a3fb527b77 |
children | f7702c5f335d c5406394f567 |
rev | line source |
---|---|
51955
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
1 ;;; awk-mode.el --- AWK code editing commands for Emacs |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
2 |
64751
5b1a238fcbb4
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
3 ;; Copyright (C) 1988, 1994, 1996, 2000, 2002, 2003, 2004, |
68640
e8a3fb527b77
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64751
diff
changeset
|
4 ;; 2005, 2006 Free Software Foundation, Inc. |
51955
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
5 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
6 ;; Maintainer: FSF |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
7 ;; Keywords: unix, languages |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
8 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
9 ;; This file is part of GNU Emacs. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
10 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
11 ;; GNU Emacs is free software; you can redistribute it and/or modify |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
12 ;; it under the terms of the GNU General Public License as published by |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
13 ;; the Free Software Foundation; either version 2, or (at your option) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
14 ;; any later version. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
15 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
16 ;; GNU Emacs is distributed in the hope that it will be useful, |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
19 ;; GNU General Public License for more details. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
20 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
21 ;; You should have received a copy of the GNU General Public License |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
64085 | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 ;; Boston, MA 02110-1301, USA. | |
51955
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
25 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
26 ;;; Commentary: |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
27 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
28 ;; Sets up C-mode with support for awk-style #-comments and a lightly |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
29 ;; hacked syntax table. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
30 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
31 ;;; Code: |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
32 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
33 (defvar awk-mode-syntax-table |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
34 (let ((st (make-syntax-table))) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
35 (modify-syntax-entry ?\\ "\\" st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
36 (modify-syntax-entry ?\n "> " st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
37 (modify-syntax-entry ?\f "> " st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
38 (modify-syntax-entry ?\# "< " st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
39 ;; / can delimit regexes or be a division operator. We assume that it is |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
40 ;; more commonly used for regexes and fix the remaining cases with |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
41 ;; `font-lock-syntactic-keywords'. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
42 (modify-syntax-entry ?/ "\"" st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
43 (modify-syntax-entry ?* "." st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
44 (modify-syntax-entry ?+ "." st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
45 (modify-syntax-entry ?- "." st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
46 (modify-syntax-entry ?= "." st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
47 (modify-syntax-entry ?% "." st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
48 (modify-syntax-entry ?< "." st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
49 (modify-syntax-entry ?> "." st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
50 (modify-syntax-entry ?& "." st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
51 (modify-syntax-entry ?| "." st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
52 (modify-syntax-entry ?_ "_" st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
53 (modify-syntax-entry ?\' "\"" st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
54 st) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
55 "Syntax table in use in `awk-mode' buffers.") |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
56 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
57 ;; Regexps written with help from Peter Galbraith <galbraith@mixing.qc.dfo.ca>. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
58 (defconst awk-font-lock-keywords |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
59 (eval-when-compile |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
60 (list |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
61 ;; |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
62 ;; Function names. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
63 '("^[ \t]*\\(function\\)\\>[ \t]*\\(\\sw+\\)?" |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
64 (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
65 ;; |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
66 ;; Variable names. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
67 (cons (regexp-opt |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
68 '("ARGC" "ARGIND" "ARGV" "CONVFMT" "ENVIRON" "ERRNO" |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
69 "FIELDWIDTHS" "FILENAME" "FNR" "FS" "IGNORECASE" "NF" "NR" |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
70 "OFMT" "OFS" "ORS" "RLENGTH" "RS" "RSTART" "SUBSEP") 'words) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
71 'font-lock-variable-name-face) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
72 ;; |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
73 ;; Keywords. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
74 (regexp-opt |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
75 '("BEGIN" "END" "break" "continue" "delete" "exit" "else" "for" |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
76 "getline" "if" "next" "print" "printf" "return" "while") 'words) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
77 ;; |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
78 ;; Builtins. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
79 (list (regexp-opt |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
80 '("atan2" "close" "cos" "ctime" "exp" "gsub" "index" "int" |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
81 "length" "log" "match" "rand" "sin" "split" "sprintf" |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
82 "sqrt" "srand" "sub" "substr" "system" "time" |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
83 "tolower" "toupper") 'words) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
84 1 'font-lock-builtin-face) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
85 ;; |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
86 ;; Operators. Is this too much? |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
87 (cons (regexp-opt '("&&" "||" "<=" "<" ">=" ">" "==" "!=" "!~" "~")) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
88 'font-lock-constant-face) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
89 )) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
90 "Default expressions to highlight in AWK mode.") |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
91 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
92 (require 'syntax) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
93 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
94 (defconst awk-font-lock-syntactic-keywords |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
95 ;; `/' is mostly used for /.../ regular expressions, but is also |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
96 ;; used as a division operator. Distinguishing between the two is |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
97 ;; a pain in the youknowwhat. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
98 ;; '(("\\(^\\|[<=>-+*%/!^,~(?:|&]\\)\\s-*\\(/\\)\\([^/\n\\]\\|\\\\.\\)*\\(/\\)" |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
99 ;; (2 "\"") (4 "\""))) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
100 '(("[^<=>-+*%/!^,~(?:|& \t\n\f]\\s-*\\(/\\)" |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
101 (1 (unless (nth 3 (syntax-ppss (match-beginning 1))) ".")))) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
102 "Syntactic keywords for `awk-mode'.") |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
103 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
104 ;; No longer autoloaded since it might clobber the autoload directive in CC Mode. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
105 (define-derived-mode awk-mode c-mode "AWK" |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
106 "Major mode for editing AWK code. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
107 This is much like C mode except for the syntax of comments. Its keymap |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
108 inherits from C mode's and it has the same variables for customizing |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
109 indentation. It has its own abbrev table and its own syntax table. |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
110 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
111 Turning on AWK mode runs `awk-mode-hook'." |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
112 (set (make-local-variable 'paragraph-start) (concat "$\\|" page-delimiter)) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
113 (set (make-local-variable 'paragraph-separate) paragraph-start) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
114 (set (make-local-variable 'comment-start) "# ") |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
115 (set (make-local-variable 'comment-end) "") |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
116 (set (make-local-variable 'comment-start-skip) "#+ *") |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
117 (setq font-lock-defaults '(awk-font-lock-keywords |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
118 nil nil ((?_ . "w")) nil |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
119 (parse-sexp-lookup-properties . t) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
120 (font-lock-syntactic-keywords |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
121 . awk-font-lock-syntactic-keywords)))) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
122 |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
123 (provide 'awk-mode) |
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
124 |
52401 | 125 ;;; arch-tag: 14ebc02a-b3c5-4e76-8034-6ca9ac0af0e6 |
51955
55e857ca3791
Obsoleted the old awk-mode.el package in favor of the AWK support in CC Mode.
Martin Stjernholm <mast@lysator.liu.se>
parents:
diff
changeset
|
126 ;;; awk-mode.el ends here |