]> code.delx.au - gnu-emacs/blob - etc/srecode/texi.srt
aa6fa086a154b910bcbaf084e991a93cea2da053
[gnu-emacs] / etc / srecode / texi.srt
1 ;; texi.srt --- SRecode templates for Texinfo
2
3 ;; Copyright (C) 2008-2015 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 "texinfo-mode"
23
24 set escape_start "$"
25 set escape_end "$"
26 set DOLLAR "$"
27
28 context file
29
30 prompt NAME "Name of manual: "
31
32 template empty :file :user :time
33 "Fill a new texinfo file with some baseline stuff."
34 ----
35 \input texinfo @c -*-texinfo-*-
36 @c %**start of header
37 @setfilename $FILE$.info
38 @set TITLE $?NAME$
39 @set AUTHOR $?AUTHOR$
40 @settitle @value{TITLE}
41 @c %**end of header
42
43 @ifinfo
44 @format
45 START-INFO-DIR-ENTRY
46 * $FILE$: ($FILE$). $NAME$
47 END-INFO-DIR-ENTRY
48 @end format
49 @end ifinfo
50
51 @titlepage
52 @sp 10
53 @center @titlefont{$FILE$}
54 @vskip 0pt plus 1 fill
55 Copyright @copyright{} $YEAR$ $AUTHOR$
56 @end titlepage
57
58 @node Top
59 @top @value{TITLE}
60
61 $^$
62
63 @menu
64 * Index::
65 @end menu
66
67
68
69
70 @node Index
71 @chapter Index
72
73 @contents
74
75 @bye
76 ----
77
78 prompt NAME "Name of item: "
79
80 context declaration
81
82 ;; Note to self: It would be cool to replace the junk in
83 ;; semantic/document.el with macros from here.
84 template function :blank :texitag
85 "Import some function tag into texinfo."
86 ----
87
88 @defun $NAME$$#ARGS$ $NAME$$/ARGS$
89 @anchor{$NAME$}
90 $TAGDOC$
91 @end defun
92
93 ----
94 bind "f"
95
96 template function-command :blank :texitag
97 "Import some function tag into texinfo."
98 ----
99
100 @deffn Command $NAME$$#ARGS$ $NAME$$/ARGS$
101 @anchor{$NAME$}
102 $TAGDOC$
103 @end deffn
104
105 ----
106 bind "f"
107
108
109 template variable :blank :texitag
110 "Import some variable tag into texinfo"
111 ----
112
113 @defvar $NAME$$#ARGS$ $NAME$$/ARGS$
114 @anchor{$NAME$}
115 $TAGDOC$
116 @end defvar
117
118 ----
119 bind "v"
120
121 prompt NAME "Name of node: "
122
123 template node :texi
124 "Insert a node right about here."
125 ----
126
127 @node $?NAME$
128 @$?LEVEL$ $NAME$
129
130 $^$
131
132 ----
133 bind "n"
134
135 template subnode :texi
136 "Insert a node right about here."
137 ----
138
139 @node $?NAME$
140 @$?NEXTLEVEL$ $NAME$
141
142 $^$
143
144 ----
145 bind "n"
146
147
148 template menu :blank
149 "Menu items for texinfo."
150 ----
151
152 @menu
153 $^$
154 @end menu
155
156 ----
157 bind "m"
158
159 prompt NAME "Menu item: "
160
161 template menuitem :blank
162 "Insert a menu item."
163 ----
164 * $?NAME$:: $^$
165 ----
166
167
168 ;; end