annotate etc/srecode/cpp.srt @ 110305:b10051866f51

New syntax-propertize functionality. * lisp/font-lock.el (font-lock-syntactic-keywords): Make obsolete. (font-lock-fontify-syntactic-keywords-region): Move handling of font-lock-syntactically-fontified to... (font-lock-default-fontify-region): ...here. Let syntax-propertize-function take precedence. (font-lock-fontify-syntactically-region): Cal syntax-propertize. * lisp/emacs-lisp/regexp-opt.el (regexp-opt-depth): Skip named groups. * lisp/emacs-lisp/syntax.el (syntax-propertize-function) (syntax-propertize-chunk-size, syntax-propertize--done) (syntax-propertize-extend-region-functions): New vars. (syntax-propertize-wholelines, syntax-propertize-multiline) (syntax-propertize--shift-groups, syntax-propertize-via-font-lock) (syntax-propertize): New functions. (syntax-propertize-rules): New macro. (syntax-ppss-flush-cache): Set syntax-propertize--done. (syntax-ppss): Call syntax-propertize. * lisp/progmodes/ada-mode.el (ada-set-syntax-table-properties) (ada-after-change-function, ada-initialize-syntax-table-properties) (ada-handle-syntax-table-properties): Only define when syntax-propertize is not available. (ada-mode): Use syntax-propertize-function. * lisp/progmodes/autoconf.el (autoconf-mode): Use syntax-propertize-function. (autoconf-font-lock-syntactic-keywords): Remove. * lisp/progmodes/cfengine.el (cfengine-mode): Use syntax-propertize-function. (cfengine-font-lock-syntactic-keywords): Remove. * lisp/progmodes/cperl-mode.el (cperl-mode): Use syntax-propertize-function. * lisp/progmodes/fortran.el (fortran-mode): Use syntax-propertize-function. (fortran--font-lock-syntactic-keywords): New var. (fortran-line-length): Update syntax-propertize-function and fortran--font-lock-syntactic-keywords. * lisp/progmodes/gud.el (gdb-script-syntax-propertize-function): New var; replaces gdb-script-font-lock-syntactic-keywords. (gdb-script-mode): Use it. * lisp/progmodes/js.el (js--regexp-literal): Define while compiling. (js-syntax-propertize-function): New var; replaces js-font-lock-syntactic-keywords. (js-mode): Use it. * lisp/progmodes/make-mode.el (makefile-syntax-propertize-function): New var; replaces makefile-font-lock-syntactic-keywords. (makefile-mode): Use it. (makefile-imake-mode): Adjust. * lisp/progmodes/mixal-mode.el (mixal-syntax-propertize-function): New var; replaces mixal-font-lock-syntactic-keywords. (mixal-mode): Use it. * lisp/progmodes/octave-mod.el (octave-syntax-propertize-sqs): New function to replace octave-font-lock-close-quotes. (octave-syntax-propertize-function): New function to replace octave-font-lock-syntactic-keywords. (octave-mode): Use it. * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): New fun to replace perl-font-lock-syntactic-keywords. (perl-syntax-propertize-special-constructs): New fun to replace perl-font-lock-special-syntactic-constructs. (perl-font-lock-syntactic-face-function): New fun. (perl-mode): Use it. * lisp/progmodes/python.el (python-syntax-propertize-function): New var to replace python-font-lock-syntactic-keywords. (python-mode): Use it. (python-quote-syntax): Simplify and adjust to new use. * lisp/progmodes/ruby-mode.el (ruby-here-doc-beg-re): Define while compiling. (ruby-here-doc-end-re, ruby-here-doc-beg-match) (ruby-font-lock-syntactic-keywords, ruby-comment-beg-syntax) (syntax-ppss, ruby-in-ppss-context-p, ruby-in-here-doc-p) (ruby-here-doc-find-end, ruby-here-doc-beg-syntax) (ruby-here-doc-end-syntax): Only define when syntax-propertize is not available. (ruby-syntax-propertize-function, ruby-syntax-propertize-heredoc): New functions. (ruby-in-ppss-context-p): Update to new syntax of heredocs. (electric-indent-chars): Silence bytecompiler. (ruby-mode): Use prog-mode, syntax-propertize-function, and electric-indent-chars. * lisp/progmodes/sh-script.el (sh-st-symbol): Remove. (sh-font-lock-close-heredoc, sh-font-lock-open-heredoc): Add eol arg. (sh-font-lock-flush-syntax-ppss-cache, sh-font-lock-here-doc): Remove. (sh-font-lock-quoted-subshell): Assume we've already matched $(. (sh-font-lock-paren): Set syntax-multiline. (sh-font-lock-syntactic-keywords): Remove. (sh-syntax-propertize-function): New function to replace it. (sh-mode): Use it. * lisp/progmodes/simula.el (simula-syntax-propertize-function): New var to replace simula-font-lock-syntactic-keywords. (simula-mode): Use it. * lisp/progmodes/tcl.el (tcl-syntax-propertize-function): New var to replace tcl-font-lock-syntactic-keywords. (tcl-mode): Use it. * lisp/progmodes/vhdl-mode.el (vhdl-mode): Use syntax-propertize-function if available. (vhdl-fontify-buffer): Adjust. * lisp/textmodes/bibtex.el (bibtex-mode): Use syntax-propertize-function. * lisp/textmodes/reftex.el (font-lock-syntactic-keywords): Don't declare since we don't use it. * lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-function): New var to replace sgml-font-lock-syntactic-keywords. (sgml-mode): Use it. * lisp/textmodes/tex-mode.el (tex-common-initialization, doctex-mode): Use syntax-propertize-function. * lisp/textmodes/texinfo.el (texinfo-syntax-propertize-function): New fun to replace texinfo-font-lock-syntactic-keywords. (texinfo-mode): Use it. * test/indent/octave.m: Remove some `fixindent' not needed any more.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 11 Sep 2010 01:13:42 +0200
parents 1d1d5d9bd884
children 376148b31b5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
105407
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
1 ;;; cpp.srt --- SRecode templates for c++-mode
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
2
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 105407
diff changeset
3 ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
105407
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
4
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
5 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
6
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
7 ;; This file is part of GNU Emacs.
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
8
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
9 ;; GNU Emacs is free software: you can redistribute it and/or modify
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
10 ;; it under the terms of the GNU General Public License as published by
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
11 ;; the Free Software Foundation, either version 3 of the License, or
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
12 ;; (at your option) any later version.
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
13
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
14 ;; GNU Emacs is distributed in the hope that it will be useful,
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
17 ;; GNU General Public License for more details.
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
18
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
19 ;; You should have received a copy of the GNU General Public License
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
20 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
21
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
22 set mode "c++-mode"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
23
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
24 set comment_start "/**"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
25 set comment_end " */"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
26 set comment_prefix " *"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
27
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
28 ;; OVERRIDE THIS in your user or project template file to whatever
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
29 ;; you use for your project.
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
30 set HEADEREXT ".h"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
31
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
32 context file
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
33
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
34 template empty :time :user :file :cpp
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
35 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
36 {{>:filecomment}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
37
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
38 {{#NOTHEADER}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
39
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
40 {{^}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
41 {{/NOTHEADER}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
42 {{#HEADER}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
43 {{>:header_guard}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
44 {{/HEADER}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
45 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
46
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
47 template header_guard :file :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
48 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
49 #ifndef {{FILENAME_SYMBOL}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
50 #define {{FILENAME_SYMBOL}} 1
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
51
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
52 {{^}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
53
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
54 #endif // {{FILENAME_SYMBOL}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
55 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
56
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
57 context misc
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
58
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
59 template arglist
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
60 "Insert an argument list for a function.
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
61 @todo - Support smart CR in a buffer for not too long lines."
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
62 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
63 ({{#ARGS}}{{TYPE}} {{NAME}}{{#NOTLAST}},{{/NOTLAST}}{{/ARGS}})
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
64 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
65
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
66 context declaration
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
67
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
68 prompt TYPE "Return Type: "
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
69
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
70 template function :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
71 "Insert a function declaration."
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
72 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
73 {{?TYPE}} {{?NAME}}{{>:misc:arglist}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
74 {{#INITIALIZERS}}{{>B:initializers}}{{/INITIALIZERS}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
75 {
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
76 {{^}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
77 }
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
78 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
79 bind "f"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
80
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
81 template function-prototype :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
82 "Insert a function declaration."
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
83 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
84 {{?TYPE}} {{?NAME}}{{>:misc:arglist}};
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
85 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
86
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
87
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
88 prompt TYPE "Data Type: "
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
89
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
90 template variable :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
91 "Insert a variable declaration."
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
92 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
93 {{?TYPE}} {{?NAME}}{{#HAVEDEFAULT}} = {{DEFAULT}}{{/HAVEDEFAULT}};
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
94 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
95 bind "v"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
96
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
97 template variable-prototype :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
98 "Insert a variable declaration."
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
99 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
100 {{?TYPE}} {{?NAME}};
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
101 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
102 bind "v"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
103
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
104 template class :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
105 "Insert a C++ class. For use by user insertion.
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
106 Override this template to change contents of a class.
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
107 Override `class-tag' to override the outer structure of the class."
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
108 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
109 {{<A:class-tag}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
110 public:
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
111 {{>CONSTRUCTOR:classdecl:constructor-tag}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
112 {{>DESTRUCTOR:classdecl:destructor-tag}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
113 private:
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
114 {{^}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
115
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
116 {{/A}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
117 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
118
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
119 template subclass :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
120 "Insert a C++ subclass of some other class."
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
121 sectiondictionary "PARENTS"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
122 set NAME "?PARENTNAME"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
123 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
124 {{>A:class}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
125 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
126
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
127 template class-tag :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
128 "Insert a C++ class with the expectation of it being used by a tag inserter.
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
129 Override this to affect applications, or the outer class structure for
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
130 the user-facing template."
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
131 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
132 class {{?NAME}} {{#PARENTS}}{{#FIRST}}: {{/FIRST}}public {{NAME}}{{/PARENTS}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
133 {
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
134 {{^}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
135 };
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
136 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
137 bind "c"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
138
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
139 template method :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
140 "Method belonging to some class, declared externally."
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
141 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
142 {{?TYPE}} {{?PARENT}}::{{?NAME}}{{>:misc:arglist}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
143 {{#INITIALIZERS}}{{>B:initializers}}{{/INITIALIZERS}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
144 {
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
145 {{^}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
146 }
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
147 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
148
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
149 template include :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
150 "An include statement."
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
151 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
152 #include "{{?NAME}}"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
153 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
154 bind "i"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
155
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
156 template label :blank :indent
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
157 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
158 {{?NAME}}:
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
159 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
160
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
161 context classdecl
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
162
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
163 template constructor-tag :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
164 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
165 {{?NAME}}{{>:misc:arglist}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
166 { {{^}} }
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
167 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
168
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
169 ;; This one really sucks. How can I finish it?
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
170 template initializers :indent
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
171 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
172 {{#FIRST}}:
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
173 {{/FIRST}}{{INITNAME}}(){{#NOTLAST}},{{/NOTLAST}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
174 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
175
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
176 template destructor-tag :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
177 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
178 ~{{?NAME}}{{>:misc:arglist}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
179 { {{^}} }
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
180 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
181
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
182 ;;; Base Comment functions for overriding.
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
183 context classdecl
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
184
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
185 template comment-function-group-start :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
186 "Used for putting comments in front of a functional group of declarations.
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
187 Override this with your own preference to avoid using doxygen."
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
188 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
189 {{>A:classdecl:doxygen-function-group-start}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
190 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
191
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
192 template comment-function-group-end :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
193 "Used for putting comments in front of a functional group of declarations.
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
194 Override this with your own preference to avoid using doxygen."
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
195 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
196 {{>A:classdecl:doxygen-function-group-end}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
197 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
198
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
199 context declaration
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
200
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
201 template comment-function :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
202 "Used to put a nice comment in front of a function.
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
203 Override this with your own preference to avoid using doxygen"
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
204 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
205 {{>A:declaration:doxygen-function}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
206 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
207
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
208 ;;; DOXYGEN FEATURES
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
209 ;;
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
210 ;;
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
211 context classdecl
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
212
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
213 prompt GROUPNAME "Name of declaration group: "
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
214
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
215 template doxygen-function-group-start :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
216 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
217 /**
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
218 * {{?GROUPNAME}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
219 * @{
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
220 */
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
221
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
222 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
223
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
224 template doxygen-function-group-end :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
225 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
226 /**
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
227 * @}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
228 */
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
229
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
230 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
231
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
232 context declaration
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
233
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
234 template doxygen-function :indent :blank
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
235 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
236 /**
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
237 * @name {{NAME}} - {{DOC}}{{^}}{{#ARGS}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
238 * @param {{NAME}} - {{DOC}}{{/ARGS}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
239 * @return {{TYPE}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
240 */
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
241 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
242
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
243 template doxygen-variable-same-line
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
244 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
245 /**< {{DOC}}{{^}} */
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
246 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
247
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
248 template doxygen-section-comment :blank :indent
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
249 "Insert a comment that separates sections of an Emacs Lisp file."
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
250 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
251
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
252 /** {{?TITLE}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
253 *
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
254 * {{^}}
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
255 */
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
256
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
257 ----
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
258
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
259
84fc40980c51 * srecode: New directory for SRecode template files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
260 ;; end