Mercurial > emacs
annotate lisp/obsolete/awk-mode.el @ 94357:5f0e2d26daed
(fortran-mode-syntax-table): Change `;' to punctuation now it's not
needed for abbrevs.
(fortran-mode-abbrev-table): Remove defvar, make use of new
define-abbrev-table :regexp feature.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 26 Apr 2008 02:33:47 +0000 |
parents | ee22366f2a68 |
children | 43d30a1ea764 |
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 |
74509 | 3 ;; Copyright (C) 1988, 1994, 1996, 2000, 2001, 2002, 2003, 2004, |
79715 | 4 ;; 2005, 2006, 2007, 2008 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 |
78228
1e016d63f292
Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents:
75447
diff
changeset
|
13 ;; the Free Software Foundation; either version 3, or (at your option) |
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
|
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 |
94000
ee22366f2a68
Add a comment giving version of obsolescence.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
28 ;; This file has been obsolete since Emacs 22.1. |
ee22366f2a68
Add a comment giving version of obsolescence.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
29 |
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
|
30 ;; 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
|
31 ;; 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
|
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 ;;; 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
|
34 |
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 (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
|
36 (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
|
37 (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
|
38 (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
|
39 (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
|
40 (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
|
41 ;; / 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
|
42 ;; 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
|
43 ;; `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
|
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 (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
|
55 (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
|
56 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
|
57 "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
|
58 |
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 ;; 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
|
60 (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
|
61 (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
|
62 (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
|
63 ;; |
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 ;; 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
|
65 '("^[ \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
|
66 (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
|
67 ;; |
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 ;; 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
|
69 (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
|
70 '("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
|
71 "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
|
72 "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
|
73 '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
|
74 ;; |
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 ;; 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
|
76 (regexp-opt |
75447
fbf156efcab2
(awk-font-lock-keywords): Add "do".
Richard M. Stallman <rms@gnu.org>
parents:
75347
diff
changeset
|
77 '("BEGIN" "END" "break" "continue" "delete" "do" "exit" "else" "for" |
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
|
78 "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
|
79 ;; |
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 ;; 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
|
81 (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
|
82 '("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
|
83 "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
|
84 "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
|
85 "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
|
86 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
|
87 ;; |
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 ;; 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
|
89 (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
|
90 '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
|
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 "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
|
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 (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
|
95 |
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 (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
|
97 ;; `/' 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
|
98 ;; 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
|
99 ;; 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
|
100 ;; '(("\\(^\\|[<=>-+*%/!^,~(?:|&]\\)\\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
|
101 ;; (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
|
102 '(("[^<=>-+*%/!^,~(?:|& \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
|
103 (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
|
104 "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
|
105 |
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 ;; 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
|
107 (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
|
108 "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
|
109 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
|
110 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
|
111 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
|
112 |
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 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
|
114 (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
|
115 (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
|
116 (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
|
117 (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
|
118 (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
|
119 (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
|
120 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
|
121 (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
|
122 (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
|
123 . 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
|
124 |
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
|
125 (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
|
126 |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
79715
diff
changeset
|
127 ;; 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
|
128 ;;; awk-mode.el ends here |