diff options
| author | Chong Yidong | 2012-10-02 02:10:29 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-10-02 02:10:29 +0800 |
| commit | 62a81506f802e4824b718cc30321ee3a0057cdf7 (patch) | |
| tree | d681d7b767b1c3f7e4aee24ce39f6bef0d7f1f7e /etc/srecode | |
| parent | b3317662acc0157406c20c8e14c43b7126eaa8a0 (diff) | |
| download | emacs-62a81506f802e4824b718cc30321ee3a0057cdf7.tar.gz emacs-62a81506f802e4824b718cc30321ee3a0057cdf7.zip | |
Update CEDET from upstream.
Diffstat (limited to 'etc/srecode')
| -rw-r--r-- | etc/srecode/c.srt | 164 | ||||
| -rw-r--r-- | etc/srecode/cpp.srt | 123 | ||||
| -rw-r--r-- | etc/srecode/ede-autoconf.srt | 54 | ||||
| -rw-r--r-- | etc/srecode/ede-make.srt | 32 | ||||
| -rw-r--r-- | etc/srecode/el.srt | 2 |
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 | |||
| 22 | set mode "c-mode" | ||
| 23 | |||
| 24 | set comment_start "/**" | ||
| 25 | set comment_end " */" | ||
| 26 | set comment_prefix " *" | ||
| 27 | |||
| 28 | ;; OVERRIDE THIS in your user or project template file to whatever | ||
| 29 | ;; you use for your project. | ||
| 30 | set HEADEREXT ".h" | ||
| 31 | |||
| 32 | context file | ||
| 33 | |||
| 34 | template empty :time :user :file :c | ||
| 35 | ---- | ||
| 36 | {{>:filecomment}} | ||
| 37 | |||
| 38 | {{#NOTHEADER}} | ||
| 39 | |||
| 40 | {{^}} | ||
| 41 | {{/NOTHEADER}} | ||
| 42 | {{#HEADER}} | ||
| 43 | {{>:header_guard}} | ||
| 44 | {{/HEADER}} | ||
| 45 | ---- | ||
| 46 | |||
| 47 | template header_guard :file :blank | ||
| 48 | ---- | ||
| 49 | #ifndef {{FILENAME_SYMBOL}} | ||
| 50 | #define {{FILENAME_SYMBOL}} 1 | ||
| 51 | |||
| 52 | {{^}} | ||
| 53 | |||
| 54 | #endif // {{FILENAME_SYMBOL}} | ||
| 55 | ---- | ||
| 56 | |||
| 57 | context misc | ||
| 58 | |||
| 59 | template 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 | |||
| 66 | context declaration | ||
| 67 | |||
| 68 | prompt TYPE "Return Type: " | ||
| 69 | |||
| 70 | template function :indent :blank | ||
| 71 | "Insert a function declaration." | ||
| 72 | ---- | ||
| 73 | {{?TYPE}} {{?NAME}}{{>:misc:arglist}} | ||
| 74 | {{#INITIALIZERS}}{{>B:initializers}}{{/INITIALIZERS}} | ||
| 75 | { | ||
| 76 | {{^}} | ||
| 77 | } | ||
| 78 | ---- | ||
| 79 | bind "f" | ||
| 80 | |||
| 81 | template function-prototype :indent :blank | ||
| 82 | "Insert a function declaration." | ||
| 83 | ---- | ||
| 84 | {{?TYPE}} {{?NAME}}{{>:misc:arglist}}; | ||
| 85 | ---- | ||
| 86 | |||
| 87 | |||
| 88 | prompt TYPE "Data Type: " | ||
| 89 | |||
| 90 | template variable :indent :blank | ||
| 91 | "Insert a variable declaration." | ||
| 92 | ---- | ||
| 93 | {{?TYPE}} {{?NAME}}{{#HAVEDEFAULT}} = {{DEFAULT}}{{/HAVEDEFAULT}}; | ||
| 94 | ---- | ||
| 95 | bind "v" | ||
| 96 | |||
| 97 | template variable-prototype :indent :blank | ||
| 98 | "Insert a variable declaration." | ||
| 99 | ---- | ||
| 100 | {{?TYPE}} {{?NAME}}; | ||
| 101 | ---- | ||
| 102 | bind "v" | ||
| 103 | |||
| 104 | |||
| 105 | template include :blank | ||
| 106 | "An include statement." | ||
| 107 | ---- | ||
| 108 | #include "{{?NAME}}" | ||
| 109 | ---- | ||
| 110 | bind "i" | ||
| 111 | |||
| 112 | template system-include :blank | ||
| 113 | "An include statement." | ||
| 114 | ---- | ||
| 115 | #include <{{?NAME}}> | ||
| 116 | ---- | ||
| 117 | bind "i" | ||
| 118 | |||
| 119 | template label :blank :indent | ||
| 120 | ---- | ||
| 121 | {{?NAME}}: | ||
| 122 | ---- | ||
| 123 | |||
| 124 | context declaration | ||
| 125 | |||
| 126 | template comment-function :indent :blank | ||
| 127 | "Used to put a nice comment in front of a function. | ||
| 128 | Override this with your own preference to avoid using doxygen" | ||
| 129 | ---- | ||
| 130 | {{>A:declaration:doxygen-function}} | ||
| 131 | ---- | ||
| 132 | |||
| 133 | ;;; DOXYGEN FEATURES | ||
| 134 | ;; | ||
| 135 | ;; | ||
| 136 | context declaration | ||
| 137 | |||
| 138 | template doxygen-function :indent :blank | ||
| 139 | ---- | ||
| 140 | /** | ||
| 141 | * @name {{NAME}} - {{DOC}}{{^}}{{#ARGS}} | ||
| 142 | * @param {{NAME}} - {{DOC}}{{/ARGS}} | ||
| 143 | * @return {{TYPE}} | ||
| 144 | */ | ||
| 145 | ---- | ||
| 146 | |||
| 147 | template doxygen-variable-same-line | ||
| 148 | ---- | ||
| 149 | /**< {{DOC}}{{^}} */ | ||
| 150 | ---- | ||
| 151 | |||
| 152 | template 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 "/**" | |||
| 25 | set comment_end " */" | 25 | set comment_end " */" |
| 26 | set comment_prefix " *" | 26 | set comment_prefix " *" |
| 27 | 27 | ||
| 28 | ;; OVERRIDE THIS in your user or project template file to whatever | ||
| 29 | ;; you use for your project. | ||
| 30 | set HEADEREXT ".h" | ||
| 31 | |||
| 32 | context file | ||
| 33 | |||
| 34 | template empty :time :user :file :cpp | ||
| 35 | ---- | ||
| 36 | {{>:filecomment}} | ||
| 37 | |||
| 38 | {{#NOTHEADER}} | ||
| 39 | |||
| 40 | {{^}} | ||
| 41 | {{/NOTHEADER}} | ||
| 42 | {{#HEADER}} | ||
| 43 | {{>:header_guard}} | ||
| 44 | {{/HEADER}} | ||
| 45 | ---- | ||
| 46 | |||
| 47 | template header_guard :file :blank | ||
| 48 | ---- | ||
| 49 | #ifndef {{FILENAME_SYMBOL}} | ||
| 50 | #define {{FILENAME_SYMBOL}} 1 | ||
| 51 | |||
| 52 | {{^}} | ||
| 53 | |||
| 54 | #endif // {{FILENAME_SYMBOL}} | ||
| 55 | ---- | ||
| 56 | |||
| 57 | context misc | ||
| 58 | |||
| 59 | template 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 | |||
| 66 | context declaration | 28 | context declaration |
| 67 | 29 | ||
| 68 | prompt TYPE "Return Type: " | ||
| 69 | |||
| 70 | template function :indent :blank | ||
| 71 | "Insert a function declaration." | ||
| 72 | ---- | ||
| 73 | {{?TYPE}} {{?NAME}}{{>:misc:arglist}} | ||
| 74 | {{#INITIALIZERS}}{{>B:initializers}}{{/INITIALIZERS}} | ||
| 75 | { | ||
| 76 | {{^}} | ||
| 77 | } | ||
| 78 | ---- | ||
| 79 | bind "f" | ||
| 80 | |||
| 81 | template function-prototype :indent :blank | ||
| 82 | "Insert a function declaration." | ||
| 83 | ---- | ||
| 84 | {{?TYPE}} {{?NAME}}{{>:misc:arglist}}; | ||
| 85 | ---- | ||
| 86 | |||
| 87 | |||
| 88 | prompt TYPE "Data Type: " | ||
| 89 | |||
| 90 | template variable :indent :blank | ||
| 91 | "Insert a variable declaration." | ||
| 92 | ---- | ||
| 93 | {{?TYPE}} {{?NAME}}{{#HAVEDEFAULT}} = {{DEFAULT}}{{/HAVEDEFAULT}}; | ||
| 94 | ---- | ||
| 95 | bind "v" | ||
| 96 | |||
| 97 | template variable-prototype :indent :blank | ||
| 98 | "Insert a variable declaration." | ||
| 99 | ---- | ||
| 100 | {{?TYPE}} {{?NAME}}; | ||
| 101 | ---- | ||
| 102 | bind "v" | ||
| 103 | |||
| 104 | template class :indent :blank | 30 | template class :indent :blank |
| 105 | "Insert a C++ class. For use by user insertion. | 31 | "Insert a C++ class. For use by user insertion. |
| 106 | Override this template to change contents of a class. | 32 | Override this template to change contents of a class. |
| @@ -146,18 +72,6 @@ template method :indent :blank | |||
| 146 | } | 72 | } |
| 147 | ---- | 73 | ---- |
| 148 | 74 | ||
| 149 | template include :blank | ||
| 150 | "An include statement." | ||
| 151 | ---- | ||
| 152 | #include "{{?NAME}}" | ||
| 153 | ---- | ||
| 154 | bind "i" | ||
| 155 | |||
| 156 | template label :blank :indent | ||
| 157 | ---- | ||
| 158 | {{?NAME}}: | ||
| 159 | ---- | ||
| 160 | |||
| 161 | context classdecl | 75 | context classdecl |
| 162 | 76 | ||
| 163 | template constructor-tag :indent :blank | 77 | template 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 | ||
| 199 | context declaration | ||
| 200 | |||
| 201 | template comment-function :indent :blank | ||
| 202 | "Used to put a nice comment in front of a function. | ||
| 203 | Override 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 | ||
| 232 | context declaration | ||
| 233 | |||
| 234 | template doxygen-function :indent :blank | ||
| 235 | ---- | ||
| 236 | /** | ||
| 237 | * @name {{NAME}} - {{DOC}}{{^}}{{#ARGS}} | ||
| 238 | * @param {{NAME}} - {{DOC}}{{/ARGS}} | ||
| 239 | * @return {{TYPE}} | ||
| 240 | */ | ||
| 241 | ---- | ||
| 242 | |||
| 243 | template doxygen-variable-same-line | ||
| 244 | ---- | ||
| 245 | /**< {{DOC}}{{^}} */ | ||
| 246 | ---- | ||
| 247 | |||
| 248 | template 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 | |||
| 22 | set mode "autoconf-mode" | ||
| 23 | set escape_start "{{" | ||
| 24 | set escape_end "}}" | ||
| 25 | set comment_start "#" | ||
| 26 | set comment_prefix "#" | ||
| 27 | set application "ede" | ||
| 28 | |||
| 29 | context file | ||
| 30 | |||
| 31 | template 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 | |||
| 45 | AC_INIT({{TEST_FILE}}) | ||
| 46 | AM_INIT_AUTOMAKE([{{PROGRAM}}], 0) | ||
| 47 | AM_CONFIG_HEADER(config.h) | ||
| 48 | |||
| 49 | {{comment_prefix}} End the configure script. | ||
| 50 | AC_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. | ||
| 51 | context arduino | ||
| 52 | |||
| 53 | template 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 | |||
| 62 | ARDUINO_DIR = {{ARDUINO_HOME}} | ||
| 63 | |||
| 64 | TARGET = {{TARGET}} | ||
| 65 | ARDUINO_LIBS = {{ARDUINO_LIBS}} | ||
| 66 | |||
| 67 | MCU = {{MCU}} | ||
| 68 | F_CPU = {{F_CPU}} | ||
| 69 | ARDUINO_PORT = {{PORT}} | ||
| 70 | BOARD_TAG = {{BOARD}} | ||
| 71 | |||
| 72 | AVRDUDE_ARD_BAUDRATE = {{AVRDUDE_ARD_BAUDRATE}} | ||
| 73 | AVRDUDE_ARD_PROGRAMMER = {{AVRDUDE_ARD_PROGRAMMER}} | ||
| 74 | |||
| 75 | include {{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 | ---- |
| 203 | bind "o" | 203 | bind "o" |