diff options
| author | Peter Breton | 1999-10-16 03:59:43 +0000 |
|---|---|---|
| committer | Peter Breton | 1999-10-16 03:59:43 +0000 |
| commit | ffe0c7efca0083b6d680b3cd43683f7297cfc530 (patch) | |
| tree | 07caead8e2d509be9e8c6dc6847413f8ef2a4b7c | |
| parent | 83346ee87bc410e02d33b3bb45bc233bfc3a1b9c (diff) | |
| download | emacs-ffe0c7efca0083b6d680b3cd43683f7297cfc530.tar.gz emacs-ffe0c7efca0083b6d680b3cd43683f7297cfc530.zip | |
Added new InstallShield keywords.
Change font-lock-reference-face to font-lock-constant-face throughout.
(resolve-conf-generic-mode): Added this mode.
(named-database-generic-mode): Added this mode.
(named-boot-generic-mode): Added this mode.
(apache-conf-generic-mode): Added Directories and Locations to imenu-generic-expression.
(generic-define-mswindows-modes): Added apache-conf-generic-mode and apache-log-generic-mode.
(generic-define-unix-modes): Added apache-conf-generic-mode and apache-log-generic-mode.
(apache-conf-generic-mode): This new mode replaces apache-generic-mode.
(apache-log-generic-mode): Added this generic-mode
| -rw-r--r-- | lisp/generic-x.el | 553 |
1 files changed, 410 insertions, 143 deletions
diff --git a/lisp/generic-x.el b/lisp/generic-x.el index fb723553d58..706c985d52a 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | ;;; Commentary: | 26 | ;;; Commentary: |
| 27 | ;; | 27 | ;; |
| 28 | ;; This file contains some pre-defined generic-modes. | 28 | ;; This file contains some pre-defined generic-modes. |
| 29 | ;; | 29 | ;; |
| 30 | ;; INSTALLATION: | 30 | ;; INSTALLATION: |
| 31 | ;; | 31 | ;; |
| 32 | ;; Add this line to your .emacs file: | 32 | ;; Add this line to your .emacs file: |
| @@ -37,7 +37,7 @@ | |||
| 37 | ;; `generic-extras-enable-list'. Some platform-specific modes are | 37 | ;; `generic-extras-enable-list'. Some platform-specific modes are |
| 38 | ;; affected by the variables `generic-define-mswindows-modes' and | 38 | ;; affected by the variables `generic-define-mswindows-modes' and |
| 39 | ;; `generic-define-unix-modes' (which see). | 39 | ;; `generic-define-unix-modes' (which see). |
| 40 | ;; | 40 | ;; |
| 41 | ;; You can also send in new modes; if the file types a reasonably common, | 41 | ;; You can also send in new modes; if the file types a reasonably common, |
| 42 | ;; we would like to install them. | 42 | ;; we would like to install them. |
| 43 | ;; | 43 | ;; |
| @@ -48,17 +48,17 @@ | |||
| 48 | ;; Love] | 48 | ;; Love] |
| 49 | ;; | 49 | ;; |
| 50 | ;; From Anders Lindgren <andersl@csd.uu.se> | 50 | ;; From Anders Lindgren <andersl@csd.uu.se> |
| 51 | ;; | 51 | ;; |
| 52 | ;; Problem summary: Wayne Adams has found a problem when using folding | 52 | ;; Problem summary: Wayne Adams has found a problem when using folding |
| 53 | ;; mode in conjuction with font-lock for a mode defined in | 53 | ;; mode in conjuction with font-lock for a mode defined in |
| 54 | ;; `generic-x.el'. | 54 | ;; `generic-x.el'. |
| 55 | ;; | 55 | ;; |
| 56 | ;; The problem, as Wayne described it, was that error messages of the | 56 | ;; The problem, as Wayne described it, was that error messages of the |
| 57 | ;; following form appeared when both font-lock and folding are used: | 57 | ;; following form appeared when both font-lock and folding are used: |
| 58 | ;; | 58 | ;; |
| 59 | ;; > - various msgs including "Fontifying region...(error Stack | 59 | ;; > - various msgs including "Fontifying region...(error Stack |
| 60 | ;; > overflow in regexp matcher)" appear | 60 | ;; > overflow in regexp matcher)" appear |
| 61 | ;; | 61 | ;; |
| 62 | ;; I have just tracked down the cause of the problem. The regexp:s in | 62 | ;; I have just tracked down the cause of the problem. The regexp:s in |
| 63 | ;; `generic-x.el' does not take into account the way that folding | 63 | ;; `generic-x.el' does not take into account the way that folding |
| 64 | ;; hides sections of the buffer. The technique is known as | 64 | ;; hides sections of the buffer. The technique is known as |
| @@ -66,26 +66,26 @@ | |||
| 66 | ;; started using it back in the good old' Emacs 18 days). Basically, a | 66 | ;; started using it back in the good old' Emacs 18 days). Basically, a |
| 67 | ;; section is hidden by creating one very long line were the newline | 67 | ;; section is hidden by creating one very long line were the newline |
| 68 | ;; character (C-j) is replaced by a linefeed (C-m) character. | 68 | ;; character (C-j) is replaced by a linefeed (C-m) character. |
| 69 | ;; | 69 | ;; |
| 70 | ;; Many other hiding packages, besides folding, use the same technique, | 70 | ;; Many other hiding packages, besides folding, use the same technique, |
| 71 | ;; the problem should occur when using them as well. | 71 | ;; the problem should occur when using them as well. |
| 72 | ;; | 72 | ;; |
| 73 | ;; The erroronous lines in `generic-extras' look like the following (this | 73 | ;; The erroronous lines in `generic-extras' look like the following (this |
| 74 | ;; example is from the `ini' section): | 74 | ;; example is from the `ini' section): |
| 75 | ;; | 75 | ;; |
| 76 | ;; '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face) | 76 | ;; '(("^\\(\\[.*\\]\\)" 1 'font-lock-constant-face) |
| 77 | ;; ("^\\(.*\\)=" 1 'font-lock-variable-name-face) | 77 | ;; ("^\\(.*\\)=" 1 'font-lock-variable-name-face) |
| 78 | ;; | 78 | ;; |
| 79 | ;; The intention of these lines is to highlight lines of the following | 79 | ;; The intention of these lines is to highlight lines of the following |
| 80 | ;; form: | 80 | ;; form: |
| 81 | ;; | 81 | ;; |
| 82 | ;; [foo] | 82 | ;; [foo] |
| 83 | ;; bar = xxx | 83 | ;; bar = xxx |
| 84 | ;; | 84 | ;; |
| 85 | ;; However, since the `.' regexp symbol match the linefeed character the | 85 | ;; However, since the `.' regexp symbol match the linefeed character the |
| 86 | ;; entire folded section is searched, resulting in a regexp stack | 86 | ;; entire folded section is searched, resulting in a regexp stack |
| 87 | ;; overflow. | 87 | ;; overflow. |
| 88 | ;; | 88 | ;; |
| 89 | ;; Solution suggestion 2: Instead of using ".", use the sequence | 89 | ;; Solution suggestion 2: Instead of using ".", use the sequence |
| 90 | ;; "[^\n\r]". This will make the rules behave just as before, but they | 90 | ;; "[^\n\r]". This will make the rules behave just as before, but they |
| 91 | ;; will work together with selective-display. | 91 | ;; will work together with selective-display. |
| @@ -106,13 +106,13 @@ | |||
| 106 | Each entry in the list should be a symbol. | 106 | Each entry in the list should be a symbol. |
| 107 | The variables `generic-define-mswindows-modes' and `generic-define-unix-modes' | 107 | The variables `generic-define-mswindows-modes' and `generic-define-unix-modes' |
| 108 | also affect which generic modes are defined. | 108 | also affect which generic modes are defined. |
| 109 | Please note that if you set this variable after generic-x is loaded, | 109 | Please note that if you set this variable after generic-x is loaded, |
| 110 | you must reload generic-x to enable the specified modes." | 110 | you must reload generic-x to enable the specified modes." |
| 111 | :group 'generic-x | 111 | :group 'generic-x |
| 112 | :type '(repeat sexp) | 112 | :type '(repeat sexp) |
| 113 | ) | 113 | ) |
| 114 | 114 | ||
| 115 | (defcustom generic-define-mswindows-modes | 115 | (defcustom generic-define-mswindows-modes |
| 116 | (memq system-type (list 'windows-nt 'ms-dos)) | 116 | (memq system-type (list 'windows-nt 'ms-dos)) |
| 117 | "*If non-nil, some MS-Windows specific generic modes will be defined." | 117 | "*If non-nil, some MS-Windows specific generic modes will be defined." |
| 118 | :group 'generic-x | 118 | :group 'generic-x |
| @@ -128,21 +128,27 @@ you must reload generic-x to enable the specified modes." | |||
| 128 | 128 | ||
| 129 | (and generic-define-mswindows-modes | 129 | (and generic-define-mswindows-modes |
| 130 | (setq generic-extras-enable-list | 130 | (setq generic-extras-enable-list |
| 131 | (append (list 'bat-generic-mode 'ini-generic-mode | 131 | (append (list 'bat-generic-mode 'ini-generic-mode |
| 132 | 'inf-generic-mode 'rc-generic-mode | 132 | 'inf-generic-mode 'rc-generic-mode |
| 133 | 'reg-generic-mode 'rul-generic-mode | 133 | 'reg-generic-mode 'rul-generic-mode |
| 134 | 'hosts-generic-mode 'apache-generic-mode) | 134 | 'hosts-generic-mode |
| 135 | 'apache-conf-generic-mode | ||
| 136 | 'apache-log-generic-mode | ||
| 137 | ) | ||
| 135 | generic-extras-enable-list))) | 138 | generic-extras-enable-list))) |
| 136 | 139 | ||
| 137 | (and generic-define-unix-modes | 140 | (and generic-define-unix-modes |
| 138 | (setq generic-extras-enable-list | 141 | (setq generic-extras-enable-list |
| 139 | (append (list 'apache-generic-mode 'samba-generic-mode | 142 | (append (list 'apache-conf-generic-mode |
| 140 | 'hosts-generic-mode 'fvwm-generic-mode | 143 | 'apache-log-generic-mode |
| 141 | 'x-resource-generic-mode | 144 | 'samba-generic-mode |
| 145 | 'hosts-generic-mode 'fvwm-generic-mode | ||
| 146 | 'x-resource-generic-mode | ||
| 142 | 'alias-generic-mode | 147 | 'alias-generic-mode |
| 143 | 'inetd-conf-generic-mode | 148 | 'inetd-conf-generic-mode |
| 144 | 'etc-services-generic-mode | 149 | 'etc-services-generic-mode |
| 145 | 'etc-passwd-generic-mode | 150 | 'etc-passwd-generic-mode |
| 151 | 'etc-fstab-generic-mode | ||
| 146 | ) | 152 | ) |
| 147 | generic-extras-enable-list))) | 153 | generic-extras-enable-list))) |
| 148 | 154 | ||
| @@ -151,32 +157,50 @@ you must reload generic-x to enable the specified modes." | |||
| 151 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 157 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 152 | 158 | ||
| 153 | ;;; Apache | 159 | ;;; Apache |
| 154 | (and | 160 | (and |
| 155 | (memq 'apache-generic-mode generic-extras-enable-list) | 161 | (memq 'apache-conf-generic-mode generic-extras-enable-list) |
| 156 | 162 | ||
| 157 | (define-generic-mode 'apache-generic-mode | 163 | (define-generic-mode 'apache-conf-generic-mode |
| 158 | (list ?#) | 164 | (list ?#) |
| 159 | nil | 165 | nil |
| 160 | '(("^\\(<.*>\\)" 1 'font-lock-reference-face) | 166 | '(("^\\(<.*>\\)" 1 'font-lock-constant-face) |
| 161 | ("^\\(\\sw+\\)\\s-" 1 'font-lock-variable-name-face)) | 167 | ("^\\(\\sw+\\)\\s-" 1 'font-lock-variable-name-face)) |
| 162 | (list "srm\\.conf\\'" "httpd\\.conf\\'" "access\\.conf\\'") | 168 | (list "srm\\.conf\\'" "httpd\\.conf\\'" "access\\.conf\\'") |
| 163 | (list | 169 | (list |
| 164 | (function | 170 | (function |
| 165 | (lambda () | 171 | (lambda () |
| 166 | (setq imenu-generic-expression | 172 | (setq imenu-generic-expression |
| 167 | '((nil "^\\([-A-Za-z0-9_]+\\)" 1))) | 173 | '((nil "^\\([-A-Za-z0-9_]+\\)" 1) |
| 174 | ("*Directories*" "^\\s-*<Directory\\s-*\\([^>]+\\)>" 1) | ||
| 175 | ("*Locations*" "^\\s-*<Location\\s-*\\([^>]+\\)>" 1) | ||
| 176 | )) | ||
| 168 | ))) | 177 | ))) |
| 169 | "Generic mode for Apache or HTTPD configuration files.")) | 178 | "Generic mode for Apache or HTTPD configuration files.")) |
| 170 | 179 | ||
| 180 | (and | ||
| 181 | (memq 'apache-log-generic-mode generic-extras-enable-list) | ||
| 182 | |||
| 183 | (define-generic-mode 'apache-log-generic-mode | ||
| 184 | nil | ||
| 185 | nil | ||
| 186 | ;; Hostname ? user date request return-code number-of-bytes | ||
| 187 | '(("^\\([-a-zA-z0-9.]+\\) - [-A-Za-z]+ \\(\\[.*\\]\\)" | ||
| 188 | (1 font-lock-constant-face) | ||
| 189 | (2 font-lock-variable-name-face)) | ||
| 190 | ) | ||
| 191 | (list "access_log\\'") | ||
| 192 | nil | ||
| 193 | "Mode for Apache log files")) | ||
| 194 | |||
| 171 | ;;; Samba | 195 | ;;; Samba |
| 172 | (and | 196 | (and |
| 173 | (memq 'samba-generic-mode generic-extras-enable-list) | 197 | (memq 'samba-generic-mode generic-extras-enable-list) |
| 174 | 198 | ||
| 175 | (define-generic-mode 'samba-generic-mode | 199 | (define-generic-mode 'samba-generic-mode |
| 176 | (list ?\; ?#) | 200 | (list ?\; ?#) |
| 177 | nil | 201 | nil |
| 178 | '( | 202 | '( |
| 179 | ("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face) | 203 | ("^\\(\\[.*\\]\\)" 1 'font-lock-constant-face) |
| 180 | ("^\\s-*\\(.+\\)=\\([^\r\n]*\\)" | 204 | ("^\\s-*\\(.+\\)=\\([^\r\n]*\\)" |
| 181 | (1 'font-lock-variable-name-face) | 205 | (1 'font-lock-variable-name-face) |
| 182 | (2 'font-lock-type-face)) | 206 | (2 'font-lock-type-face)) |
| @@ -188,25 +212,25 @@ you must reload generic-x to enable the specified modes." | |||
| 188 | ;;; Fvwm | 212 | ;;; Fvwm |
| 189 | ;; This is pretty basic. Also, modes for other window managers could | 213 | ;; This is pretty basic. Also, modes for other window managers could |
| 190 | ;; be defined as well. | 214 | ;; be defined as well. |
| 191 | (and | 215 | (and |
| 192 | (memq 'fvwm-generic-mode generic-extras-enable-list) | 216 | (memq 'fvwm-generic-mode generic-extras-enable-list) |
| 193 | 217 | ||
| 194 | (define-generic-mode 'fvwm-generic-mode | 218 | (define-generic-mode 'fvwm-generic-mode |
| 195 | (list ?#) | 219 | (list ?#) |
| 196 | (list | 220 | (list |
| 197 | "AddToMenu" | 221 | "AddToMenu" |
| 198 | "AddToFunc" | 222 | "AddToFunc" |
| 199 | "ButtonStyle" | 223 | "ButtonStyle" |
| 200 | "EndFunction" | 224 | "EndFunction" |
| 201 | "EndPopup" | 225 | "EndPopup" |
| 202 | "Function" | 226 | "Function" |
| 203 | "IconPath" | 227 | "IconPath" |
| 204 | "Key" | 228 | "Key" |
| 205 | "ModulePath" | 229 | "ModulePath" |
| 206 | "Mouse" | 230 | "Mouse" |
| 207 | "PixmapPath" | 231 | "PixmapPath" |
| 208 | "Popup" | 232 | "Popup" |
| 209 | "Style" | 233 | "Style" |
| 210 | ) | 234 | ) |
| 211 | nil | 235 | nil |
| 212 | (list "\\.fvwmrc\\'" "\\.fvwm2rc\\'") | 236 | (list "\\.fvwmrc\\'" "\\.fvwm2rc\\'") |
| @@ -216,58 +240,58 @@ you must reload generic-x to enable the specified modes." | |||
| 216 | ;;; X Resource | 240 | ;;; X Resource |
| 217 | ;; I'm pretty sure I've seen an actual mode to do this, but I don't | 241 | ;; I'm pretty sure I've seen an actual mode to do this, but I don't |
| 218 | ;; think it's standard with Emacs | 242 | ;; think it's standard with Emacs |
| 219 | (and | 243 | (and |
| 220 | (memq 'x-resource-generic-mode generic-extras-enable-list) | 244 | (memq 'x-resource-generic-mode generic-extras-enable-list) |
| 221 | 245 | ||
| 222 | (define-generic-mode 'x-resource-generic-mode | 246 | (define-generic-mode 'x-resource-generic-mode |
| 223 | (list ?!) | 247 | (list ?!) |
| 224 | nil | 248 | nil |
| 225 | '(("^\\([^:\n]+:\\)" 1 'font-lock-variable-name-face)) | 249 | '(("^\\([^:\n]+:\\)" 1 'font-lock-variable-name-face)) |
| 226 | (list "\\.Xdefaults\\'" "\\.Xresources\\'") | 250 | (list "\\.Xdefaults\\'" "\\.Xresources\\'" "\\.Xenvironment\\'" "\\.ad\\'") |
| 227 | nil | 251 | nil |
| 228 | "Generic mode for X Resource configuration files.")) | 252 | "Generic mode for X Resource configuration files.")) |
| 229 | 253 | ||
| 230 | ;;; Hosts | 254 | ;;; Hosts |
| 231 | (and | 255 | (and |
| 232 | (memq 'hosts-generic-mode generic-extras-enable-list) | 256 | (memq 'hosts-generic-mode generic-extras-enable-list) |
| 233 | 257 | ||
| 234 | (define-generic-mode 'hosts-generic-mode | 258 | (define-generic-mode 'hosts-generic-mode |
| 235 | (list ?#) | 259 | (list ?#) |
| 236 | (list "localhost") | 260 | (list "localhost") |
| 237 | '(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 'font-lock-reference-face)) | 261 | '(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 'font-lock-constant-face)) |
| 238 | (list "[hH][oO][sS][tT][sS]\\'") | 262 | (list "[hH][oO][sS][tT][sS]\\'") |
| 239 | nil | 263 | nil |
| 240 | "Generic mode for HOSTS files.")) | 264 | "Generic mode for HOSTS files.")) |
| 241 | 265 | ||
| 242 | ;;; Windows INF files | 266 | ;;; Windows INF files |
| 243 | (and | 267 | (and |
| 244 | (memq 'inf-generic-mode generic-extras-enable-list) | 268 | (memq 'inf-generic-mode generic-extras-enable-list) |
| 245 | 269 | ||
| 246 | (define-generic-mode 'inf-generic-mode | 270 | (define-generic-mode 'inf-generic-mode |
| 247 | (list ?\;) | 271 | (list ?\;) |
| 248 | nil | 272 | nil |
| 249 | '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face)) | 273 | '(("^\\(\\[.*\\]\\)" 1 'font-lock-constant-face)) |
| 250 | (list "\\.[iI][nN][fF]\\'") | 274 | (list "\\.[iI][nN][fF]\\'") |
| 251 | (list 'generic-bracket-support) | 275 | (list 'generic-bracket-support) |
| 252 | "Generic mode for MS-Windows INF files.")) | 276 | "Generic mode for MS-Windows INF files.")) |
| 253 | 277 | ||
| 254 | ;;; Windows INI files | 278 | ;;; Windows INI files |
| 255 | ;; Should define escape character as well! | 279 | ;; Should define escape character as well! |
| 256 | (and | 280 | (and |
| 257 | (memq 'ini-generic-mode generic-extras-enable-list) | 281 | (memq 'ini-generic-mode generic-extras-enable-list) |
| 258 | 282 | ||
| 259 | (define-generic-mode 'ini-generic-mode | 283 | (define-generic-mode 'ini-generic-mode |
| 260 | (list ?\;) | 284 | (list ?\;) |
| 261 | nil | 285 | nil |
| 262 | '(("^\\(\\[.*\\]\\)" 1 'font-lock-reference-face) | 286 | '(("^\\(\\[.*\\]\\)" 1 'font-lock-constant-face) |
| 263 | ("^\\([^=\n\r]*\\)=\\([^\n\r]*\\)$" | 287 | ("^\\([^=\n\r]*\\)=\\([^\n\r]*\\)$" |
| 264 | (1 font-lock-function-name-face) | 288 | (1 font-lock-function-name-face) |
| 265 | (2 font-lock-variable-name-face))) | 289 | (2 font-lock-variable-name-face))) |
| 266 | (list "\\.[iI][nN][iI]\\'") | 290 | (list "\\.[iI][nN][iI]\\'") |
| 267 | (list | 291 | (list |
| 268 | (function | 292 | (function |
| 269 | (lambda () | 293 | (lambda () |
| 270 | (setq imenu-generic-expression | 294 | (setq imenu-generic-expression |
| 271 | '((nil "^\\[\\(.*\\)\\]" 1) | 295 | '((nil "^\\[\\(.*\\)\\]" 1) |
| 272 | ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1))) | 296 | ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1))) |
| 273 | ))) | 297 | ))) |
| @@ -275,19 +299,19 @@ you must reload generic-x to enable the specified modes." | |||
| 275 | 299 | ||
| 276 | ;;; Windows REG files | 300 | ;;; Windows REG files |
| 277 | ;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax! | 301 | ;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax! |
| 278 | (and | 302 | (and |
| 279 | (memq 'reg-generic-mode generic-extras-enable-list) | 303 | (memq 'reg-generic-mode generic-extras-enable-list) |
| 280 | 304 | ||
| 281 | (define-generic-mode 'reg-generic-mode | 305 | (define-generic-mode 'reg-generic-mode |
| 282 | '(?\;) | 306 | '(?\;) |
| 283 | '("key" "classes_root" "REGEDIT" "REGEDIT4") | 307 | '("key" "classes_root" "REGEDIT" "REGEDIT4") |
| 284 | '(("\\(\\[.*]\\)" 1 'font-lock-reference-face) | 308 | '(("\\(\\[.*]\\)" 1 'font-lock-constant-face) |
| 285 | ("^\\([^\n\r]*\\)\\s-*=" 1 'font-lock-variable-name-face)) | 309 | ("^\\([^\n\r]*\\)\\s-*=" 1 'font-lock-variable-name-face)) |
| 286 | '("\\.[rR][eE][gG]\\'") | 310 | '("\\.[rR][eE][gG]\\'") |
| 287 | (list | 311 | (list |
| 288 | (function | 312 | (function |
| 289 | (lambda () | 313 | (lambda () |
| 290 | (setq imenu-generic-expression | 314 | (setq imenu-generic-expression |
| 291 | '((nil "^\\s-*\\(.*\\)\\s-*=" 1)))))) | 315 | '((nil "^\\s-*\\(.*\\)\\s-*=" 1)))))) |
| 292 | "Generic mode for MS-Windows Registry files.")) | 316 | "Generic mode for MS-Windows Registry files.")) |
| 293 | 317 | ||
| @@ -358,13 +382,13 @@ you must reload generic-x to enable the specified modes." | |||
| 358 | (list "\\(%[0-9]\\)" 1 'font-lock-variable-name-face t) | 382 | (list "\\(%[0-9]\\)" 1 'font-lock-variable-name-face t) |
| 359 | (list "\\(/[^/ \"\t\n]+\\)" 1 'font-lock-type-face) | 383 | (list "\\(/[^/ \"\t\n]+\\)" 1 'font-lock-type-face) |
| 360 | (list "[\t ]+\\([+-][^\t\n\" ]+\\)" 1 'font-lock-type-face) | 384 | (list "[\t ]+\\([+-][^\t\n\" ]+\\)" 1 'font-lock-type-face) |
| 361 | (list "[ \t\n|]\\<\\([gG][oO][tT][oO]\\)\\>[ \t]*\\(\\sw+\\)?" | 385 | (list "[ \t\n|]\\<\\([gG][oO][tT][oO]\\)\\>[ \t]*\\(\\sw+\\)?" |
| 362 | '(1 font-lock-keyword-face) | 386 | '(1 font-lock-keyword-face) |
| 363 | '(2 font-lock-function-name-face nil t)) | 387 | '(2 font-lock-function-name-face nil t)) |
| 364 | (list "[ \t\n|]\\<\\([sS][eE][tT]\\)\\>[ \t]*\\(\\sw+\\)?[ \t]*=?" | 388 | (list "[ \t\n|]\\<\\([sS][eE][tT]\\)\\>[ \t]*\\(\\sw+\\)?[ \t]*=?" |
| 365 | '(1 font-lock-builtin-face) | 389 | '(1 font-lock-builtin-face) |
| 366 | '(2 font-lock-variable-name-face t t)) | 390 | '(2 font-lock-variable-name-face t t)) |
| 367 | 391 | ||
| 368 | ) | 392 | ) |
| 369 | (list | 393 | (list |
| 370 | "\\.[bB][aA][tT]\\'" | 394 | "\\.[bB][aA][tT]\\'" |
| @@ -375,13 +399,13 @@ you must reload generic-x to enable the specified modes." | |||
| 375 | 399 | ||
| 376 | (defvar bat-generic-mode-syntax-table nil | 400 | (defvar bat-generic-mode-syntax-table nil |
| 377 | "Syntax table in use in bat-generic-mode buffers.") | 401 | "Syntax table in use in bat-generic-mode buffers.") |
| 378 | 402 | ||
| 379 | ;; Make underscores count as words | 403 | ;; Make underscores count as words |
| 380 | (if bat-generic-mode-syntax-table | 404 | (if bat-generic-mode-syntax-table |
| 381 | nil | 405 | nil |
| 382 | (setq bat-generic-mode-syntax-table (make-syntax-table)) | 406 | (setq bat-generic-mode-syntax-table (make-syntax-table)) |
| 383 | (modify-syntax-entry ?_ "w" bat-generic-mode-syntax-table)) | 407 | (modify-syntax-entry ?_ "w" bat-generic-mode-syntax-table)) |
| 384 | 408 | ||
| 385 | ;; bat-generic-mode doesn't use the comment functionality of generic-mode | 409 | ;; bat-generic-mode doesn't use the comment functionality of generic-mode |
| 386 | ;; because it has a three-letter comment-string, so we do it | 410 | ;; because it has a three-letter comment-string, so we do it |
| 387 | ;; here manually instead | 411 | ;; here manually instead |
| @@ -405,26 +429,26 @@ you must reload generic-x to enable the specified modes." | |||
| 405 | ;;; Mailagent | 429 | ;;; Mailagent |
| 406 | ;; Mailagent is a Unix mail filtering program. Anyone wanna do a generic mode | 430 | ;; Mailagent is a Unix mail filtering program. Anyone wanna do a generic mode |
| 407 | ;; for procmail? | 431 | ;; for procmail? |
| 408 | (and | 432 | (and |
| 409 | (memq 'mailagent-rules-generic-mode generic-extras-enable-list) | 433 | (memq 'mailagent-rules-generic-mode generic-extras-enable-list) |
| 410 | 434 | ||
| 411 | (define-generic-mode 'mailagent-rules-generic-mode | 435 | (define-generic-mode 'mailagent-rules-generic-mode |
| 412 | (list ?#) | 436 | (list ?#) |
| 413 | (list "SAVE" "DELETE" "PIPE" "ANNOTATE" "REJECT") | 437 | (list "SAVE" "DELETE" "PIPE" "ANNOTATE" "REJECT") |
| 414 | '(("^\\(\\sw+\\)\\s-*=" 1 'font-lock-variable-name-face) | 438 | '(("^\\(\\sw+\\)\\s-*=" 1 'font-lock-variable-name-face) |
| 415 | ("\\s-/\\([^/]+\\)/[i, \t\n]" 1 'font-lock-reference-face)) | 439 | ("\\s-/\\([^/]+\\)/[i, \t\n]" 1 'font-lock-constant-face)) |
| 416 | (list "\\.rules\\'") | 440 | (list "\\.rules\\'") |
| 417 | (list 'mailagent-rules-setup-function) | 441 | (list 'mailagent-rules-setup-function) |
| 418 | "Mode for Mailagent rules files.") | 442 | "Mode for Mailagent rules files.") |
| 419 | 443 | ||
| 420 | (defun mailagent-rules-setup-function () | 444 | (defun mailagent-rules-setup-function () |
| 421 | (make-local-variable 'imenu-generic-expression) | 445 | (make-local-variable 'imenu-generic-expression) |
| 422 | (setq imenu-generic-expression | 446 | (setq imenu-generic-expression |
| 423 | '((nil "\\s-/\\([^/]+\\)/[i, \t\n]" 1)))) | 447 | '((nil "\\s-/\\([^/]+\\)/[i, \t\n]" 1)))) |
| 424 | ) | 448 | ) |
| 425 | 449 | ||
| 426 | ;; Solaris/Sys V prototype files | 450 | ;; Solaris/Sys V prototype files |
| 427 | (and | 451 | (and |
| 428 | (memq 'prototype-generic-mode generic-extras-enable-list) | 452 | (memq 'prototype-generic-mode generic-extras-enable-list) |
| 429 | 453 | ||
| 430 | (define-generic-mode 'prototype-generic-mode | 454 | (define-generic-mode 'prototype-generic-mode |
| @@ -432,10 +456,10 @@ you must reload generic-x to enable the specified modes." | |||
| 432 | nil | 456 | nil |
| 433 | '( | 457 | '( |
| 434 | ("^\\([0-9]\\)?\\s-*\\([a-z]\\)\\s-+\\([A-Za-z_]+\\)\\s-+\\([^\n\r]*\\)$" | 458 | ("^\\([0-9]\\)?\\s-*\\([a-z]\\)\\s-+\\([A-Za-z_]+\\)\\s-+\\([^\n\r]*\\)$" |
| 435 | (2 font-lock-reference-face) | 459 | (2 font-lock-constant-face) |
| 436 | (3 font-lock-keyword-face)) | 460 | (3 font-lock-keyword-face)) |
| 437 | ("^\\([a-z]\\) \\([A-Za-z_]+\\)=\\([^\n\r]*\\)$" | 461 | ("^\\([a-z]\\) \\([A-Za-z_]+\\)=\\([^\n\r]*\\)$" |
| 438 | (1 font-lock-reference-face) | 462 | (1 font-lock-constant-face) |
| 439 | (2 font-lock-keyword-face) | 463 | (2 font-lock-keyword-face) |
| 440 | (3 font-lock-variable-name-face)) | 464 | (3 font-lock-variable-name-face)) |
| 441 | ("^\\(!\\s-*\\(search\\|include\\|default\\)\\)\\s-*\\([^\n\r]*\\)$" | 465 | ("^\\(!\\s-*\\(search\\|include\\|default\\)\\)\\s-*\\([^\n\r]*\\)$" |
| @@ -450,7 +474,7 @@ you must reload generic-x to enable the specified modes." | |||
| 450 | "Mode for Sys V prototype files.")) | 474 | "Mode for Sys V prototype files.")) |
| 451 | 475 | ||
| 452 | ;; Solaris/Sys V pkginfo files | 476 | ;; Solaris/Sys V pkginfo files |
| 453 | (and | 477 | (and |
| 454 | (memq 'pkginfo-generic-mode generic-extras-enable-list) | 478 | (memq 'pkginfo-generic-mode generic-extras-enable-list) |
| 455 | 479 | ||
| 456 | (define-generic-mode 'pkginfo-generic-mode | 480 | (define-generic-mode 'pkginfo-generic-mode |
| @@ -466,29 +490,85 @@ you must reload generic-x to enable the specified modes." | |||
| 466 | "Mode for Sys V pkginfo files.")) | 490 | "Mode for Sys V pkginfo files.")) |
| 467 | 491 | ||
| 468 | ;; Javascript mode | 492 | ;; Javascript mode |
| 493 | ;; Includes extra keywords from Armando Singer [asinger@MAIL.COLGATE.EDU] | ||
| 469 | (define-generic-mode 'javascript-generic-mode | 494 | (define-generic-mode 'javascript-generic-mode |
| 470 | (list "//") | 495 | (list "//") |
| 471 | (list | 496 | (list |
| 472 | "document" | 497 | "break" |
| 498 | "case" | ||
| 499 | "continue" | ||
| 500 | "default" | ||
| 501 | "delete" | ||
| 502 | "do" | ||
| 473 | "else" | 503 | "else" |
| 474 | "function" | 504 | "export" |
| 505 | "for" | ||
| 475 | "function" | 506 | "function" |
| 476 | "if" | 507 | "if" |
| 477 | "then" | 508 | "import" |
| 509 | "in" | ||
| 510 | "new" | ||
| 511 | "return" | ||
| 512 | "switch" | ||
| 513 | "this" | ||
| 514 | "typeof" | ||
| 478 | "var" | 515 | "var" |
| 516 | "void" | ||
| 517 | "while" | ||
| 518 | "with" | ||
| 519 | ;; words reserved for ECMA extensions below | ||
| 520 | "catch" | ||
| 521 | "class" | ||
| 522 | "const" | ||
| 523 | "debugger" | ||
| 524 | "enum" | ||
| 525 | "extends" | ||
| 526 | "finally" | ||
| 527 | "super" | ||
| 528 | "throw" | ||
| 529 | "try" | ||
| 530 | ;; Java Keywords reserved by JavaScript | ||
| 531 | "abstract" | ||
| 532 | "boolean" | ||
| 533 | "byte" | ||
| 534 | "char" | ||
| 535 | "double" | ||
| 536 | "false" | ||
| 537 | "final" | ||
| 538 | "float" | ||
| 539 | "goto" | ||
| 540 | "implements" | ||
| 541 | "instanceof" | ||
| 542 | "int" | ||
| 543 | "interface" | ||
| 544 | "long" | ||
| 545 | "native" | ||
| 546 | "null" | ||
| 547 | "package" | ||
| 548 | "private" | ||
| 549 | "protected" | ||
| 550 | "public" | ||
| 551 | "short" | ||
| 552 | "static" | ||
| 553 | "synchronized" | ||
| 554 | "throws" | ||
| 555 | "transient" | ||
| 556 | "true" | ||
| 479 | ) | 557 | ) |
| 480 | (list | 558 | (list |
| 481 | (list "^\\s-*function\\s-+\\([A-Za-z0-9]+\\)" | 559 | (list "^\\s-*function\\s-+\\([A-Za-z0-9_]+\\)" |
| 482 | '(1 font-lock-function-name-face)) | 560 | '(1 font-lock-function-name-face)) |
| 483 | (list "^\\s-*var\\s-+\\([A-Za-z0-9]+\\)" | 561 | (list "^\\s-*var\\s-+\\([A-Za-z0-9_]+\\)" |
| 484 | '(1 font-lock-variable-name-face)) | 562 | '(1 font-lock-variable-name-face)) |
| 485 | ) | 563 | ) |
| 486 | (list "\\.js\\'") | 564 | (list "\\.js\\'") |
| 487 | (list | 565 | (list |
| 488 | (function | 566 | (function |
| 489 | (lambda () | 567 | (lambda () |
| 490 | (setq imenu-generic-expression | 568 | (setq imenu-generic-expression |
| 491 | '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1))) | 569 | '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1) |
| 570 | ("*Variables*" "^var\\s-+\\([A-Za-z0-9_]+\\)" 1) | ||
| 571 | )) | ||
| 492 | ))) | 572 | ))) |
| 493 | "Mode for JavaScript files.") | 573 | "Mode for JavaScript files.") |
| 494 | 574 | ||
| @@ -527,23 +607,23 @@ you must reload generic-x to enable the specified modes." | |||
| 527 | ) | 607 | ) |
| 528 | (list | 608 | (list |
| 529 | (list "USE\\s-+\\([-A-Za-z0-9_]+\\)" | 609 | (list "USE\\s-+\\([-A-Za-z0-9_]+\\)" |
| 530 | '(1 font-lock-reference-face)) | 610 | '(1 font-lock-constant-face)) |
| 531 | (list "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{" | 611 | (list "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{" |
| 532 | '(1 font-lock-type-face) | 612 | '(1 font-lock-type-face) |
| 533 | '(2 font-lock-reference-face)) | 613 | '(2 font-lock-constant-face)) |
| 534 | (list "^\\s-*\\([-A-Za-z0-9_]+\\)\\s-*{" | 614 | (list "^\\s-*\\([-A-Za-z0-9_]+\\)\\s-*{" |
| 535 | '(1 font-lock-function-name-face)) | 615 | '(1 font-lock-function-name-face)) |
| 536 | (list | 616 | (list |
| 537 | "^\\s-*\\(geometry\\|appearance\\|material\\)\\s-+\\([-A-Za-z0-9_]+\\)" | 617 | "^\\s-*\\(geometry\\|appearance\\|material\\)\\s-+\\([-A-Za-z0-9_]+\\)" |
| 538 | '(2 font-lock-variable-name-face)) | 618 | '(2 font-lock-variable-name-face)) |
| 539 | ) | 619 | ) |
| 540 | (list "\\.wrl\\'") | 620 | (list "\\.wrl\\'") |
| 541 | (list | 621 | (list |
| 542 | (function | 622 | (function |
| 543 | (lambda () | 623 | (lambda () |
| 544 | (setq imenu-generic-expression | 624 | (setq imenu-generic-expression |
| 545 | '((nil "^\\([A-Za-z0-9_]+\\)\\s-*{" 1) | 625 | '((nil "^\\([A-Za-z0-9_]+\\)\\s-*{" 1) |
| 546 | ("*Definitions*" | 626 | ("*Definitions*" |
| 547 | "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{" | 627 | "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{" |
| 548 | 1))) | 628 | 1))) |
| 549 | ))) | 629 | ))) |
| @@ -552,11 +632,11 @@ you must reload generic-x to enable the specified modes." | |||
| 552 | ;; Java Manifests | 632 | ;; Java Manifests |
| 553 | (define-generic-mode 'java-manifest-generic-mode | 633 | (define-generic-mode 'java-manifest-generic-mode |
| 554 | (list ?#) | 634 | (list ?#) |
| 555 | (list | 635 | (list |
| 556 | "Name" | 636 | "Name" |
| 557 | "Digest-Algorithms" | 637 | "Digest-Algorithms" |
| 558 | "Manifest-Version" | 638 | "Manifest-Version" |
| 559 | "Required-Version" | 639 | "Required-Version" |
| 560 | "Signature-Version" | 640 | "Signature-Version" |
| 561 | "Magic" | 641 | "Magic" |
| 562 | "Java-Bean" | 642 | "Java-Bean" |
| @@ -565,9 +645,9 @@ you must reload generic-x to enable the specified modes." | |||
| 565 | '(("^Name:\\s-+\\([^\n\r]*\\)$" | 645 | '(("^Name:\\s-+\\([^\n\r]*\\)$" |
| 566 | (1 font-lock-variable-name-face)) | 646 | (1 font-lock-variable-name-face)) |
| 567 | ("^\\(Manifest\\|Required\\|Signature\\)-Version:\\s-+\\([^\n\r]*\\)$" | 647 | ("^\\(Manifest\\|Required\\|Signature\\)-Version:\\s-+\\([^\n\r]*\\)$" |
| 568 | (2 font-lock-reference-face)) | 648 | (2 font-lock-constant-face)) |
| 569 | ) | 649 | ) |
| 570 | (list "manifest\\.mf\\'") | 650 | (list "[mM][aA][nN][iI][fF][eE][sS][tT]\\.[mM][fF]\\'") |
| 571 | nil | 651 | nil |
| 572 | "Mode for Java Manifest files") | 652 | "Mode for Java Manifest files") |
| 573 | 653 | ||
| @@ -575,9 +655,9 @@ you must reload generic-x to enable the specified modes." | |||
| 575 | (define-generic-mode 'java-properties-generic-mode | 655 | (define-generic-mode 'java-properties-generic-mode |
| 576 | (list ?! ?#) | 656 | (list ?! ?#) |
| 577 | nil | 657 | nil |
| 578 | (let ((java-properties-key | 658 | (let ((java-properties-key |
| 579 | "\\(\\([-A-Za-z0-9_\\./]\\|\\(\\\\[ =:]\\)\\)+\\)") | 659 | "\\(\\([-A-Za-z0-9_\\./]\\|\\(\\\\[ =:]\\)\\)+\\)") |
| 580 | (java-properties-value | 660 | (java-properties-value |
| 581 | "\\([^\r\n]*\\)") | 661 | "\\([^\r\n]*\\)") |
| 582 | ) | 662 | ) |
| 583 | ;; Property and value can be separated in a number of different ways: | 663 | ;; Property and value can be separated in a number of different ways: |
| @@ -585,28 +665,28 @@ you must reload generic-x to enable the specified modes." | |||
| 585 | ;; * an equal sign | 665 | ;; * an equal sign |
| 586 | ;; * a colon | 666 | ;; * a colon |
| 587 | (mapcar | 667 | (mapcar |
| 588 | (function | 668 | (function |
| 589 | (lambda (elt) | 669 | (lambda (elt) |
| 590 | (list | 670 | (list |
| 591 | (concat "^" java-properties-key elt java-properties-value "$") | 671 | (concat "^" java-properties-key elt java-properties-value "$") |
| 592 | '(1 font-lock-reference-face) | 672 | '(1 font-lock-constant-face) |
| 593 | '(4 font-lock-variable-name-face) | 673 | '(4 font-lock-variable-name-face) |
| 594 | ))) | 674 | ))) |
| 595 | ;; These are the separators | 675 | ;; These are the separators |
| 596 | (list ":\\s-+" "\\s-+" "\\s-*=\\s-*") | 676 | (list ":\\s-*" "\\s-+" "\\s-*=\\s-*") |
| 597 | ) | 677 | ) |
| 598 | ) | 678 | ) |
| 599 | nil | 679 | nil |
| 600 | (list | 680 | (list |
| 601 | (function | 681 | (function |
| 602 | (lambda () | 682 | (lambda () |
| 603 | (setq imenu-generic-expression | 683 | (setq imenu-generic-expression |
| 604 | '((nil "^\\([^#! \t\n\r=:]+\\)" 1))) | 684 | '((nil "^\\([^#! \t\n\r=:]+\\)" 1))) |
| 605 | ))) | 685 | ))) |
| 606 | "Mode for Java properties files.") | 686 | "Mode for Java properties files.") |
| 607 | 687 | ||
| 608 | ;; C shell alias definitions | 688 | ;; C shell alias definitions |
| 609 | (and | 689 | (and |
| 610 | (memq 'alias-generic-mode generic-extras-enable-list) | 690 | (memq 'alias-generic-mode generic-extras-enable-list) |
| 611 | 691 | ||
| 612 | (define-generic-mode 'alias-generic-mode | 692 | (define-generic-mode 'alias-generic-mode |
| @@ -621,7 +701,7 @@ you must reload generic-x to enable the specified modes." | |||
| 621 | (list | 701 | (list |
| 622 | (function | 702 | (function |
| 623 | (lambda () | 703 | (lambda () |
| 624 | (setq imenu-generic-expression | 704 | (setq imenu-generic-expression |
| 625 | '((nil "^\\(alias\\|unalias\\)\\s-+\\([-a-zA-Z0-9_]+\\)" 2))) | 705 | '((nil "^\\(alias\\|unalias\\)\\s-+\\([-a-zA-Z0-9_]+\\)" 2))) |
| 626 | ))) | 706 | ))) |
| 627 | "Mode for C Shell alias files.") | 707 | "Mode for C Shell alias files.") |
| @@ -629,7 +709,7 @@ you must reload generic-x to enable the specified modes." | |||
| 629 | 709 | ||
| 630 | ;;; Windows RC files | 710 | ;;; Windows RC files |
| 631 | ;; Contributed by ACorreir@pervasive-sw.com (Alfred Correira) | 711 | ;; Contributed by ACorreir@pervasive-sw.com (Alfred Correira) |
| 632 | (and | 712 | (and |
| 633 | (memq 'rc-generic-mode generic-extras-enable-list) | 713 | (memq 'rc-generic-mode generic-extras-enable-list) |
| 634 | 714 | ||
| 635 | (define-generic-mode 'rc-generic-mode | 715 | (define-generic-mode 'rc-generic-mode |
| @@ -664,8 +744,8 @@ you must reload generic-x to enable the specified modes." | |||
| 664 | "LEFTMARGIN" | 744 | "LEFTMARGIN" |
| 665 | "LISTBOX" | 745 | "LISTBOX" |
| 666 | "LTEXT" | 746 | "LTEXT" |
| 667 | "MENUITEM SEPARATOR" | 747 | "MENUITEM SEPARATOR" |
| 668 | "MENUITEM" | 748 | "MENUITEM" |
| 669 | "MENU" | 749 | "MENU" |
| 670 | "MOVEABLE" | 750 | "MOVEABLE" |
| 671 | "POPUP" | 751 | "POPUP" |
| @@ -713,16 +793,16 @@ you must reload generic-x to enable the specified modes." | |||
| 713 | '("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face) | 793 | '("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face) |
| 714 | '("^#[ \t]*\\(elif\\|if\\)\\>" | 794 | '("^#[ \t]*\\(elif\\|if\\)\\>" |
| 715 | ("\\<\\(defined\\)\\>[ \t]*(?\\(\\sw+\\)?" nil nil | 795 | ("\\<\\(defined\\)\\>[ \t]*(?\\(\\sw+\\)?" nil nil |
| 716 | (1 font-lock-reference-face) (2 font-lock-variable-name-face nil t))) | 796 | (1 font-lock-constant-face) (2 font-lock-variable-name-face nil t))) |
| 717 | '("^#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?" | 797 | '("^#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?" |
| 718 | (1 font-lock-reference-face) (2 font-lock-variable-name-face nil t))) | 798 | (1 font-lock-constant-face) (2 font-lock-variable-name-face nil t))) |
| 719 | (list "\\.[rR][cC]$") | 799 | (list "\\.[rR][cC]$") |
| 720 | nil | 800 | nil |
| 721 | "Generic mode for MS-Windows Resource files.")) | 801 | "Generic mode for MS-Windows Resource files.")) |
| 722 | 802 | ||
| 723 | ;; InstallShield RUL files | 803 | ;; InstallShield RUL files |
| 724 | ;; Contributed by Alfred.Correira@Pervasive.Com | 804 | ;; Contributed by Alfred.Correira@Pervasive.Com |
| 725 | (and | 805 | (and |
| 726 | (memq 'rul-generic-mode generic-extras-enable-list) | 806 | (memq 'rul-generic-mode generic-extras-enable-list) |
| 727 | ;;; build the regexp strings using regexp-opt | 807 | ;;; build the regexp strings using regexp-opt |
| 728 | (defvar installshield-statement-keyword-list | 808 | (defvar installshield-statement-keyword-list |
| @@ -780,6 +860,7 @@ you must reload generic-x to enable the specified modes." | |||
| 780 | "BatchGetFileName" | 860 | "BatchGetFileName" |
| 781 | "BatchMoveEx" | 861 | "BatchMoveEx" |
| 782 | "BatchSetFileName" | 862 | "BatchSetFileName" |
| 863 | "ChangeDirectory" | ||
| 783 | "CloseFile" | 864 | "CloseFile" |
| 784 | "CmdGetHwndDlg" | 865 | "CmdGetHwndDlg" |
| 785 | "ComponentAddItem" ; differs between IS3 and IS5 | 866 | "ComponentAddItem" ; differs between IS3 and IS5 |
| @@ -856,6 +937,7 @@ you must reload generic-x to enable the specified modes." | |||
| 856 | "GetExtents" | 937 | "GetExtents" |
| 857 | "GetFileInfo" | 938 | "GetFileInfo" |
| 858 | "GetLine" | 939 | "GetLine" |
| 940 | "GetProfInt" | ||
| 859 | "GetProfString" | 941 | "GetProfString" |
| 860 | "GetSystemInfo" | 942 | "GetSystemInfo" |
| 861 | "GetValidDrivesList" | 943 | "GetValidDrivesList" |
| @@ -864,6 +946,7 @@ you must reload generic-x to enable the specified modes." | |||
| 864 | "InstallationInfo" | 946 | "InstallationInfo" |
| 865 | "Is" | 947 | "Is" |
| 866 | "LaunchApp" | 948 | "LaunchApp" |
| 949 | "LaunchAppAndWait" | ||
| 867 | "ListAddItem" | 950 | "ListAddItem" |
| 868 | "ListAddString" | 951 | "ListAddString" |
| 869 | "ListCount" | 952 | "ListCount" |
| @@ -876,6 +959,7 @@ you must reload generic-x to enable the specified modes." | |||
| 876 | "ListGetNextItem" | 959 | "ListGetNextItem" |
| 877 | "ListGetNextString" | 960 | "ListGetNextString" |
| 878 | "ListReadFromFile" | 961 | "ListReadFromFile" |
| 962 | "ListSetCurrentItem" | ||
| 879 | "ListSetNextItem" | 963 | "ListSetNextItem" |
| 880 | "ListSetNextString" | 964 | "ListSetNextString" |
| 881 | "ListSetIndex" | 965 | "ListSetIndex" |
| @@ -899,7 +983,7 @@ you must reload generic-x to enable the specified modes." | |||
| 899 | "PlayMMedia" ; IS5 only | 983 | "PlayMMedia" ; IS5 only |
| 900 | "ProgDefGroupType" | 984 | "ProgDefGroupType" |
| 901 | "RegDBCreateKeyEx" | 985 | "RegDBCreateKeyEx" |
| 902 | "RegDbDeleteValue" | 986 | "RegDBDeleteValue" |
| 903 | "RegDBGetItem" | 987 | "RegDBGetItem" |
| 904 | "RegDBKeyExist" | 988 | "RegDBKeyExist" |
| 905 | "RegDBSetItem" | 989 | "RegDBSetItem" |
| @@ -990,6 +1074,7 @@ you must reload generic-x to enable the specified modes." | |||
| 990 | "StrLength" | 1074 | "StrLength" |
| 991 | "StrRemoveLastSlash" | 1075 | "StrRemoveLastSlash" |
| 992 | "StrToLower" | 1076 | "StrToLower" |
| 1077 | "StrToNum" | ||
| 993 | "StrToUpper" | 1078 | "StrToUpper" |
| 994 | "StrSub" | 1079 | "StrSub" |
| 995 | "VarRestore" | 1080 | "VarRestore" |
| @@ -1006,19 +1091,30 @@ you must reload generic-x to enable the specified modes." | |||
| 1006 | 1091 | ||
| 1007 | (defvar installshield-system-variables-list | 1092 | (defvar installshield-system-variables-list |
| 1008 | (list | 1093 | (list |
| 1094 | "BATCH_INSTALL" | ||
| 1009 | "CMDLINE" | 1095 | "CMDLINE" |
| 1096 | "COMMONFILES" | ||
| 1010 | "CORECOMPONENTHANDLING" | 1097 | "CORECOMPONENTHANDLING" |
| 1098 | "DIALOGCACHE" | ||
| 1011 | "ERRORFILENAME" | 1099 | "ERRORFILENAME" |
| 1100 | "FOLDER_DESKTOP" | ||
| 1101 | "FOLDER_PROGRAMS" | ||
| 1102 | "FOLDER_STARTMENU" | ||
| 1103 | "FOLDER_STARTUP" | ||
| 1012 | "INFOFILENAME" | 1104 | "INFOFILENAME" |
| 1013 | "ISRES" | 1105 | "ISRES" |
| 1014 | "ISUSER" | 1106 | "ISUSER" |
| 1015 | "ISVERSION" | 1107 | "ISVERSION" |
| 1108 | "MEDIA" | ||
| 1016 | "MODE" | 1109 | "MODE" |
| 1110 | "PROGRAMFILES" | ||
| 1111 | "SELECTED_LANGUAGE" | ||
| 1017 | "SRCDIR" | 1112 | "SRCDIR" |
| 1018 | "SRCDISK" | 1113 | "SRCDISK" |
| 1019 | "SUPPORTDIR" | 1114 | "SUPPORTDIR" |
| 1020 | "TARGETDIR" | 1115 | "TARGETDIR" |
| 1021 | "TARGETDISK" | 1116 | "TARGETDISK" |
| 1117 | "UNINST" | ||
| 1022 | "WINDIR" | 1118 | "WINDIR" |
| 1023 | "WINDISK" | 1119 | "WINDISK" |
| 1024 | "WINMAJOR" | 1120 | "WINMAJOR" |
| @@ -1038,7 +1134,9 @@ you must reload generic-x to enable the specified modes." | |||
| 1038 | "LIST" | 1134 | "LIST" |
| 1039 | "LONG" | 1135 | "LONG" |
| 1040 | "LOWORD" | 1136 | "LOWORD" |
| 1137 | "LPSTR" | ||
| 1041 | "NUMBER" | 1138 | "NUMBER" |
| 1139 | "NUMBERLIST" | ||
| 1042 | "POINTER" | 1140 | "POINTER" |
| 1043 | "QUAD" | 1141 | "QUAD" |
| 1044 | "RGB" | 1142 | "RGB" |
| @@ -1144,6 +1242,7 @@ you must reload generic-x to enable the specified modes." | |||
| 1144 | "FILENAME" | 1242 | "FILENAME" |
| 1145 | "FIXED_DRIVE" | 1243 | "FIXED_DRIVE" |
| 1146 | "FOLDER_DESKTOP" | 1244 | "FOLDER_DESKTOP" |
| 1245 | "FOLDER_PROGRAMS" | ||
| 1147 | "FOLDER_STARTMENU" | 1246 | "FOLDER_STARTMENU" |
| 1148 | "FOLDER_STARTUP" | 1247 | "FOLDER_STARTUP" |
| 1149 | "FREEENVSPACE" | 1248 | "FREEENVSPACE" |
| @@ -1152,6 +1251,10 @@ you must reload generic-x to enable the specified modes." | |||
| 1152 | "FONT_TITLE" | 1251 | "FONT_TITLE" |
| 1153 | "GREATER_THAN" | 1252 | "GREATER_THAN" |
| 1154 | "GREEN" | 1253 | "GREEN" |
| 1254 | "HKEY_CLASSES_ROOT" | ||
| 1255 | "HKEY_CURRENT_USER" | ||
| 1256 | "HKEY_LOCAL_MACHINE" | ||
| 1257 | "HKEY_USERS" | ||
| 1155 | "HOURGLASS" | 1258 | "HOURGLASS" |
| 1156 | "INCLUDE_SUBDIR" | 1259 | "INCLUDE_SUBDIR" |
| 1157 | "INDVFILESTATUS" | 1260 | "INDVFILESTATUS" |
| @@ -1232,6 +1335,7 @@ you must reload generic-x to enable the specified modes." | |||
| 1232 | "SW_MINIMIZE" | 1335 | "SW_MINIMIZE" |
| 1233 | "SW_RESTORE" | 1336 | "SW_RESTORE" |
| 1234 | "SW_SHOW" | 1337 | "SW_SHOW" |
| 1338 | "SYS_BOOTMACHINE" | ||
| 1235 | "TIME" | 1339 | "TIME" |
| 1236 | "TRUE" | 1340 | "TRUE" |
| 1237 | "TYPICAL" | 1341 | "TYPICAL" |
| @@ -1253,7 +1357,7 @@ you must reload generic-x to enable the specified modes." | |||
| 1253 | ) | 1357 | ) |
| 1254 | "Function argument constants used in InstallShield 3 and 5.") | 1358 | "Function argument constants used in InstallShield 3 and 5.") |
| 1255 | 1359 | ||
| 1256 | (define-generic-mode 'rul-generic-mode | 1360 | (define-generic-mode 'rul-generic-mode |
| 1257 | ;; Using "/*" and "*/" doesn't seem to be working right | 1361 | ;; Using "/*" and "*/" doesn't seem to be working right |
| 1258 | (list "//") | 1362 | (list "//") |
| 1259 | installshield-statement-keyword-list | 1363 | installshield-statement-keyword-list |
| @@ -1262,15 +1366,15 @@ you must reload generic-x to enable the specified modes." | |||
| 1262 | '("#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" | 1366 | '("#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" |
| 1263 | 1 font-lock-string-face) | 1367 | 1 font-lock-string-face) |
| 1264 | '("#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?" | 1368 | '("#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?" |
| 1265 | (1 font-lock-reference-face) | 1369 | (1 font-lock-constant-face) |
| 1266 | (2 font-lock-variable-name-face nil t)) | 1370 | (2 font-lock-variable-name-face nil t)) |
| 1267 | ;; indirect string constants | 1371 | ;; indirect string constants |
| 1268 | '("\\(@[A-Za-z][A-Za-z0-9_]+\\)" 1 font-lock-builtin-face) | 1372 | '("\\(@[A-Za-z][A-Za-z0-9_]+\\)" 1 font-lock-builtin-face) |
| 1269 | ;; gotos | 1373 | ;; gotos |
| 1270 | '("[ \t]*\\(\\sw+:\\)" 1 font-lock-reference-face) | 1374 | '("[ \t]*\\(\\sw+:\\)" 1 font-lock-constant-face) |
| 1271 | '("\\<\\(goto\\)\\>[ \t]*\\(\\sw+\\)?" | 1375 | '("\\<\\(goto\\)\\>[ \t]*\\(\\sw+\\)?" |
| 1272 | (1 font-lock-keyword-face) | 1376 | (1 font-lock-keyword-face) |
| 1273 | (2 font-lock-reference-face nil t)) | 1377 | (2 font-lock-constant-face nil t)) |
| 1274 | ;; system variables | 1378 | ;; system variables |
| 1275 | (generic-make-keywords-list | 1379 | (generic-make-keywords-list |
| 1276 | installshield-system-variables-list | 1380 | installshield-system-variables-list |
| @@ -1290,9 +1394,9 @@ you must reload generic-x to enable the specified modes." | |||
| 1290 | ) | 1394 | ) |
| 1291 | (list "\\.[rR][uU][lL]$") | 1395 | (list "\\.[rR][uU][lL]$") |
| 1292 | (list | 1396 | (list |
| 1293 | (function | 1397 | (function |
| 1294 | (lambda () | 1398 | (lambda () |
| 1295 | (setq imenu-generic-expression | 1399 | (setq imenu-generic-expression |
| 1296 | '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1))) | 1400 | '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1))) |
| 1297 | ))) | 1401 | ))) |
| 1298 | "Generic mode for InstallShield RUL files.") | 1402 | "Generic mode for InstallShield RUL files.") |
| @@ -1304,7 +1408,7 @@ you must reload generic-x to enable the specified modes." | |||
| 1304 | > _ \n | 1408 | > _ \n |
| 1305 | ( "other condition, %s: " | 1409 | ( "other condition, %s: " |
| 1306 | > "elseif(" str ") then" \n | 1410 | > "elseif(" str ") then" \n |
| 1307 | > \n) | 1411 | > \n) |
| 1308 | > "else" \n | 1412 | > "else" \n |
| 1309 | > \n | 1413 | > \n |
| 1310 | resume: | 1414 | resume: |
| @@ -1327,31 +1431,31 @@ you must reload generic-x to enable the specified modes." | |||
| 1327 | ;; Additions by ACorreir@pervasive-sw.com (Alfred Correira) | 1431 | ;; Additions by ACorreir@pervasive-sw.com (Alfred Correira) |
| 1328 | (define-generic-mode 'mailrc-generic-mode | 1432 | (define-generic-mode 'mailrc-generic-mode |
| 1329 | (list ?#) | 1433 | (list ?#) |
| 1330 | (list | 1434 | (list |
| 1331 | "alias" | 1435 | "alias" |
| 1332 | "else" | 1436 | "else" |
| 1333 | "endif" | 1437 | "endif" |
| 1334 | "group" | 1438 | "group" |
| 1335 | "if" | 1439 | "if" |
| 1336 | "ignore" | 1440 | "ignore" |
| 1337 | "set" | 1441 | "set" |
| 1338 | "unset" | 1442 | "unset" |
| 1339 | ) | 1443 | ) |
| 1340 | '(("^\\s-*\\(alias\\|group\\)\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([^\n\r#]*\\)\\(#.*\\)?$" | 1444 | '(("^\\s-*\\(alias\\|group\\)\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([^\n\r#]*\\)\\(#.*\\)?$" |
| 1341 | (2 font-lock-reference-face) (3 font-lock-variable-name-face)) | 1445 | (2 font-lock-constant-face) (3 font-lock-variable-name-face)) |
| 1342 | ("^\\s-*\\(unset\\|set\\|ignore\\)\\s-+\\([-A-Za-z0-9_]+\\)=?\\([^\n\r#]*\\)\\(#.*\\)?$" | 1446 | ("^\\s-*\\(unset\\|set\\|ignore\\)\\s-+\\([-A-Za-z0-9_]+\\)=?\\([^\n\r#]*\\)\\(#.*\\)?$" |
| 1343 | (2 font-lock-reference-face) (3 font-lock-variable-name-face))) | 1447 | (2 font-lock-constant-face) (3 font-lock-variable-name-face))) |
| 1344 | (list "\\.mailrc\\'") | 1448 | (list "\\.mailrc\\'") |
| 1345 | nil | 1449 | nil |
| 1346 | "Mode for mailrc files.") | 1450 | "Mode for mailrc files.") |
| 1347 | 1451 | ||
| 1348 | ;; Inetd.conf | 1452 | ;; Inetd.conf |
| 1349 | (and | 1453 | (and |
| 1350 | (memq 'inetd-conf-generic-mode generic-extras-enable-list) | 1454 | (memq 'inetd-conf-generic-mode generic-extras-enable-list) |
| 1351 | 1455 | ||
| 1352 | (define-generic-mode 'inetd-conf-generic-mode | 1456 | (define-generic-mode 'inetd-conf-generic-mode |
| 1353 | (list ?#) | 1457 | (list ?#) |
| 1354 | (list | 1458 | (list |
| 1355 | "stream" | 1459 | "stream" |
| 1356 | "dgram" | 1460 | "dgram" |
| 1357 | "tcp" | 1461 | "tcp" |
| @@ -1365,22 +1469,22 @@ you must reload generic-x to enable the specified modes." | |||
| 1365 | 1 'font-lock-type-face) | 1469 | 1 'font-lock-type-face) |
| 1366 | ) | 1470 | ) |
| 1367 | '("/etc/inetd.conf\\'") | 1471 | '("/etc/inetd.conf\\'") |
| 1368 | (list | 1472 | (list |
| 1369 | (function | 1473 | (function |
| 1370 | (lambda () | 1474 | (lambda () |
| 1371 | (setq imenu-generic-expression | 1475 | (setq imenu-generic-expression |
| 1372 | '((nil "^\\([-A-Za-z0-9_]+\\)" 1))) | 1476 | '((nil "^\\([-A-Za-z0-9_]+\\)" 1))) |
| 1373 | ))) | 1477 | ))) |
| 1374 | ) | 1478 | ) |
| 1375 | ) | 1479 | ) |
| 1376 | 1480 | ||
| 1377 | ;; Services | 1481 | ;; Services |
| 1378 | (and | 1482 | (and |
| 1379 | (memq 'etc-services-generic-mode generic-extras-enable-list) | 1483 | (memq 'etc-services-generic-mode generic-extras-enable-list) |
| 1380 | 1484 | ||
| 1381 | (define-generic-mode 'etc-services-generic-mode | 1485 | (define-generic-mode 'etc-services-generic-mode |
| 1382 | (list ?#) | 1486 | (list ?#) |
| 1383 | (list | 1487 | (list |
| 1384 | "tcp" | 1488 | "tcp" |
| 1385 | "udp" | 1489 | "udp" |
| 1386 | "ddp" | 1490 | "ddp" |
| @@ -1392,17 +1496,17 @@ you must reload generic-x to enable the specified modes." | |||
| 1392 | ) | 1496 | ) |
| 1393 | ) | 1497 | ) |
| 1394 | '("/etc/services\\'") | 1498 | '("/etc/services\\'") |
| 1395 | (list | 1499 | (list |
| 1396 | (function | 1500 | (function |
| 1397 | (lambda () | 1501 | (lambda () |
| 1398 | (setq imenu-generic-expression | 1502 | (setq imenu-generic-expression |
| 1399 | '((nil "^\\([-A-Za-z0-9_]+\\)" 1))) | 1503 | '((nil "^\\([-A-Za-z0-9_]+\\)" 1))) |
| 1400 | ))) | 1504 | ))) |
| 1401 | ) | 1505 | ) |
| 1402 | ) | 1506 | ) |
| 1403 | 1507 | ||
| 1404 | ;; Password and Group files | 1508 | ;; Password and Group files |
| 1405 | (and | 1509 | (and |
| 1406 | (memq 'etc-passwd-generic-mode generic-extras-enable-list) | 1510 | (memq 'etc-passwd-generic-mode generic-extras-enable-list) |
| 1407 | 1511 | ||
| 1408 | (define-generic-mode 'etc-passwd-generic-mode | 1512 | (define-generic-mode 'etc-passwd-generic-mode |
| @@ -1433,7 +1537,7 @@ you must reload generic-x to enable the specified modes." | |||
| 1433 | ) | 1537 | ) |
| 1434 | '(1 'font-lock-type-face) | 1538 | '(1 'font-lock-type-face) |
| 1435 | '(5 'font-lock-variable-name-face) | 1539 | '(5 'font-lock-variable-name-face) |
| 1436 | '(6 'font-lock-reference-face) | 1540 | '(6 'font-lock-constant-face) |
| 1437 | '(7 'font-lock-warning-face) | 1541 | '(7 'font-lock-warning-face) |
| 1438 | ) | 1542 | ) |
| 1439 | '("^\\([^:]+\\):\\([^:]*\\):\\([0-9]+\\):\\(.*\\)$" | 1543 | '("^\\([^:]+\\):\\([^:]*\\):\\([0-9]+\\):\\(.*\\)$" |
| @@ -1442,10 +1546,10 @@ you must reload generic-x to enable the specified modes." | |||
| 1442 | ) | 1546 | ) |
| 1443 | ) | 1547 | ) |
| 1444 | '("/etc/passwd\\'" "/etc/group\\'") | 1548 | '("/etc/passwd\\'" "/etc/group\\'") |
| 1445 | (list | 1549 | (list |
| 1446 | (function | 1550 | (function |
| 1447 | (lambda () | 1551 | (lambda () |
| 1448 | (setq imenu-generic-expression | 1552 | (setq imenu-generic-expression |
| 1449 | '((nil "^\\([-A-Za-z0-9_]+\\):" 1))) | 1553 | '((nil "^\\([-A-Za-z0-9_]+\\):" 1))) |
| 1450 | ))) | 1554 | ))) |
| 1451 | ) | 1555 | ) |
| @@ -1492,7 +1596,170 @@ you must reload generic-x to enable the specified modes." | |||
| 1492 | nil | 1596 | nil |
| 1493 | "Generic mode to show tabs and trailing spaces") | 1597 | "Generic mode to show tabs and trailing spaces") |
| 1494 | 1598 | ||
| 1599 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 1600 | ;; DNS modes | ||
| 1601 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 1602 | |||
| 1603 | (define-generic-mode 'named-boot-generic-mode | ||
| 1604 | ;;List of comment characters | ||
| 1605 | (list ?\;) | ||
| 1606 | ;;List of keywords | ||
| 1607 | (list "cache" "primary" "secondary" "forwarders" "limit" "options" | ||
| 1608 | "directory" "check-names") | ||
| 1609 | ;;List of additional font-lock-expressions | ||
| 1610 | (list | ||
| 1611 | (list "\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 'font-lock-constant-face) | ||
| 1612 | (list "^directory\\s-+\\(.*\\)" 1 'font-lock-variable-name-face) | ||
| 1613 | (list "^\\(primary\\|cache\\)\\s-+\\([.A-Za-z]+\\)\\s-+\\(.*\\)" | ||
| 1614 | (list 2 'font-lock-variable-name-face) | ||
| 1615 | (list 3 'font-lock-constant-face)) | ||
| 1616 | ) | ||
| 1617 | ;;List of additional automode-alist expressions | ||
| 1618 | (list "/etc/named.boot\\'") | ||
| 1619 | ;;List of set up functions to call | ||
| 1620 | nil | ||
| 1621 | ) | ||
| 1622 | |||
| 1623 | (define-generic-mode 'named-database-generic-mode | ||
| 1624 | ;;List of comment characters | ||
| 1625 | (list ?\;) | ||
| 1626 | ;;List of keywords | ||
| 1627 | (list "IN" "NS" "CNAME" "SOA" "PTR" "MX" "A") | ||
| 1628 | ;;List of additional font-lock-expressions | ||
| 1629 | (list | ||
| 1630 | (list "\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 'font-lock-constant-face) | ||
| 1631 | (list "^\\([.A-Za-z0-9]+\\)" 1 'font-lock-variable-name-face) | ||
| 1632 | ) | ||
| 1633 | ;;List of additional automode-alist expressions | ||
| 1634 | nil | ||
| 1635 | ;;List of set up functions to call | ||
| 1636 | nil | ||
| 1637 | ) | ||
| 1638 | |||
| 1639 | (defvar named-database-time-string "%Y%m%d%H" | ||
| 1640 | "Timestring for named serial numbers.") | ||
| 1641 | |||
| 1642 | (defun named-database-print-serial () | ||
| 1643 | "Print a serial number based on the current date." | ||
| 1644 | (interactive) | ||
| 1645 | (insert (format-time-string named-database-time-string (current-time))) | ||
| 1646 | ) | ||
| 1647 | |||
| 1648 | (define-generic-mode 'resolve-conf-generic-mode | ||
| 1649 | ;;List of comment characters | ||
| 1650 | (list ?#) | ||
| 1651 | ;;List of keywords | ||
| 1652 | (list "nameserver" "domain" "search" "sortlist" "options") | ||
| 1653 | ;;List of additional font-lock-expressions | ||
| 1654 | nil | ||
| 1655 | ;;List of additional automode-alist expressions | ||
| 1656 | (list "/etc/resolv[e]?.conf\\'") | ||
| 1657 | ;;List of set up functions to call | ||
| 1658 | nil | ||
| 1659 | ) | ||
| 1660 | |||
| 1661 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 1662 | ;; Modes for spice and common electrical engineering circuit netlist formats | ||
| 1663 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 1664 | |||
| 1665 | (define-generic-mode 'spice-generic-mode | ||
| 1666 | nil | ||
| 1667 | (list | ||
| 1668 | "and" | ||
| 1669 | "cccs" | ||
| 1670 | "ccvs" | ||
| 1671 | "delay" | ||
| 1672 | "nand" | ||
| 1673 | "nor" | ||
| 1674 | "npwl" | ||
| 1675 | "or" | ||
| 1676 | "par" | ||
| 1677 | "ppwl" | ||
| 1678 | "pwl" | ||
| 1679 | "vccap" | ||
| 1680 | "vccs" | ||
| 1681 | "vcr" | ||
| 1682 | "vcvs" | ||
| 1683 | ) | ||
| 1684 | '( | ||
| 1685 | ("^\\s-*\\([*].*\\)" 1 'font-lock-comment-face) | ||
| 1686 | (" \\(\\$ .*\\)$" 1 'font-lock-comment-face) | ||
| 1687 | ("^\\(\\$ .*\\)$" 1 'font-lock-comment-face) | ||
| 1688 | ("\\([*].*\\)" 1 'font-lock-comment-face) | ||
| 1689 | ("^\\([+]\\)" 1 'font-lock-string-face) | ||
| 1690 | ("^\\s-*\\([.]\\w+\\>\\)" 1 'font-lock-keyword-face) | ||
| 1691 | ("\\(\\([.]\\|_\\|\\w\\)+\\)\\s-*=" 1 'font-lock-variable-name-face) | ||
| 1692 | ("\\('[^']+'\\)" 1 'font-lock-string-face) | ||
| 1693 | ("\\(\"[^\"]+\"\\)" 1 'font-lock-string-face) | ||
| 1694 | ) | ||
| 1695 | (list "\\.[sS][pP]\\'" | ||
| 1696 | "\\.[sS][pP][iI]\\'" | ||
| 1697 | "\\.[sS][pP][iI][cC][eE]\\'" | ||
| 1698 | "\\.[iI][nN][cC]\\'") | ||
| 1699 | (list | ||
| 1700 | 'generic-bracket-support | ||
| 1701 | ;; Make keywords case-insensitive | ||
| 1702 | (function | ||
| 1703 | (lambda() | ||
| 1704 | (setq font-lock-defaults (list 'generic-font-lock-defaults nil t)))) | ||
| 1705 | ) | ||
| 1706 | "Generic mode for SPICE circuit netlist files." | ||
| 1707 | ) | ||
| 1708 | |||
| 1709 | (define-generic-mode 'ibis-generic-mode | ||
| 1710 | (list ?|) | ||
| 1711 | nil | ||
| 1712 | '( | ||
| 1713 | ("[[]\\([^]]*\\)[]]" 1 'font-lock-keyword-face) | ||
| 1714 | ("\\(\\(_\\|\\w\\)+\\)\\s-*=" 1 'font-lock-variable-name-face) | ||
| 1715 | ) | ||
| 1716 | (list "\\.[iI][bB][sS]\\'") | ||
| 1717 | (list 'generic-bracket-support) | ||
| 1718 | "Generic mode for IBIS circuit netlist files." | ||
| 1719 | ) | ||
| 1720 | |||
| 1721 | (define-generic-mode 'astap-generic-mode | ||
| 1722 | nil | ||
| 1723 | (list | ||
| 1724 | "analyze" | ||
| 1725 | "description" | ||
| 1726 | "elements" | ||
| 1727 | "execution" | ||
| 1728 | "features" | ||
| 1729 | "functions" | ||
| 1730 | "ground" | ||
| 1731 | "model" | ||
| 1732 | "outputs" | ||
| 1733 | "print" | ||
| 1734 | "run" | ||
| 1735 | "controls" | ||
| 1736 | "table" | ||
| 1737 | ) | ||
| 1738 | '( | ||
| 1739 | ("^\\s-*\\([*].*\\)" 1 'font-lock-comment-face) | ||
| 1740 | (";\\s-*\\([*].*\\)" 1 'font-lock-comment-face) | ||
| 1741 | ("^\\s-*\\([.]\\w+\\>\\)" 1 'font-lock-keyword-face) | ||
| 1742 | ("\\('[^']+'\\)" 1 'font-lock-string-face) | ||
| 1743 | ("\\(\"[^\"]+\"\\)" 1 'font-lock-string-face) | ||
| 1744 | ("[(,]\\s-*\\(\\([.]\\|_\\|\\w\\)+\\)\\s-*=" 1 'font-lock-variable-name-face) | ||
| 1745 | ) | ||
| 1746 | (list "\\.[aA][pP]\\'" | ||
| 1747 | "\\.[aA][sS][xX]\\'" | ||
| 1748 | "\\.[aA][sS][tT][aA][pP]\\'" | ||
| 1749 | "\\.[pP][sS][pP]\\'" | ||
| 1750 | "\\.[dD][eE][cC][kK]\\'" | ||
| 1751 | "\\.[gG][oO][dD][aA][tT][aA]") | ||
| 1752 | (list | ||
| 1753 | 'generic-bracket-support | ||
| 1754 | ;; Make keywords case-insensitive | ||
| 1755 | (function | ||
| 1756 | (lambda() | ||
| 1757 | (setq font-lock-defaults (list 'generic-font-lock-defaults nil t)))) | ||
| 1758 | ) | ||
| 1759 | "Generic mode for ASTAP circuit netlist files." | ||
| 1760 | ) | ||
| 1761 | |||
| 1762 | |||
| 1495 | (provide 'generic-x) | 1763 | (provide 'generic-x) |
| 1496 | 1764 | ||
| 1497 | ;;; generic-x.el ends here | 1765 | ;;; generic-x.el ends here |
| 1498 | |||