summaryrefslogtreecommitdiff
path: root/etc/srecode
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-10-02 02:10:29 +0800
committerChong Yidong <cyd@gnu.org>2012-10-02 02:10:29 +0800
commit62a81506f802e4824b718cc30321ee3a0057cdf7 (patch)
treed681d7b767b1c3f7e4aee24ce39f6bef0d7f1f7e /etc/srecode
parentb3317662acc0157406c20c8e14c43b7126eaa8a0 (diff)
downloademacs-62a81506f802e4824b718cc30321ee3a0057cdf7.tar.gz
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 @@
+;;; c.srt --- SRecode templates for c-mode
+
+;; Copyright (C) 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc.
+
+;; Author: Eric M. Ludlam <eric@siege-engine.com>
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+set mode "c-mode"
+
+set comment_start "/**"
+set comment_end " */"
+set comment_prefix " *"
+
+;; OVERRIDE THIS in your user or project template file to whatever
+;; you use for your project.
+set HEADEREXT ".h"
+
+context file
+
+template empty :time :user :file :c
+----
+{{>:filecomment}}
+
+{{#NOTHEADER}}
+
+{{^}}
+{{/NOTHEADER}}
+{{#HEADER}}
+{{>:header_guard}}
+{{/HEADER}}
+----
+
+template header_guard :file :blank
+----
+#ifndef {{FILENAME_SYMBOL}}
+#define {{FILENAME_SYMBOL}} 1
+
+{{^}}
+
+#endif // {{FILENAME_SYMBOL}}
+----
+
+context misc
+
+template arglist
+"Insert an argument list for a function.
+@todo - Support smart CR in a buffer for not too long lines."
+----
+({{#ARGS}}{{TYPE}} {{NAME}}{{#NOTLAST}},{{/NOTLAST}}{{/ARGS}})
+----
+
+context declaration
+
+prompt TYPE "Return Type: "
+
+template function :indent :blank
+"Insert a function declaration."
+----
+{{?TYPE}} {{?NAME}}{{>:misc:arglist}}
+{{#INITIALIZERS}}{{>B:initializers}}{{/INITIALIZERS}}
+{
+{{^}}
+}
+----
+bind "f"
+
+template function-prototype :indent :blank
+"Insert a function declaration."
+----
+{{?TYPE}} {{?NAME}}{{>:misc:arglist}};
+----
+
+
+prompt TYPE "Data Type: "
+
+template variable :indent :blank
+"Insert a variable declaration."
+----
+{{?TYPE}} {{?NAME}}{{#HAVEDEFAULT}} = {{DEFAULT}}{{/HAVEDEFAULT}};
+----
+bind "v"
+
+template variable-prototype :indent :blank
+"Insert a variable declaration."
+----
+{{?TYPE}} {{?NAME}};
+----
+bind "v"
+
+
+template include :blank
+"An include statement."
+----
+#include "{{?NAME}}"
+----
+bind "i"
+
+template system-include :blank
+"An include statement."
+----
+#include <{{?NAME}}>
+----
+bind "i"
+
+template label :blank :indent
+----
+ {{?NAME}}:
+----
+
+context declaration
+
+template comment-function :indent :blank
+"Used to put a nice comment in front of a function.
+Override this with your own preference to avoid using doxygen"
+----
+{{>A:declaration:doxygen-function}}
+----
+
+;;; DOXYGEN FEATURES
+;;
+;;
+context declaration
+
+template doxygen-function :indent :blank
+----
+/**
+ * @name {{NAME}} - {{DOC}}{{^}}{{#ARGS}}
+ * @param {{NAME}} - {{DOC}}{{/ARGS}}
+ * @return {{TYPE}}
+ */
+----
+
+template doxygen-variable-same-line
+----
+/**< {{DOC}}{{^}} */
+----
+
+template doxygen-section-comment :blank :indent
+"Insert a comment that separates sections of an Emacs Lisp file."
+----
+
+/** {{?TITLE}}
+ *
+ * {{^}}
+ */
+
+----
+
+
+;; 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 "/**"
set comment_end " */"
set comment_prefix " *"
-;; OVERRIDE THIS in your user or project template file to whatever
-;; you use for your project.
-set HEADEREXT ".h"
-
-context file
-
-template empty :time :user :file :cpp
-----
-{{>:filecomment}}
-
-{{#NOTHEADER}}
-
-{{^}}
-{{/NOTHEADER}}
-{{#HEADER}}
-{{>:header_guard}}
-{{/HEADER}}
-----
-
-template header_guard :file :blank
-----
-#ifndef {{FILENAME_SYMBOL}}
-#define {{FILENAME_SYMBOL}} 1
-
-{{^}}
-
-#endif // {{FILENAME_SYMBOL}}
-----
-
-context misc
-
-template arglist
-"Insert an argument list for a function.
-@todo - Support smart CR in a buffer for not too long lines."
-----
-({{#ARGS}}{{TYPE}} {{NAME}}{{#NOTLAST}},{{/NOTLAST}}{{/ARGS}})
-----
-
context declaration
-prompt TYPE "Return Type: "
-
-template function :indent :blank
-"Insert a function declaration."
-----
-{{?TYPE}} {{?NAME}}{{>:misc:arglist}}
-{{#INITIALIZERS}}{{>B:initializers}}{{/INITIALIZERS}}
-{
-{{^}}
-}
-----
-bind "f"
-
-template function-prototype :indent :blank
-"Insert a function declaration."
-----
-{{?TYPE}} {{?NAME}}{{>:misc:arglist}};
-----
-
-
-prompt TYPE "Data Type: "
-
-template variable :indent :blank
-"Insert a variable declaration."
-----
-{{?TYPE}} {{?NAME}}{{#HAVEDEFAULT}} = {{DEFAULT}}{{/HAVEDEFAULT}};
-----
-bind "v"
-
-template variable-prototype :indent :blank
-"Insert a variable declaration."
-----
-{{?TYPE}} {{?NAME}};
-----
-bind "v"
-
template class :indent :blank
"Insert a C++ class. For use by user insertion.
Override this template to change contents of a class.
@@ -146,18 +72,6 @@ template method :indent :blank
}
----
-template include :blank
-"An include statement."
-----
-#include "{{?NAME}}"
-----
-bind "i"
-
-template label :blank :indent
-----
- {{?NAME}}:
-----
-
context classdecl
template constructor-tag :indent :blank
@@ -196,15 +110,6 @@ Override this with your own preference to avoid using doxygen."
{{>A:classdecl:doxygen-function-group-end}}
----
-context declaration
-
-template comment-function :indent :blank
-"Used to put a nice comment in front of a function.
-Override this with your own preference to avoid using doxygen"
-----
-{{>A:declaration:doxygen-function}}
-----
-
;;; DOXYGEN FEATURES
;;
;;
@@ -229,32 +134,4 @@ template doxygen-function-group-end :indent :blank
----
-context declaration
-
-template doxygen-function :indent :blank
-----
-/**
- * @name {{NAME}} - {{DOC}}{{^}}{{#ARGS}}
- * @param {{NAME}} - {{DOC}}{{/ARGS}}
- * @return {{TYPE}}
- */
-----
-
-template doxygen-variable-same-line
-----
-/**< {{DOC}}{{^}} */
-----
-
-template doxygen-section-comment :blank :indent
-"Insert a comment that separates sections of an Emacs Lisp file."
-----
-
-/** {{?TITLE}}
- *
- * {{^}}
- */
-
-----
-
-
;; 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 @@
+;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE.
+;;
+;; Copyright (C) 2010 Eric M. Ludlam
+;;
+;; Author: Eric M. Ludlam <eric@siege-engine.com>
+;;
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+set mode "autoconf-mode"
+set escape_start "{{"
+set escape_end "}}"
+set comment_start "#"
+set comment_prefix "#"
+set application "ede"
+
+context file
+
+template ede-empty
+"Start a new EDE generated configure.in/ac file."
+----
+{{comment_prefix}} Automatically Generated/Maintained {{FILE}} by EDE.
+{{comment_prefix}}
+{{comment_prefix}} YOU MAY MODIFY THIS FILE
+{{comment_prefix}} Hand made changes in some sections will be preserved
+{{comment_prefix}} by EDE when this file is updated.
+{{comment_prefix}}
+{{comment_prefix}} EDE is the Emacs Development Environment.
+{{comment_prefix}} http://cedet.sourceforge.net/ede.shtml
+{{comment_prefix}}
+{{comment_prefix}} Process this file with autoconf to produce a configure script
+
+AC_INIT({{TEST_FILE}})
+AM_INIT_AUTOMAKE([{{PROGRAM}}], 0)
+AM_CONFIG_HEADER(config.h)
+
+{{comment_prefix}} End the configure script.
+AC_OUTPUT(Makefile, [date > stamp-h] )
+----
+
+
+;; 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
{{NAME}}={{#VALUE}} {{VAL}}{{/VALUE}}{{/VARIABLE}}
----
+;; Some extra templates for Arduino based Makefiles.
+;; Perhaps split this out someday in the future.
+context arduino
+
+template ede-empty :file
+----
+# Automatically Generated {{FILE}} by EDE.
+# For use with Make for an Arduino project.
+#
+# DO NOT MODIFY THIS FILE OR YOUR CHANGES MAY BE LOST.
+# EDE is the Emacs Development Environment.
+# http://cedet.sourceforge.net/ede.shtml
+
+ARDUINO_DIR = {{ARDUINO_HOME}}
+
+TARGET = {{TARGET}}
+ARDUINO_LIBS = {{ARDUINO_LIBS}}
+
+MCU = {{MCU}}
+F_CPU = {{F_CPU}}
+ARDUINO_PORT = {{PORT}}
+BOARD_TAG = {{BOARD}}
+
+AVRDUDE_ARD_BAUDRATE = {{AVRDUDE_ARD_BAUDRATE}}
+AVRDUDE_ARD_PROGRAMMER = {{AVRDUDE_ARD_PROGRAMMER}}
+
+include {{ARDUINO_MK}}
+
+# End of Makefile
+----
+
+
;; 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
----
(defcustom $?NAME$ $^$
"*$DOC$"
- :group $GROUP$
+ :group '$GROUP$
:type $?CUSTOMTYPE$)
----
bind "o"