aboutsummaryrefslogtreecommitdiffstats
path: root/etc/srecode
diff options
context:
space:
mode:
authorChong Yidong2012-10-02 02:10:29 +0800
committerChong Yidong2012-10-02 02:10:29 +0800
commit62a81506f802e4824b718cc30321ee3a0057cdf7 (patch)
treed681d7b767b1c3f7e4aee24ce39f6bef0d7f1f7e /etc/srecode
parentb3317662acc0157406c20c8e14c43b7126eaa8a0 (diff)
downloademacs-62a81506f802e4824b718cc30321ee3a0057cdf7.tar.gz
emacs-62a81506f802e4824b718cc30321ee3a0057cdf7.zip
Update CEDET from upstream.
Diffstat (limited to 'etc/srecode')
-rw-r--r--etc/srecode/c.srt164
-rw-r--r--etc/srecode/cpp.srt123
-rw-r--r--etc/srecode/ede-autoconf.srt54
-rw-r--r--etc/srecode/ede-make.srt32
-rw-r--r--etc/srecode/el.srt2
5 files changed, 251 insertions, 124 deletions
diff --git a/etc/srecode/c.srt b/etc/srecode/c.srt
new file mode 100644
index 00000000000..14d51ed02e6
--- /dev/null
+++ b/etc/srecode/c.srt
@@ -0,0 +1,164 @@
1;;; c.srt --- SRecode templates for c-mode
2
3;; Copyright (C) 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc.
4
5;; Author: Eric M. Ludlam <eric@siege-engine.com>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22set mode "c-mode"
23
24set comment_start "/**"
25set comment_end " */"
26set comment_prefix " *"
27
28;; OVERRIDE THIS in your user or project template file to whatever
29;; you use for your project.
30set HEADEREXT ".h"
31
32context file
33
34template empty :time :user :file :c
35----
36{{>:filecomment}}
37
38{{#NOTHEADER}}
39
40{{^}}
41{{/NOTHEADER}}
42{{#HEADER}}
43{{>:header_guard}}
44{{/HEADER}}
45----
46
47template header_guard :file :blank
48----
49#ifndef {{FILENAME_SYMBOL}}
50#define {{FILENAME_SYMBOL}} 1
51
52{{^}}
53
54#endif // {{FILENAME_SYMBOL}}
55----
56
57context misc
58
59template arglist
60"Insert an argument list for a function.
61@todo - Support smart CR in a buffer for not too long lines."
62----
63({{#ARGS}}{{TYPE}} {{NAME}}{{#NOTLAST}},{{/NOTLAST}}{{/ARGS}})
64----
65
66context declaration
67
68prompt TYPE "Return Type: "
69
70template function :indent :blank
71"Insert a function declaration."
72----
73{{?TYPE}} {{?NAME}}{{>:misc:arglist}}
74{{#INITIALIZERS}}{{>B:initializers}}{{/INITIALIZERS}}
75{
76{{^}}
77}
78----
79bind "f"
80
81template function-prototype :indent :blank
82"Insert a function declaration."
83----
84{{?TYPE}} {{?NAME}}{{>:misc:arglist}};
85----
86
87
88prompt TYPE "Data Type: "
89
90template variable :indent :blank
91"Insert a variable declaration."
92----
93{{?TYPE}} {{?NAME}}{{#HAVEDEFAULT}} = {{DEFAULT}}{{/HAVEDEFAULT}};
94----
95bind "v"
96
97template variable-prototype :indent :blank
98"Insert a variable declaration."
99----
100{{?TYPE}} {{?NAME}};
101----
102bind "v"
103
104
105template include :blank
106"An include statement."
107----
108#include "{{?NAME}}"
109----
110bind "i"
111
112template system-include :blank
113"An include statement."
114----
115#include <{{?NAME}}>
116----
117bind "i"
118
119template label :blank :indent
120----
121 {{?NAME}}:
122----
123
124context declaration
125
126template comment-function :indent :blank
127"Used to put a nice comment in front of a function.
128Override this with your own preference to avoid using doxygen"
129----
130{{>A:declaration:doxygen-function}}
131----
132
133;;; DOXYGEN FEATURES
134;;
135;;
136context declaration
137
138template doxygen-function :indent :blank
139----
140/**
141 * @name {{NAME}} - {{DOC}}{{^}}{{#ARGS}}
142 * @param {{NAME}} - {{DOC}}{{/ARGS}}
143 * @return {{TYPE}}
144 */
145----
146
147template doxygen-variable-same-line
148----
149/**< {{DOC}}{{^}} */
150----
151
152template doxygen-section-comment :blank :indent
153"Insert a comment that separates sections of an Emacs Lisp file."
154----
155
156/** {{?TITLE}}
157 *
158 * {{^}}
159 */
160
161----
162
163
164;; end
diff --git a/etc/srecode/cpp.srt b/etc/srecode/cpp.srt
index 16cfc535761..f73dcd2a1ca 100644
--- a/etc/srecode/cpp.srt
+++ b/etc/srecode/cpp.srt
@@ -25,82 +25,8 @@ set comment_start "/**"
25set comment_end " */" 25set comment_end " */"
26set comment_prefix " *" 26set comment_prefix " *"
27 27
28;; OVERRIDE THIS in your user or project template file to whatever
29;; you use for your project.
30set HEADEREXT ".h"
31
32context file
33
34template empty :time :user :file :cpp
35----
36{{>:filecomment}}
37
38{{#NOTHEADER}}
39
40{{^}}
41{{/NOTHEADER}}
42{{#HEADER}}
43{{>:header_guard}}
44{{/HEADER}}
45----
46
47template header_guard :file :blank
48----
49#ifndef {{FILENAME_SYMBOL}}
50#define {{FILENAME_SYMBOL}} 1
51
52{{^}}
53
54#endif // {{FILENAME_SYMBOL}}
55----
56
57context misc
58
59template arglist
60"Insert an argument list for a function.
61@todo - Support smart CR in a buffer for not too long lines."
62----
63({{#ARGS}}{{TYPE}} {{NAME}}{{#NOTLAST}},{{/NOTLAST}}{{/ARGS}})
64----
65
66context declaration 28context declaration
67 29
68prompt TYPE "Return Type: "
69
70template function :indent :blank
71"Insert a function declaration."
72----
73{{?TYPE}} {{?NAME}}{{>:misc:arglist}}
74{{#INITIALIZERS}}{{>B:initializers}}{{/INITIALIZERS}}
75{
76{{^}}
77}
78----
79bind "f"
80
81template function-prototype :indent :blank
82"Insert a function declaration."
83----
84{{?TYPE}} {{?NAME}}{{>:misc:arglist}};
85----
86
87
88prompt TYPE "Data Type: "
89
90template variable :indent :blank
91"Insert a variable declaration."
92----
93{{?TYPE}} {{?NAME}}{{#HAVEDEFAULT}} = {{DEFAULT}}{{/HAVEDEFAULT}};
94----
95bind "v"
96
97template variable-prototype :indent :blank
98"Insert a variable declaration."
99----
100{{?TYPE}} {{?NAME}};
101----
102bind "v"
103
104template class :indent :blank 30template class :indent :blank
105"Insert a C++ class. For use by user insertion. 31"Insert a C++ class. For use by user insertion.
106Override this template to change contents of a class. 32Override this template to change contents of a class.
@@ -146,18 +72,6 @@ template method :indent :blank
146} 72}
147---- 73----
148 74
149template include :blank
150"An include statement."
151----
152#include "{{?NAME}}"
153----
154bind "i"
155
156template label :blank :indent
157----
158 {{?NAME}}:
159----
160
161context classdecl 75context classdecl
162 76
163template constructor-tag :indent :blank 77template constructor-tag :indent :blank
@@ -196,15 +110,6 @@ Override this with your own preference to avoid using doxygen."
196{{>A:classdecl:doxygen-function-group-end}} 110{{>A:classdecl:doxygen-function-group-end}}
197---- 111----
198 112
199context declaration
200
201template comment-function :indent :blank
202"Used to put a nice comment in front of a function.
203Override this with your own preference to avoid using doxygen"
204----
205{{>A:declaration:doxygen-function}}
206----
207
208;;; DOXYGEN FEATURES 113;;; DOXYGEN FEATURES
209;; 114;;
210;; 115;;
@@ -229,32 +134,4 @@ template doxygen-function-group-end :indent :blank
229 134
230---- 135----
231 136
232context declaration
233
234template doxygen-function :indent :blank
235----
236/**
237 * @name {{NAME}} - {{DOC}}{{^}}{{#ARGS}}
238 * @param {{NAME}} - {{DOC}}{{/ARGS}}
239 * @return {{TYPE}}
240 */
241----
242
243template doxygen-variable-same-line
244----
245/**< {{DOC}}{{^}} */
246----
247
248template doxygen-section-comment :blank :indent
249"Insert a comment that separates sections of an Emacs Lisp file."
250----
251
252/** {{?TITLE}}
253 *
254 * {{^}}
255 */
256
257----
258
259
260;; end 137;; end
diff --git a/etc/srecode/ede-autoconf.srt b/etc/srecode/ede-autoconf.srt
new file mode 100644
index 00000000000..daefd532dff
--- /dev/null
+++ b/etc/srecode/ede-autoconf.srt
@@ -0,0 +1,54 @@
1;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE.
2;;
3;; Copyright (C) 2010 Eric M. Ludlam
4;;
5;; Author: Eric M. Ludlam <eric@siege-engine.com>
6;;
7;; This program is free software; you can redistribute it and/or
8;; modify it under the terms of the GNU General Public License as
9;; published by the Free Software Foundation; either version 2, or (at
10;; your option) any later version.
11
12;; This program is distributed in the hope that it will be useful, but
13;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15;; General Public License for more details.
16
17;; You should have received a copy of the GNU General Public License
18;; along with this program; see the file COPYING. If not, write to
19;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20;; Boston, MA 02110-1301, USA.
21
22set mode "autoconf-mode"
23set escape_start "{{"
24set escape_end "}}"
25set comment_start "#"
26set comment_prefix "#"
27set application "ede"
28
29context file
30
31template ede-empty
32"Start a new EDE generated configure.in/ac file."
33----
34{{comment_prefix}} Automatically Generated/Maintained {{FILE}} by EDE.
35{{comment_prefix}}
36{{comment_prefix}} YOU MAY MODIFY THIS FILE
37{{comment_prefix}} Hand made changes in some sections will be preserved
38{{comment_prefix}} by EDE when this file is updated.
39{{comment_prefix}}
40{{comment_prefix}} EDE is the Emacs Development Environment.
41{{comment_prefix}} http://cedet.sourceforge.net/ede.shtml
42{{comment_prefix}}
43{{comment_prefix}} Process this file with autoconf to produce a configure script
44
45AC_INIT({{TEST_FILE}})
46AM_INIT_AUTOMAKE([{{PROGRAM}}], 0)
47AM_CONFIG_HEADER(config.h)
48
49{{comment_prefix}} End the configure script.
50AC_OUTPUT(Makefile, [date > stamp-h] )
51----
52
53
54;; end
diff --git a/etc/srecode/ede-make.srt b/etc/srecode/ede-make.srt
index 97725f4ff56..0b024cd30e4 100644
--- a/etc/srecode/ede-make.srt
+++ b/etc/srecode/ede-make.srt
@@ -46,4 +46,36 @@ template ede-vars
46{{NAME}}={{#VALUE}} {{VAL}}{{/VALUE}}{{/VARIABLE}} 46{{NAME}}={{#VALUE}} {{VAL}}{{/VALUE}}{{/VARIABLE}}
47---- 47----
48 48
49;; Some extra templates for Arduino based Makefiles.
50;; Perhaps split this out someday in the future.
51context arduino
52
53template ede-empty :file
54----
55# Automatically Generated {{FILE}} by EDE.
56# For use with Make for an Arduino project.
57#
58# DO NOT MODIFY THIS FILE OR YOUR CHANGES MAY BE LOST.
59# EDE is the Emacs Development Environment.
60# http://cedet.sourceforge.net/ede.shtml
61
62ARDUINO_DIR = {{ARDUINO_HOME}}
63
64TARGET = {{TARGET}}
65ARDUINO_LIBS = {{ARDUINO_LIBS}}
66
67MCU = {{MCU}}
68F_CPU = {{F_CPU}}
69ARDUINO_PORT = {{PORT}}
70BOARD_TAG = {{BOARD}}
71
72AVRDUDE_ARD_BAUDRATE = {{AVRDUDE_ARD_BAUDRATE}}
73AVRDUDE_ARD_PROGRAMMER = {{AVRDUDE_ARD_PROGRAMMER}}
74
75include {{ARDUINO_MK}}
76
77# End of Makefile
78----
79
80
49;; end 81;; end
diff --git a/etc/srecode/el.srt b/etc/srecode/el.srt
index cc5af736f15..34a8983b29f 100644
--- a/etc/srecode/el.srt
+++ b/etc/srecode/el.srt
@@ -197,7 +197,7 @@ template variable-option :el :el-custom :indent :blank
197---- 197----
198(defcustom $?NAME$ $^$ 198(defcustom $?NAME$ $^$
199 "*$DOC$" 199 "*$DOC$"
200 :group $GROUP$ 200 :group '$GROUP$
201 :type $?CUSTOMTYPE$) 201 :type $?CUSTOMTYPE$)
202---- 202----
203bind "o" 203bind "o"