Mercurial > emacs
annotate lisp/obsolete/awk-mode.el @ 64662:605f42af1c34
(my_set_window_pos, my_show_window): Don't declare.
(my_create_window, my_create_tip_window): Make static.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Thu, 28 Jul 2005 09:46:21 +0000 |
parents | 18a818a2ee7c |
children | 5b1a238fcbb4 f9a65d7ebd29 |
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 |
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
|
3 ;; Copyright (C) 1988,94,96,2000 Free Software Foundation, Inc. |
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
|
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
|
5 ;; 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
|
6 ;; 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
|
7 |
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 ;; 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
|
9 |
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 ;; 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
|
11 ;; 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
|
12 ;; 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
|
13 ;; 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
|
14 |
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 ;; 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
|
16 ;; 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
|
17 ;; 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
|
18 ;; 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
|
19 |
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 ;; 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
|
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
64085 | 22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
23 ;; 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
|
24 |
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 ;;; 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
|
26 |
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 ;; 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
|
28 ;; 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
|
29 |
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 ;;; 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
|
31 |
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 (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
|
33 (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
|
34 (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
|
35 (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
|
36 (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
|
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 ;; / 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
|
39 ;; 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
|
40 ;; `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
|
41 (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
|
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 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 "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
|
55 |
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 ;; 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
|
57 (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
|
58 (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
|
59 (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
|
60 ;; |
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 ;; 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
|
62 '("^[ \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
|
63 (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
|
64 ;; |
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 ;; 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
|
66 (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
|
67 '("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
|
68 "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
|
69 "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
|
70 '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
|
71 ;; |
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 ;; 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
|
73 (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
|
74 '("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
|
75 "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
|
76 ;; |
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 ;; 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
|
78 (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
|
79 '("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
|
80 "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
|
81 "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
|
82 "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
|
83 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
|
84 ;; |
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 ;; 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
|
86 (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
|
87 '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
|
88 )) |
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 "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
|
90 |
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 (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
|
92 |
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 (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
|
94 ;; `/' 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
|
95 ;; 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
|
96 ;; 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
|
97 ;; '(("\\(^\\|[<=>-+*%/!^,~(?:|&]\\)\\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
|
98 ;; (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
|
99 '(("[^<=>-+*%/!^,~(?:|& \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
|
100 (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
|
101 "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
|
102 |
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 ;; 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
|
104 (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
|
105 "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
|
106 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
|
107 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
|
108 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
|
109 |
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 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
|
111 (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
|
112 (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
|
113 (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
|
114 (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
|
115 (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
|
116 (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
|
117 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
|
118 (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
|
119 (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
|
120 . 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
|
121 |
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 (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
|
123 |
52401 | 124 ;;; 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
|
125 ;;; awk-mode.el ends here |