Mercurial > emacs
annotate lisp/obsolete/awk-mode.el @ 99602:c94ec53df9d8
* net/ange-ftp.el (ange-ftp-multi-msgs, ange-ftp-good-msgs)
(ange-ftp-try-passive-mode, ange-ftp-data-buffer-name)
(ange-ftp-account-hashtable, ange-ftp-ls-cache-lsargs)
(ange-ftp-ls-cache-file, ange-ftp-ls-cache-res, ange-ftp-get-user)
(ange-ftp-ftp-name-component, ange-ftp-kill-ftp-process)
(ange-ftp-quote-string, ange-ftp-process-handle-line)
(ange-ftp-start-process, ange-ftp-send-cmd, ange-ftp-add-dumb-unix-host)
(ange-ftp-before-parse-ls-hook, ange-ftp-after-parse-ls-hook)
(ange-ftp-ls, ange-ftp-add-dl-dir, ange-ftp-get-file-entry)
(ange-ftp-set-binary-mode, ange-ftp-set-ascii-mode, ange-ftp-get-pwd)
(ange-ftp-file-name-as-directory-alist, ange-ftp-reread-dir)
(ange-ftp-vms-filename-regexp, ange-ftp-bs2000-fix-name-regexp-reverse)
(ange-ftp-bs2000-fix-name-regexp): Fix typos in docstrings.
(ange-ftp-name-format, ange-ftp-gateway-fatal-msgs)
(ange-ftp-xfer-size-msgs, ange-ftp-tmp-name-template)
(ange-ftp-netrc-filename, ange-ftp-disable-netrc-security-check)
(ange-ftp-default-user, ange-ftp-default-password)
(ange-ftp-default-account, ange-ftp-netrc-default-password)
(ange-ftp-netrc-default-account, ange-ftp-dumb-unix-host-regexp)
(ange-ftp-binary-file-name-regexp, ange-ftp-gateway-host)
(ange-ftp-gateway-prompt-pattern, ange-ftp-smart-gateway-port)
(ange-ftp-send-hash, ange-ftp-binary-hash-mark-size)
(ange-ftp-ascii-hash-mark-size, ange-ftp-process-verbose)
(ange-ftp-ftp-program-name, ange-ftp-gateway-ftp-program-name)
(ange-ftp-ftp-program-args, ange-ftp-nslookup-program)
(ange-ftp-make-backup-files, ange-ftp-retry-time)
(ange-ftp-bs2000-special-prefix): Remove * from defcustom docstrings.
(ange-ftp-skip-msgs, ange-ftp-potential-error-msgs)
(ange-ftp-gateway-tmp-name-template)
(ange-ftp-generate-anonymous-password, ange-ftp-local-host-regexp)
(ange-ftp-gateway-program-interactive, ange-ftp-smart-gateway)
(ange-ftp-raw-login): Remove * from defcustom docstrings; fix typos.
(ange-ftp-fatal-msgs): Remove * from defcustom docstring; doc fix.
(ange-ftp-gateway-program): Remove * from docstring and reflow.
(ange-ftp-hash-entry-exists-p, ange-ftp-hash-table-keys)
(ange-ftp-raw-send-cmd, ange-ftp-get-files, ange-ftp-canonize-filename)
(ange-ftp-file-name-as-directory, ange-ftp-directory-file-name):
(ange-ftp-copy-files-async, ange-ftp-rename-remote-to-remote):
(ange-ftp-rename-local-to-remote): Doc fixes.
(ange-ftp-set-xfer-size, ange-ftp-call-cont, ange-ftp-process-filter):
Use `when', `unless'.
(ange-ftp-set-passwd): Rename arg PASSWD to PASSWORD.
(ange-ftp-process-handle-hash): Rename arg STR to STRING.
(ange-ftp-nslookup-host): Rename arg HOST to HOSTNAME.
(ange-ftp-smart-login): Rename arg PASS to PASSWORD.
(ange-ftp-normal-login): Rename arg PASS to PASSWORD. Fix typo.
(ange-ftp-process-sentinel): Use `when'. Fix typo.
(ange-ftp-gwp-start): Use `let', not `let*'; use `when'. Fix typo.
(ange-ftp-fix-name-func-alist, ange-ftp-fix-dir-name-func-alist)
(ange-ftp-parse-list-func-alist, ange-ftp-add-file-entry-alist)
(ange-ftp-delete-file-entry-alist): Fix typos and reflow docstring.
(ange-ftp-dumb-unix-host, ange-ftp-binary-file)
(ange-ftp-directory-files, ange-ftp-file-modtime, ange-ftp-vms-host)
(ange-ftp-mts-host, ange-ftp-cms-host, ange-ftp-bs2000-host)
(ange-ftp-bs2000-posix-host): Use `string-match-p' instead of
`(save-match-data (string-match ...))'.
(ange-ftp-use-gateway-p, ange-ftp-use-smart-gateway-p)
(ange-ftp-file-name-directory, ange-ftp-file-name-nondirectory):
Use `string-match-p' instead of `(save-match-data (string-match ...))'.
Doc fixes.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sun, 16 Nov 2008 05:50:23 +0000 |
parents | 43d30a1ea764 |
children | a9dc0e7c3f2b |
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 |
94667
43d30a1ea764
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94000
diff
changeset
|
11 ;; GNU Emacs is free software: you can redistribute it and/or modify |
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
|
12 ;; it under the terms of the GNU General Public License as published by |
94667
43d30a1ea764
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94000
diff
changeset
|
13 ;; the Free Software Foundation, either version 3 of the License, or |
43d30a1ea764
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94000
diff
changeset
|
14 ;; (at your option) any later version. |
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
|
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 |
94667
43d30a1ea764
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94000
diff
changeset
|
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
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
|
23 |
55e857ca3791
Obsoleted 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 ;;; 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
|
25 |
94000
ee22366f2a68
Add a comment giving version of obsolescence.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
26 ;; 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
|
27 |
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
|
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 |
75447
fbf156efcab2
(awk-font-lock-keywords): Add "do".
Richard M. Stallman <rms@gnu.org>
parents:
75347
diff
changeset
|
75 '("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
|
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 |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
79715
diff
changeset
|
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 |