116
|
1 \input texinfo @c -*-texinfo-*-
|
|
2 @comment %**start of header (This is for running Texinfo on a region.)
|
|
3 @setfilename hm--html-mode.info
|
|
4 @settitle HM HTML Mode
|
|
5 @setchapternewpage odd
|
|
6 @comment %**end of header (This is for running Texinfo on a region.)
|
153
|
7 @comment $Id: hm--html-mode.texi,v 1.3 1997/05/29 23:50:32 steve Exp $
|
116
|
8 @ifinfo
|
|
9 This file documents the Elisp package @code{hm--html-menus}.
|
|
10
|
|
11 Copyright @copyright{} 1997 Heiko Münkel
|
|
12
|
|
13 Permission is granted to make and distribute verbatim copies of
|
|
14 this manual provided the copyright notice and this permission notice
|
|
15 are preserved on all copies.
|
|
16
|
|
17 @ignore
|
|
18 Permission is granted to process this file through TeX and print the
|
|
19 results, provided the printed document carries a copying permission
|
|
20 notice identical to this one except for the removal of this paragraph
|
|
21 (this paragraph not being relevant to the printed manual).
|
|
22
|
|
23 @end ignore
|
|
24 Permission is granted to copy and distribute modified versions of this
|
|
25 manual under the conditions for verbatim copying, provided also that the
|
|
26 sections entitled ``Distribution'' and ``General Public License'' are
|
|
27 included exactly as in the original, and provided that the entire
|
|
28 resulting derived work is distributed under the terms of a permission
|
|
29 notice identical to this one.
|
|
30
|
|
31 Permission is granted to copy and distribute translations of this manual
|
|
32 into another language, under the above conditions for modified versions,
|
|
33 except that the sections entitled ``Distribution'' and ``General Public
|
|
34 License'' may be included in a translation approved by the author instead
|
|
35 of in the original English.
|
|
36
|
|
37 @end ifinfo
|
|
38 @iftex
|
|
39 @input umlaute.texinfo
|
|
40 @end iftex
|
|
41 @titlepage
|
|
42 @sp 10
|
|
43 @center @titlefont{The Elisp Package hm---html-menus}
|
|
44
|
|
45 @sp 4
|
|
46 @center by Heiko Münkel
|
|
47 @sp 4
|
153
|
48 @center Version 5.7, May 1997
|
116
|
49 @page
|
|
50 @vskip 0pt plus 1filll
|
|
51 Copyright @copyright{} 1997 Heiko Münkel
|
|
52 @sp 4
|
|
53 Permission is granted to make and distribute verbatim copies of
|
|
54 this manual provided the copyright notice and this permission notice
|
|
55 are preserved on all copies.
|
|
56
|
|
57 @ignore
|
|
58 Permission is granted to process this file through TeX and print the
|
|
59 results, provided the printed document carries a copying permission
|
|
60 notice identical to this one except for the removal of this paragraph
|
|
61 (this paragraph not being relevant to the printed manual).
|
|
62
|
|
63 @end ignore
|
|
64 Permission is granted to copy and distribute modified versions of this
|
|
65 manual under the conditions for verbatim copying, provided also that the
|
|
66 sections entitled ``Distribution'' and ``General Public License'' are
|
|
67 included exactly as in the original, and provided that the entire
|
|
68 resulting derived work is distributed under the terms of a permission
|
|
69 notice identical to this one.
|
|
70
|
|
71 Permission is granted to copy and distribute translations of this manual
|
|
72 into another language, under the above conditions for modified versions,
|
|
73 except that the sections entitled ``Distribution'' and ``General Public
|
|
74 License'' may be included in a translation approved by the author instead
|
|
75 of in the original English.
|
|
76
|
|
77 @end titlepage
|
|
78
|
|
79 @comment The Top node contains the master menu for the Info file.
|
|
80 @comment This appears only in the Info file, not in the printed manual.
|
|
81
|
|
82 @node Top, License, (dir), (dir)
|
|
83 @comment node-name, next, previous, up
|
|
84
|
|
85
|
|
86
|
|
87 @menu
|
|
88 * License:: Your rights
|
|
89 * Overview:: Overview
|
|
90 * Distribution:: How to get the latest version
|
|
91 * Installation:: How to install the package
|
|
92 * Customization:: How to customize the package
|
|
93 * Add New Elements:: How to add new HTML elements
|
|
94 * Use With psgml-html:: Use this package as an add-on minor mode
|
|
95 * Internal Drag And Drop:: The HTML independent drag and drop package
|
|
96 * Template Minor Mode:: The HTML independent template package
|
153
|
97 * Hints For Emacs 19 Users:: Missing features in the Emacs 19
|
116
|
98 * Bug Reports:: How and to whom you should send bug reports
|
|
99 * Concept Index:: Concept Index
|
|
100 * Function Index:: Function Index
|
|
101 * Variable Index:: Variable Index
|
|
102 @end menu
|
|
103
|
|
104
|
|
105 @node License, Overview, Top, Top
|
|
106 @comment node-name, next, previous, up
|
|
107 @chapter License
|
|
108 @cindex license to copy hm---html-menus
|
|
109 @cindex General Public License
|
|
110 Copyright (C) 1993 - 1997 Heiko Münkel, muenkel@@tnt.uni-hannover.de
|
|
111 @sp 2
|
|
112 This program is free software; you can redistribute it and/or modify
|
|
113 it under the terms of the GNU General Public License as published by
|
|
114 the Free Software Foundation; either version 2, or (at your option)
|
|
115 any later version.
|
|
116
|
|
117 This program is distributed in the hope that it will be useful,
|
|
118 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
119 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
120 GNU General Public License for more details.
|
|
121
|
|
122 You should have received a copy of the GNU General Public License
|
|
123 along with this program; if not, write to the Free Software
|
|
124 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
125
|
|
126
|
|
127 @node Overview, Distribution, License, Top
|
|
128 @comment node-name, next, previous, up
|
|
129 @chapter Overview
|
|
130 @cindex overview
|
|
131 @cindex version
|
|
132 @findex hm--html-mode
|
|
133 @findex hm--html-minor-mode
|
|
134
|
153
|
135 This document describes the Elisp package @emph{hm---html-menus 5.7}.
|
116
|
136
|
|
137 The version of the document is:@*
|
153
|
138 $Id: hm--html-mode.texi,v 1.3 1997/05/29 23:50:32 steve Exp $
|
116
|
139
|
|
140 The package provides commands and various popup and pulldown menus for
|
|
141 an HTML mode called @dfn{hm---html-mode}, a mode for writing HTML pages
|
|
142 for the World Wide Web (WWW). It also provides a minor mode
|
|
143 (@dfn{hm---html-minor-mode}), which can be used together with another
|
|
144 HTML major mode, like the psgml-html modes in XEmacs 19.14.
|
|
145
|
|
146 You can easily view the HTML documents by calling the browsers w3 (a
|
|
147 nice elisp package from William M. Perry), Netscape, or Mosaic directly
|
|
148 from the pulldown menu of the mode.
|
|
149
|
|
150 An integrated (emacs internal) drag and drop interface makes it
|
|
151 very easy to insert links or images, by just clicking on them.
|
|
152
|
|
153 When appropriate, identical commands work on selected
|
|
154 regions. You'll see the same menu items and can use the same
|
|
155 keystrokes, whether a region is active or not, but if it's
|
|
156 active, then the commands are operating on the region. Therefore, you
|
|
157 don't need to learn different menus or keys for similar functions!
|
|
158
|
|
159 One major design goal of the package was to make it easier to write a
|
|
160 HTML page, even if you don't know much about HTML. For that I've tried
|
|
161 to put more knowledge about HTML, URL's and so on in it than an SGML based
|
|
162 mode could find out from a DTD file. In most cases the user gets help to
|
|
163 construct a specific link by examples, or by a completion list with
|
|
164 possible input strings. And you can choose between an expert popup menu
|
|
165 and an novice popup menu interactively. The novice menu contains only
|
|
166 the basic HTML elements, so that you're not bothered by the quantity of
|
|
167 different HTML elements. And if you want to use more HTML elements, then
|
|
168 you can easily switch to the expert menus.
|
|
169
|
|
170 You can configure the html mode with a special configuration file for
|
|
171 your site and with another file specific to a user. Look at the
|
|
172 customization chapter for this, @xref{Customization, Customization}.
|
|
173
|
|
174
|
|
175 @node Distribution, Installation, Overview, Top
|
|
176 @comment node-name, next, previous, up
|
|
177 @chapter Distribution
|
|
178 The name of the distribution file is
|
|
179 @file{hm--html-menus-<version>.tar.gz}, where @var{<version>} is the
|
|
180 version number. The package is part of the XEmacs. You should always
|
|
181 find the latest version of the package on the following ftp server:
|
|
182 @display
|
|
183 @emph{ftp.tnt.uni-hannover.de} in @file{/pub/editors/xemacs/contrib}
|
|
184 @end display
|
|
185 You should also find the package in the USA on the ftp server
|
|
186 (which is mirrored on many other servers in the world):
|
|
187 @display
|
|
188 @emph{sunsite.unc.edu} in @file{/pub/Linux/apps/editors/emacs}
|
|
189 @end display
|
|
190 @menu
|
|
191 * Contents:: Contents of the distribution
|
|
192 @end menu
|
|
193
|
|
194 @node Contents, , Distribution, Distribution
|
|
195 @comment node-name, next, previous, up
|
|
196 @section Contents
|
|
197 @cindex contents
|
|
198 The package consists of the following files:
|
|
199
|
|
200 @table @file
|
|
201 @item README
|
|
202 Please, read this first.
|
|
203 @itemx README-EMACS-19
|
|
204 Some special hints only for GNU Emacs 19 users.
|
|
205 @itemx ANNOUNCEMENT
|
|
206 Text of the announcement of this package.
|
|
207 @itemx LSM
|
|
208 Entry for the Linux Software Map.
|
|
209 @itemx NEWS
|
|
210 The NEWS and Change log file.
|
|
211 @itemx adapt.el
|
|
212 Provides (emulates XEmacs) functions for the use of this package with
|
|
213 GNU Emacs 19.
|
|
214 @itemx hm--html.el
|
|
215 Provides functions to write html pages. It defines all commands which
|
|
216 insert html elements and entities.
|
|
217 @itemx hm--html-indentation.el
|
|
218 Provides the lisp code for the indentation.
|
|
219 @itemx hm--html-keys.el
|
|
220 Defines the key bindings.
|
|
221 @itemx hm--html-menu.el
|
|
222 Provides the menus.
|
|
223 @itemx hm--html-mode.el
|
|
224 Provides the functions for the definition of the hm--html-mode and the
|
|
225 hm--html-minor-mode. This is the main file of the package.
|
|
226 @itemx hm--html-not-standard.el
|
|
227 Provides functions to insert some non standard html elements. This file
|
|
228 is not evaluated by default and it may be a bad idea to use it.
|
|
229 @itemx hm--html-configuration.el
|
|
230 Configuration file for the html mode. All the user variables are defined
|
|
231 in this file.
|
|
232 @itemx hm--html-drag-and-drop.el
|
|
233 Defines the HTML-specific functions for the drag and drop interface.
|
|
234 @itemx hm--date.el
|
|
235 Defines the function hm--date, which returns the date in the format
|
|
236 "day-month-year" like "30-Jun-1993".
|
|
237 @itemx html-view.el
|
|
238 Ron Tapia's html-view.el to view html pages in Mosaic. It is
|
|
239 patched for use with XEmacs.
|
|
240 @itemx internal-drag-and-drop.el
|
|
241 Provides the general (html-mode independent) functions of the drag and
|
|
242 drop interface.
|
|
243 @itemx templates.doc
|
|
244 Describes the syntax of the templates provided in the file
|
|
245 @file{tmpl-minor-mode.el}
|
|
246 @itemx tmpl-minor-mode.el
|
|
247 Provides functions for the tmpl-minor-mode. With this mode you can
|
|
248 expand templates, which are described in the file
|
|
249 @file{templates-syntax.doc} (look at the files
|
|
250 @file{command-description.html.tmpl} and @file{frame.html.tmpl} for
|
|
251 examples). Templates can be expanded automatically, if you include a
|
|
252 file with templates via the html pulldown menu item "Templates ..." or
|
|
253 with the item "Templates (fixed dirs)...".
|
|
254 @itemx command-description.html.tmpl
|
|
255 Template file for the use with the tmpl-minor-mode.
|
|
256 @itemx frame.html.tmpl
|
|
257 Template file, provides a simple frame.
|
|
258 @itemx doc/hm--html-mode.texinfo
|
|
259 Package documentation in the Texinfo format.
|
|
260 @itemx doc/umlaute.texinfo
|
|
261 Texinfo include file for German vowel mutation (deutsche Umlaute).
|
|
262 @end table
|
|
263
|
|
264 @node Installation, Customization, Distribution, Top
|
|
265 @comment node-name, next, previous, up
|
|
266 @chapter Installation
|
|
267 @cindex installation
|
|
268
|
|
269
|
|
270 @enumerate
|
|
271 @item Put all the *.el files in one of your XEmacs (or emacs) lisp load
|
|
272 directories (e.g. site-lisp/hm--html-menus).
|
|
273
|
|
274 @item Put the following in your .emacs (or default.el or site-init.el):
|
|
275 @lisp
|
|
276 (autoload 'hm--html-mode "hm--html-mode" "HTML major mode." t)
|
|
277 (autoload 'hm--html-minor-mode "hm--html-mode" "HTML minor mode." t)
|
|
278 (or (assoc "\\.html$" auto-mode-alist)
|
|
279 (setq auto-mode-alist (cons '("\\.html$" . hm--html-mode)
|
|
280 auto-mode-alist)))
|
|
281
|
|
282 (autoload 'tmpl-expand-templates-in-buffer "tmpl-minor-mode"
|
|
283 "Expand all templates in the current buffer." t)
|
153
|
284 (autoload 'tmpl-expand-templates-in-region "tmpl-minor-mode"
|
|
285 "Expands the templates in the region from BEGIN to END.
|
|
286 If BEGIN and END are nil, then the current region is used."
|
|
287 t)
|
|
288 (autoload 'tmpl-insert-template-file-from-fixed-dirs "tmpl-minor-mode"
|
|
289 "Inserts a template FILE and expands it, if `tmpl-automatic-expand' is t.
|
|
290 This command tries to read the template file from a list of
|
|
291 predefined directories (look at `tmpl-template-dir-list') and it filters
|
|
292 the contents of these directories with the regular expression
|
|
293 `tmpl-filter-regexp' (look also at this variable).
|
|
294 The command uses a history variable, which could be changed with the
|
|
295 variable `tmpl-history-variable-name'.
|
|
296
|
|
297 The user of the command is able to change interactively to another
|
|
298 directory by entering at first the string \"Change the directory\".
|
|
299 This may be too difficult for the user. Therefore another command
|
|
300 called `tmpl-insert-template-file' exist, which doesn't use fixed
|
|
301 directories and filters."
|
|
302 t)
|
|
303
|
|
304 (autoload 'tmpl-insert-template-file "tmpl-minor-mode"
|
|
305 "Inserts a template FILE and expand it, if `tmpl-automatic-expand' is t.
|
|
306 Look also at `tmpl-template-dir-list', to specify a default template
|
|
307 directory.
|
|
308 You should also take a look at `tmpl-insert-template-file-from-fixed-dirs'
|
|
309 which has additional advantages (and disadvantages :-).
|
|
310
|
|
311 ATTENTION: The interface of this function has changed. The old
|
|
312 function had the argument list (&optional TEMPLATE-DIR AUTOMATIC-EXPAND).
|
|
313 The variables `tmpl-template-dir-list' and `tmpl-automatic-expand' must
|
|
314 now be used instead of the args TEMPLATE-DIR and AUTOMATIC-EXPAND."
|
|
315 t)
|
116
|
316
|
|
317 (autoload 'html-view-start-mosaic "html-view" "Start Xmosaic." t)
|
|
318 (autoload 'html-view-view-buffer
|
|
319 "html-view"
|
|
320 "View the current buffer in Xmosaic."
|
|
321 t)
|
|
322 (autoload 'html-view-view-file
|
|
323 "html-view"
|
|
324 "View a file in Xmosaic."
|
|
325 t)
|
|
326 (autoload 'html-view-goto-url
|
|
327 "html-view"
|
|
328 "Goto url in Xmosaic."
|
|
329 t)
|
|
330 (autoload 'html-view-get-display
|
|
331 "html-view"
|
|
332 "Get the display for Xmosaic (i.e. hostxy:0.0)."
|
|
333 t)
|
|
334 @end lisp
|
|
335
|
|
336 The above lines assume that you have not already installed another
|
|
337 html mode. If this isn't true, then you should use the following:
|
|
338 @lisp
|
|
339 (setq auto-mode-alist (cons '("\\.html$" . hm--html-mode)
|
|
340 auto-mode-alist))
|
|
341 @end lisp
|
|
342
|
|
343 instead of:
|
|
344 @lisp
|
|
345 (or (assoc "\\.html$" auto-mode-alist)
|
|
346 (setq auto-mode-alist (cons '("\\.html$" . hm--html-mode)
|
|
347 auto-mode-alist)))
|
|
348 @end lisp
|
|
349 If you want to use the hm--html-minor-mode together
|
|
350 with the psgml-html modes, then you should add the following
|
|
351 line (works only in XEmacs version >= 19.15 and != 20.0):
|
|
352 @lisp
|
|
353 (add-hook 'html-mode-hook 'hm--html-minor-mode)
|
|
354 @end lisp
|
|
355 @end enumerate
|
|
356
|
|
357 @node Customization, Add New Elements, Installation, Top
|
|
358 @comment node-name, next, previous, up
|
|
359 @chapter Customization
|
|
360 @cindex customization
|
|
361 @cindex configuration
|
|
362
|
|
363 You should be able to use the package after its installation without
|
|
364 any further customization. But it contains a lot of user variables to
|
|
365 adapt the package better to your special needs. How to do this is
|
|
366 described in this chapter.
|
|
367
|
|
368 @menu
|
|
369 * Customization (Configuration) Files::
|
|
370 * Customization Variables::
|
|
371 @end menu
|
|
372
|
|
373 @node Customization (Configuration) Files, Customization Variables, Customization, Customization
|
|
374 @comment node-name, next, previous, up
|
|
375 @section Customization (Configuration) Files
|
|
376 @cindex customization files
|
|
377 @cindex configuration files
|
|
378
|
|
379 This package uses 3 different files to customize the mode, but you need
|
|
380 not use all of them. Only one of them, the file
|
|
381 @file{hm--html-configuration.el} is delivered together with the package.
|
|
382 The reason for three different files is to provide the opportunity to
|
|
383 have different customization for the package, the site and the
|
|
384 user. There's also a pulldown menu item to reload all customization
|
|
385 files. The files are described in the following sections.
|
|
386
|
|
387 @menu
|
|
388 * Where Are All The Customization Variables Defined::
|
|
389 * Where To Put Site Specific Customization::
|
|
390 * Where To Put User Specific Customization::
|
|
391 @end menu
|
|
392
|
|
393 @node Where Are All The Customization Variables Defined, Where To Put Site Specific Customization, Customization (Configuration) Files, Customization (Configuration) Files
|
|
394 @comment node-name, next, previous, up
|
|
395 @subsection Where Are All The Customization Variables Defined
|
|
396 @cindex package specific customization
|
|
397 @cindex hm--configuration.el
|
|
398 @vindex HTML_CONFIG_FILE
|
|
399
|
|
400 All variables which can be used to customize the mode are defined in
|
|
401 the package configuration file @file{hm--configuration.el}. You should
|
|
402 take a look at this file if you don't find how to customize a feature
|
|
403 in this documentation (the documentation of a program is never as
|
|
404 complete as its program code :-).
|
|
405
|
|
406 This file is searched in one of your lisp load directories. You can
|
|
407 change this by setting the environment variable @code{HTML_CONFIG_FILE}
|
|
408 to another file. But I don't recommend this.
|
|
409
|
|
410 @emph{Note}: This file is loaded before the other customization files,
|
|
411 so that its definitions could be overwritten. All variables are set by
|
|
412 @code{defvar}, so that its values could also be overwritten with
|
|
413 @code{setq} in any standard emacs customization files (e.g. in
|
|
414 @file{.emacs}).
|
|
415
|
|
416
|
|
417 @node Where To Put Site Specific Customization, Where To Put User Specific Customization, Where Are All The Customization Variables Defined, Customization (Configuration) Files
|
|
418 @comment node-name, next, previous, up
|
|
419 @subsection Where To Put Site Specific Customization
|
|
420 @cindex site specific customization
|
|
421 @cindex hm--site-configuration-file.el
|
|
422 @vindex HTML_SITE_CONFIG_FILE
|
|
423 @vindex hm--html-site-config-file
|
|
424
|
|
425 In general all users at a site are writing their html pages for the same
|
|
426 WWW server. Therefore it is very likely that most of the customizations
|
|
427 are site specific, and only a few are user specific. However, you
|
|
428 don't have to use a site specific customization if you don't want one.
|
|
429
|
|
430 If you'd like to make a site specific customization of
|
|
431 @code{hm--html-mode}, it's possible to put it in a special file called
|
|
432 @file{hm--site-configuration-file.el}. If you do this, you have to set
|
|
433 either the lisp variable @code{hm--html-site-config-file} or the
|
|
434 environment variable @code{HTML_SITE_CONFIG_FILE} to the file and its
|
|
435 path. If you write the filename without its extension (.el), emacs
|
|
436 tries first to load a compiled version of the file.
|
|
437
|
|
438 The environment variables overwrite the lisp variables.
|
|
439
|
|
440 You can also put the site specific customization in any standard emacs
|
|
441 customization file like, @file{default.el}. But an advantage to
|
|
442 using @file{hm--site-configuration-file.el} is that it is very likely
|
|
443 you will be able to use this file with future versions of the
|
|
444 package. I'll try to make it as backward compatible as possible.
|
|
445
|
|
446 @emph{Note}: This file is loaded after the package customization file
|
|
447 and before the user customization file.
|
|
448
|
|
449 @node Where To Put User Specific Customization, , Where To Put Site Specific Customization, Customization (Configuration) Files
|
|
450 @comment node-name, next, previous, up
|
|
451 @subsection Where To Put User Specific Customization
|
|
452 @cindex user specific customization
|
153
|
453 @cindex ~/.hm--html-configuration.el
|
116
|
454 @vindex HTML_USER_CONFIG_FILE
|
|
455 @vindex hm--html-user-config-file
|
|
456
|
|
457 User specific customization can be put in the file
|
153
|
458 @file{.hm--html-configuration.el}, which is searched by default in the
|
116
|
459 home directory of the user. This can be overwritten by setting either
|
|
460 the environment variable @code{HTML_USER_CONFIG_FILE} or the lisp
|
|
461 variable @code{hm--html-user-config-file} to the name of the file and
|
|
462 its path. If you write the filename without its extension (.el), emacs
|
|
463 tries first to load a compiled version of the file.
|
|
464
|
|
465 You can also put the user specific customization in your
|
|
466 @file{.emacs}. It's up to you to decide which way is better.
|
|
467
|
|
468 @emph{Note}: This file is loaded after the package and the site specific
|
|
469 one. Therefore it overwrites all other customization files.
|
|
470
|
|
471
|
|
472 @node Customization Variables, , Customization (Configuration) Files, Customization
|
|
473 @comment node-name, next, previous, up
|
|
474 @section Customization Variables
|
|
475
|
|
476 In the following subsections the main customization variables are
|
|
477 described.
|
|
478
|
|
479 @menu
|
|
480 * User Name/Signature::
|
|
481 * Switching Between Expert And Novice Menus ::
|
|
482 * HTML Doctype::
|
|
483 * Defaults Used For Generating Links::
|
|
484 * Templates::
|
|
485 * Deleting Automounter Path Prefix::
|
|
486 * Automatic Insert Of Information::
|
|
487 * Latin 1 Characters::
|
|
488 * Drag And Drop::
|
|
489 * Font Lock Keywords::
|
|
490 * Prefix Keys::
|
|
491 * Pulldown Menu Names::
|
|
492 * Hook Variables::
|
|
493 * Previewing HTML Files::
|
|
494 * Meta Element::
|
|
495 * Indentation::
|
|
496 @end menu
|
|
497
|
|
498
|
|
499 @node User Name/Signature, Switching Between Expert And Novice Menus , Customization Variables, Customization Variables
|
|
500 @comment node-name, next, previous, up
|
|
501 @subsection User Name/Signature
|
|
502 @cindex user name
|
|
503 @cindex signature
|
|
504 @vindex hm--html-username
|
|
505 @vindex hm--html-signature-file
|
|
506
|
|
507 @itemize @bullet
|
|
508 @item
|
|
509 @code{hm--html-username}: Your real name. This is used as the name of
|
|
510 the signature links. You need only specify it if your name in the
|
|
511 file @file{/etc/passwd} isn't the one you'd like to see in the html
|
|
512 files. Otherwise this may be set to @code{nil}.
|
|
513 @item
|
|
514 @code{hm--html-signature-file}: The link used in your signature. In
|
|
515 general this should be a link to your home page.
|
|
516 @end itemize
|
|
517
|
|
518
|
|
519 @node Switching Between Expert And Novice Menus , HTML Doctype, User Name/Signature, Customization Variables
|
|
520 @comment node-name, next, previous, up
|
|
521 @subsection Switching Between Expert And Novice Menus
|
|
522 @cindex expert menus
|
|
523 @cindex novice menus
|
|
524 @vindex hm--html-expert
|
|
525
|
|
526 @itemize @bullet
|
|
527 @item
|
|
528 @code{hm--html-expert}: If you're a html novice and don't want to be
|
|
529 bothered with lots of possible html elements, then you should use the
|
|
530 novice popup menus. For that, set this variable to @code{nil},
|
|
531 which is the default. But if you are more familiar with html and would
|
|
532 like to use more html elements, then you should use the expert menus and
|
|
533 set this variable to @code{t}.
|
|
534 @end itemize
|
|
535
|
|
536
|
|
537 @node HTML Doctype, Defaults Used For Generating Links, Switching Between Expert And Novice Menus , Customization Variables
|
|
538 @comment node-name, next, previous, up
|
|
539 @subsection HTML Doctype
|
|
540 @vindex hm--html-html-doctype-version
|
|
541 @cindex HTML doctype
|
|
542
|
|
543 @itemize @bullet
|
|
544 @item
|
|
545 @code{hm--html-html-doctype-version}: The HTML version. This is used in
|
|
546 the doctype element. Change this if you use non HTML 3.2 elements. This
|
|
547 package (@xref{Overview, version}.) defines by default only HTML 3.2 elements.
|
|
548 @end itemize
|
|
549
|
|
550
|
|
551 @node Defaults Used For Generating Links, Templates, HTML Doctype, Customization Variables
|
|
552 @comment node-name, next, previous, up
|
|
553 @subsection Defaults Used For Generating Links
|
|
554 @cindex links
|
|
555
|
|
556 One of the main features of @code{hm--html-mode} is its easy ways to
|
|
557 insert special links to html pages, ftp servers, news servers and so
|
|
558 on. I think that most people will have their own (this may be site
|
|
559 specific. @xref{Where To Put Site Specific Customization, Where To Put
|
|
560 Site Specific Customization}.) favourite servers, directories and so
|
|
561 on. You may customize the default values and the alists with useful
|
|
562 alternatives, which are used from the mode in the inserting functions
|
|
563 for the links.
|
|
564
|
|
565 @menu
|
|
566 * Your Favourite HTTP Server::
|
|
567 * Links to WWW Servers::
|
|
568 * Links To Files::
|
|
569 * Links To FTP Servers::
|
|
570 * Links To Emacs Info Files::
|
|
571 * Links To Gopher Servers::
|
|
572 * Links To WAIS Gateways::
|
|
573 * Links To The Mail Gateway::
|
|
574 * Links For Sending Mail::
|
|
575 * Links To The Program Gateway::
|
|
576 * Links To The Local Program Gateway::
|
|
577 * URL For Forms And Image Tags::
|
|
578 * Marking Of Examples::
|
|
579 @end menu
|
|
580
|
|
581
|
|
582 @node Your Favourite HTTP Server, Links to WWW Servers, Defaults Used For Generating Links, Defaults Used For Generating Links
|
|
583 @comment node-name, next, previous, up
|
|
584 @subsubsection Your Favourite HTTP Server
|
|
585 @cindex favourite HTTP server
|
|
586 @vindex hm--html-favorite-http-server-host-name
|
|
587
|
|
588 @itemize @bullet
|
|
589 @item
|
|
590 @code{hm--html-favorite-http-server-host-name}: The name of your
|
|
591 favorite http server host. It must be specified! This variable is used
|
|
592 in many other variables.
|
|
593 @end itemize
|
|
594
|
|
595
|
|
596 @node Links to WWW Servers, Links To Files, Your Favourite HTTP Server, Defaults Used For Generating Links
|
|
597 @comment node-name, next, previous, up
|
|
598 @subsubsection Links to WWW Server
|
|
599 @cindex WWW server links
|
|
600 @cindex HTTP links
|
|
601 @vindex hm--html-html-hostname:port-default
|
|
602 @vindex hm--html-html-hostname:port-alist
|
|
603 @vindex hm--html-html-path-alist
|
|
604
|
|
605 @itemize @bullet
|
|
606 @item
|
|
607 @code{hm--html-html-hostname:port-default}: Default hostname with port
|
|
608 for http links to a HTML server.
|
|
609 @item
|
|
610 @code{hm--html-html-hostname:port-alist}: Alist with hostnames and ports
|
|
611 for http links to HTML servers. It contains useful alternatives.
|
|
612 @item
|
|
613 @code{hm--html-html-path-alist}: Alist with directories for the HTML
|
|
614 server. Each alist element must consist of a number and a directory
|
|
615 string. The number is used to select the directory during the query
|
|
616 about the directory for an http link.
|
|
617 @end itemize
|
|
618
|
|
619
|
|
620 @node Links To Files, Links To FTP Servers, Links to WWW Servers, Defaults Used For Generating Links
|
|
621 @comment node-name, next, previous, up
|
|
622 @subsubsection Links To Files
|
|
623 @cindex file gateway links
|
|
624 @vindex hm--html-file-path-alist
|
|
625
|
|
626 @itemize @bullet
|
|
627 @item
|
|
628 @code{hm--html-file-path-alist}: Alist with directories for the file
|
|
629 gateway. Each alist element must consist of a number and a directory
|
|
630 string. The number is used to select the directory during the query
|
|
631 about the directory for a file link.
|
|
632 @end itemize
|
|
633
|
|
634
|
|
635 @node Links To FTP Servers, Links To Emacs Info Files, Links To Files, Defaults Used For Generating Links
|
|
636 @comment node-name, next, previous, up
|
|
637 @subsubsection Links To FTP Servers
|
|
638 @cindex FTP links
|
|
639 @vindex hm--html-ftp-hostname:port-default
|
|
640 @vindex hm--html-ftp-hostname:port-alist
|
|
641 @vindex hm--html-ftp-path-alist
|
|
642
|
|
643 @itemize @bullet
|
|
644 @item
|
|
645 @code{hm--html-ftp-hostname:port-default}: Default hostname with port
|
|
646 for links to an ftp server. This is for the default FTP server. In general
|
|
647 you don't need to specify a port for this.
|
|
648 @item
|
|
649 @code{hm--html-ftp-hostname:port-alist}: Alist with hostnames and ports
|
|
650 for links to ftp servers. It contains useful alternatives. In general
|
|
651 you don't need to specify ports for the ftp servers.
|
|
652 @item
|
|
653 @code{hm--html-ftp-path-alist}: Alist with directories for the ftp
|
|
654 server links. It contains useful alternatives with /pub, /pub/gnu and
|
|
655 so on. Each alist element must consist of a number and a directory
|
|
656 string. The number is used to select the directory during the query
|
|
657 about the directory for an ftp link.
|
|
658 @end itemize
|
|
659
|
|
660
|
|
661 @node Links To Emacs Info Files, Links To Gopher Servers, Links To FTP Servers, Defaults Used For Generating Links
|
|
662 @comment node-name, next, previous, up
|
|
663 @subsubsection Links To Emacs Info Files
|
|
664 @cindex emacs info links
|
|
665 @vindex hm--html-info-hostname:port-alist
|
|
666 @vindex hm--html-info-hostname:port-default
|
|
667 @vindex hm--html-info-path-alist
|
|
668
|
|
669 @itemize @bullet
|
|
670 @item
|
|
671 @code{hm--html-info-hostname:port-default}: Default hostname with port
|
|
672 for the Info gateway.
|
|
673 @item
|
|
674 @code{hm--html-info-hostname:port-alist}: Alist with hostnames and ports
|
|
675 for Info gateways. It contains useful alternatives.
|
|
676 @item
|
|
677 @code{hm--html-info-path-alist}: Alist with directories for the Info
|
|
678 gateway. This may be a list with all of your emacs info directories.
|
|
679 @end itemize
|
|
680
|
|
681
|
|
682 @node Links To Gopher Servers, Links To WAIS Gateways, Links To Emacs Info Files, Defaults Used For Generating Links
|
|
683 @comment node-name, next, previous, up
|
|
684 @subsubsection Links To Gopher Servers
|
|
685 @cindex Gopher gateway links
|
|
686 @vindex hm--html-gopher-hostname:port-default
|
|
687 @vindex hm--html-gopher-hostname:port-alist
|
|
688 @vindex hm--html-gopher-doctype-default
|
|
689 @vindex hm--html-gopher-doctype-alist
|
|
690 @vindex hm--html-gopher-anchor-alist
|
|
691
|
|
692 There are a lot of useful gopher information servers on the Internet.
|
|
693 You can access them with a gopher browser or with a WWW browser. In the
|
|
694 latter case you have to use the gopher gateway.
|
|
695
|
|
696 @itemize @bullet
|
|
697 @item
|
|
698 @code{hm--html-gopher-hostname:port-default}: Default hostname with port
|
|
699 for links to the default gopher server.
|
|
700 @item
|
|
701 @code{hm--html-gopher-hostname:port-alist}: Alist with hostnames and
|
|
702 ports for links to gopher servers. It contains useful alternatives.
|
|
703 @item
|
|
704 @code{hm--html-gopher-doctype-default}: For gopher links you have to
|
|
705 specify the doctype. In most cases this should be the string \"/1\".
|
|
706 Therefore this is the default doctype, but you can change it to
|
|
707 another.
|
|
708 @item
|
|
709 @code{hm--html-gopher-doctype-alist}: Alist with doctype strings for links
|
|
710 to a gopher server. The strings \"/1\", \"/11\" and \"/00\" are the only
|
|
711 doctype strings that I know. Please let me know if there are other
|
|
712 strings.
|
|
713 @item
|
|
714 @code{hm--html-gopher-anchor-alist}: Alist with directories for links to
|
|
715 a gopher server. It contains useful alternatives for the main gopher
|
|
716 servers. Each alist element must consist of a number and a directory
|
|
717 string. The number is used to select the directory during the query
|
|
718 about the directory for a local program gateway link.
|
|
719 @end itemize
|
|
720
|
|
721
|
|
722 @node Links To WAIS Gateways, Links To The Mail Gateway, Links To Gopher Servers, Defaults Used For Generating Links
|
|
723 @comment node-name, next, previous, up
|
|
724 @subsubsection Links To WAIS Gateways
|
|
725 @cindex WAIS gateway links
|
|
726 @vindex hm--html-wais-hostname:port-alist
|
|
727 @vindex hm--html-wais-hostname:port-default
|
|
728 @vindex hm--html-wais-servername:port-alist
|
|
729 @vindex hm--html-wais-servername:port-default
|
|
730 @vindex hm--html-wais-path-alist
|
|
731
|
|
732 You can either make a link direct to a WAIS server (it may be that not
|
|
733 all WWW browsers support this) or an http link to a server (relay host)
|
|
734 which queries the WAIS server. The variables
|
|
735 @code{hm--html-wais-hostname:port-default} and
|
|
736 @code{hm--html-wais-hostname} refer to these relay hosts and the
|
|
737 variables @code{hm--html-wais-servername:port-default} and
|
|
738 @code{hm--html-wais-servername:port-alist} refer to the WAIS servers.
|
|
739
|
|
740 @itemize @bullet
|
|
741 @item
|
|
742 @code{hm--html-wais-hostname:port-default}: Default hostname of the
|
|
743 relay host with port for the WAIS gateway.
|
|
744 @item
|
|
745 @code{hm--html-wais-hostname:port-alist}: Alist with hostnames of
|
|
746 possible relay hosts and ports for the WAIS gateway. It contains
|
|
747 useful alternatives.
|
|
748 @item
|
|
749 @code{hm--html-wais-servername:port-default}: Default WAIS servername
|
|
750 with port for the WAIS gateway.
|
|
751 @item
|
|
752 @code{hm--html-wais-servername:port-alist}: Alist with WAIS servernames
|
|
753 and ports for the WAIS gateway. It contains useful alternatives.
|
|
754 @item
|
|
755 @code{hm--html-wais-path-alist}: Alist with directories for the wais gateway.
|
|
756 @end itemize
|
|
757
|
|
758
|
|
759 @node Links To The Mail Gateway, Links For Sending Mail, Links To WAIS Gateways, Defaults Used For Generating Links
|
|
760 @comment node-name, next, previous, up
|
|
761 @subsubsection Links To The Mail Gateway
|
|
762 @cindex Mail gateway links
|
|
763 @cindex Mail folder links
|
|
764 @vindex hm--html-mail-hostname:port-default
|
|
765 @vindex hm--html-mail-hostname:port-alist
|
|
766 @vindex hm--html-mail-path-alist
|
|
767
|
|
768 The following variables are for customizing the insertion of links to a mail
|
|
769 folder. You need a special server for this, which sends the email back
|
|
770 to the browser.
|
|
771
|
|
772 @itemize @bullet
|
|
773 @item
|
|
774 @code{hm--html-mail-hostname:port-default}: Default hostname with port
|
|
775 for the mail gateway.
|
|
776 @item
|
|
777 @code{hm--html-mail-hostname:port-alist}: Alist with hostnames and ports
|
|
778 for the mail gateway. It contains useful alternatives.
|
|
779 @item
|
|
780 @code{hm--html-mail-path-alist}: Alist with directories for the mail
|
|
781 gateway. In these directories you'll probably find mail folders. Each
|
|
782 alist element must consist of a number and a directory string. The
|
|
783 number is used to select the directory during the query about the
|
|
784 directory for a mail folder link.
|
|
785 @end itemize
|
|
786
|
|
787
|
|
788 @node Links For Sending Mail, Links To The Program Gateway, Links To The Mail Gateway, Defaults Used For Generating Links
|
|
789 @comment node-name, next, previous, up
|
|
790 @subsubsection Links For Sending Mail
|
|
791 @cindex mailto links
|
|
792 @vindex hm--html-mailto-alist
|
|
793
|
|
794 @itemize @bullet
|
|
795 @item
|
|
796 @code{hm--html-mailto-alist}: Alist with mail addresses for the mailto
|
|
797 alist. The value of `user-mail-address' will also be added by the
|
|
798 package to this alist.
|
|
799 @end itemize
|
|
800
|
|
801
|
|
802 @node Links To The Program Gateway, Links To The Local Program Gateway, Links For Sending Mail, Defaults Used For Generating Links
|
|
803 @comment node-name, next, previous, up
|
|
804 @subsubsection Links To The Program Gateway
|
|
805 @cindex program gateway links
|
|
806 @vindex hm--html-proggate-hostname:port-default
|
|
807 @vindex hm--html-proggate-hostname:port-alist
|
|
808 @vindex hm--html-proggate-allowed-file
|
|
809
|
|
810 The program gateway is a special TNT site specific gateway for starting
|
|
811 programs out of a html page. The programs are started by a special
|
|
812 server, which looks in an allowed file to determine if it is allowed to
|
|
813 start the program. This is necessary because the programs are running
|
|
814 under the user id of the server. We're only allowed to start simple
|
|
815 display programs like man, ls and so on.
|
|
816
|
|
817 @itemize @bullet
|
|
818 @item
|
|
819 @code{hm--html-proggate-hostname:port-default}: Default hostname with
|
|
820 port for the proggate server.
|
|
821 @item
|
|
822 @code{hm--html-proggate-hostname:port-alist}: Alist with hostnames and
|
|
823 ports for the proggate server. It contains useful alternatives.
|
|
824 @item
|
|
825 @code{hm--html-proggate-allowed-file}: The filename (with path) of the
|
|
826 proggate allowed file.
|
|
827 @end itemize
|
|
828
|
|
829
|
|
830 @node Links To The Local Program Gateway, URL For Forms And Image Tags, Links To The Program Gateway, Defaults Used For Generating Links
|
|
831 @comment node-name, next, previous, up
|
|
832 @subsubsection Links To The Local Program Gateway
|
|
833 @cindex local program gateway links
|
|
834 @vindex hm--html-local-proggate-path-alist
|
|
835
|
|
836 Another TNT site specific way to start programs from a html page. These
|
|
837 programs are started with the id of the user on the host where the
|
|
838 client (browser) is running. Therefore no restriction about the allowed
|
|
839 programs is made. With this you can start only programs and do only
|
|
840 things, which you can do also without the WWW browser.
|
|
841
|
|
842 @itemize @bullet
|
|
843 @item
|
|
844 @code{hm--html-local-proggate-path-alist}: Alist with directories for
|
|
845 the local program gateway. Contains directories, where you can find
|
|
846 programs.
|
|
847 @end itemize
|
|
848
|
|
849
|
|
850 @node URL For Forms And Image Tags, Marking Of Examples, Links To The Local Program Gateway, Defaults Used For Generating Links
|
|
851 @comment node-name, next, previous, up
|
|
852 @subsubsection URL For Forms And Image Tags
|
|
853 @cindex forms URL
|
|
854 @cindex image URL
|
|
855 @vindex hm--html-url-alist
|
|
856
|
|
857 @itemize @bullet
|
|
858 @item
|
|
859 @code{hm--html-url-alist}: Alist with URL's for FORMS and IMAGE tags.
|
|
860 The cdr of each list contains symbols, which specifies the use of the
|
|
861 URL.
|
|
862 @end itemize
|
|
863
|
|
864
|
|
865 @node Marking Of Examples, , URL For Forms And Image Tags, Defaults Used For Generating Links
|
|
866 @comment node-name, next, previous, up
|
|
867 @subsubsection Marking Of Examples
|
|
868 @cindex color of help text
|
|
869 @cindex font of help text
|
|
870 @vindex hm--html-help-foreground
|
|
871 @vindex hm--html-help-background
|
|
872 @vindex hm--html-help-font
|
|
873
|
|
874 The following variables are for marking the examples in the help
|
|
875 buffer.
|
|
876
|
|
877 @itemize @bullet
|
|
878 @item
|
|
879 @code{hm--html-help-foreground}: The foreground color for highlighting
|
|
880 examples.
|
|
881 @item
|
|
882 @code{hm--html-help-background}: The background color for highlighting
|
|
883 examples.
|
|
884 @item
|
|
885 @code{hm--html-help-font}: The font for highlighting examples.
|
|
886 @end itemize
|
|
887
|
|
888
|
|
889 @node Templates, Deleting Automounter Path Prefix, Defaults Used For Generating Links, Customization Variables
|
|
890 @comment node-name, next, previous, up
|
|
891 @subsection Templates
|
|
892 @cindex templates
|
|
893 @vindex hm--html-template-dir
|
|
894 @vindex hm--html-frame-template-file
|
|
895 @vindex hm--html-automatic-expand-templates
|
|
896
|
|
897 For inserting html template files you can customize where you keep your
|
|
898 templates.
|
|
899
|
|
900 @itemize @bullet
|
|
901 @item
|
|
902 @code{hm--html-template-dir}: A directory with template files. It is now
|
|
903 also possible to use it as a list of directories. Look at the variable
|
|
904 @code{tmpl-template-dir-list} for further descriptions. If this
|
|
905 variable is set to a non-existent directory, then it defaults to the
|
|
906 directory where the package is in XEmacs. This is done during
|
|
907 loading the file @file{hm--html-configuration.el} (@xref{Where Are All
|
|
908 The Customization Variables Defined, Where Are All The Customization
|
|
909 Variables Defined}.). This may only be useful in XEmacs >= 19.12.
|
|
910 @item
|
|
911 @code{hm--html-frame-template-file}: File which is used as template for
|
|
912 a html frame. An example is in the package
|
|
913 @emph{hm--html-menus}. @xref{Contents, Contents}.
|
|
914 @item
|
|
915 @code{hm--html-automatic-expand-templates}: Automatic expansion of
|
|
916 templates. This feature needs the file @file{tmpl-minor-mode.el} from Heiko
|
|
917 Münkel (@cite{muenkel@@tnt.uni-hannover.de}), which is distributed with the
|
|
918 package hm--html-menus.
|
|
919 @item
|
|
920 @code{hm--html-template-filter-regexp}: Regexp for filtering out non
|
|
921 (html) template files in a directory.
|
|
922 @end itemize
|
|
923
|
|
924
|
|
925 @node Deleting Automounter Path Prefix, Automatic Insert Of Information, Templates, Customization Variables
|
|
926 @comment node-name, next, previous, up
|
|
927 @subsection Deleting Automounter Path Prefix
|
|
928 @cindex automounter path
|
|
929 @vindex hm--html-delete-wrong-path-prefix
|
|
930
|
|
931 @itemize @bullet
|
|
932 @item
|
|
933 @code{hm--html-delete-wrong-path-prefix}: If non-nil, it specifies path-prefixes which should be deleted in paths.
|
|
934 The Sun automounter adds a temporary prefix to the automounted directories
|
|
935 (at our site the prefix is /tmp_mnt). But you can't select such a path
|
|
936 if the automounter has currently not mounted the directory, and so you
|
|
937 can't follow an html link which consists of such a path. To overcome
|
|
938 this behaviour, you can set this variable to the prefix
|
|
939 (e.g. "/tmp_mnt"). After that, the prefix should be stripped from the
|
|
940 paths during the creation of the links. ATTENTION: This variable is
|
|
941 used as a regular expression! It can be set to a string or to a list of
|
|
942 strings.
|
|
943 @end itemize
|
|
944
|
|
945 @node Automatic Insert Of Information, Latin 1 Characters, Deleting Automounter Path Prefix, Customization Variables
|
|
946 @comment node-name, next, previous, up
|
|
947 @subsection Automatic Insert Of Information
|
|
948 @cindex automatic insert
|
|
949 @cindex date
|
|
950 @cindex changed comment
|
|
951 @cindex created comment
|
|
952 @vindex hm--html-automatic-new-date
|
|
953 @vindex hm--html-automatic-changed-comment
|
153
|
954 @vindex hm--html-automatic-create-modified-line
|
|
955 @vindex hm--html-automatic-update-modified-line
|
|
956 @vindex hm--html-changed-comment-prefix
|
|
957 @vindex hm--html-created-comment-prefix
|
|
958 @vindex hm--html-comment-infix
|
|
959 @vindex hm--html-modified-prefix
|
|
960 @vindex hm--html-modified-end-tag
|
|
961 @vindex hm--html-modified-insert-before
|
|
962 @vindex hm--html-modified-start-tag
|
|
963
|
116
|
964
|
|
965 The @code{hm--html-mode} automatically inserts some useful information in
|
|
966 html pages. This behaviour can be changed by the following variables.
|
|
967
|
|
968 @itemize @bullet
|
|
969 @item
|
153
|
970 @code{hm--html-automatic-create-title-date}: t => A date string will be
|
|
971 inserted in the title line. This will be updated each time before file
|
|
972 saving, if @code{hm--html-automatic-update-title-date} is also set to t.
|
|
973 @item
|
|
974 @code{hm--html-automatic-update-title-date}: t => The date in the title
|
|
975 line will be updated before file saving. nil => No automatic update of
|
|
976 the date.
|
|
977 @item
|
|
978 @code{hm--html-automatic-created-comment}: t => A "created comment"
|
|
979 line will be added. nil => No automatic insert of a "created
|
|
980 comment" line.
|
|
981 @item
|
|
982 @code{hm--html-created-comment-prefix}: The prefix text of the "created
|
|
983 comment" lines. By default this is set to "Created by: ".
|
|
984 @item
|
|
985 @code{hm--html-comment-infix}: The infix (second part) of the "created
|
|
986 comment" and the "changed comment" lines. By default, if this variable
|
|
987 is nil, the value of @code{hm--html-username} or, if this variable is
|
|
988 also nil, the return value of @code{(user-full-name)} will be used.
|
|
989 In these cases the infix looks like "Heiko Münkel, ".
|
|
990
|
|
991 Set it to an empty string, if you don't want to have your name in the
|
|
992 comments.
|
116
|
993 @item
|
|
994 @code{hm--html-automatic-changed-comment}: t => A "changed comment"
|
|
995 line will be added before file saving. nil => No automatic insert
|
|
996 of a "changed comment" line.
|
|
997 @item
|
153
|
998 @code{hm--html-changed-comment-prefix}: The prefix text of the "changed
|
|
999 comment" lines. By default this is set to "Changed by: ".
|
|
1000 @item
|
|
1001 @code{hm--html-automatic-create-modified-line}: t => Some commands will
|
|
1002 insert a visible "modified" line with the current date, if such a line
|
|
1003 does not exist already. If it already exist, the date in the line will
|
|
1004 be updated. Visible means, that it is not a HTML comment. By default it
|
|
1005 looks like the following:
|
|
1006 @samp{<EM>Modified 24-May-1997</EM>}
|
|
1007 @item
|
|
1008 @code{hm--html-automatic-update-modified-line}: t => The visible
|
|
1009 "modified" line will be updated with the current date before file
|
|
1010 saving. If such a line does not exist, nothing will be done.
|
|
1011 @item
|
|
1012 @code{hm--html-modified-prefix}: Prefix of the "modified" line.
|
|
1013 By default it is set to @samp{"Modified: "}.
|
|
1014 @item
|
|
1015 @code{hm--html-modified-start-tag}: Start tag of the modified line.
|
|
1016 By default it is @samp{<EM>}. If you change this, you'll need to change also
|
|
1017 @code{hm--html--modified-end-tag}.
|
|
1018 @item
|
|
1019 @code{hm--html-modified-end-tag}: End tag of the modified line.
|
|
1020 By default it is @samp{</EM>}. If you change this, you'll need to change
|
|
1021 also @code{hm--html-modified-start-tag}.
|
|
1022 @item
|
|
1023 @code{hm--html-modified-insert-before}: The "modified line" will be
|
|
1024 inserted before this string. The search will be done from the end to the
|
|
1025 beginning. And the "modified line" will be put at least before the
|
|
1026 @samp{</HTML>} and the @samp{</BODY>} tags.
|
116
|
1027 @end itemize
|
|
1028
|
|
1029
|
|
1030 @node Latin 1 Characters, Drag And Drop, Automatic Insert Of Information, Customization Variables
|
|
1031 @comment node-name, next, previous, up
|
|
1032 @subsection Latin 1 Characters
|
|
1033 @cindex latin 1 characters
|
|
1034 @vindex hm--html-bind-latin-1-char-entities
|
|
1035
|
|
1036 @itemize @bullet
|
|
1037 @item
|
|
1038 @code{hm--html-bind-latin-1-char-entities}: Set this to nil, if you
|
|
1039 don't want to use the ISO Latin 1 character entities. This is only
|
153
|
1040 useful if @code{hm--html-use-old-keymap} is set to nil. It is only used
|
116
|
1041 when loading the html package the first time.
|
|
1042 @end itemize
|
|
1043
|
|
1044
|
|
1045 @node Drag And Drop, Font Lock Keywords, Latin 1 Characters, Customization Variables
|
|
1046 @comment node-name, next, previous, up
|
|
1047 @subsection Drag And Drop
|
|
1048 @cindex drag and drop
|
|
1049 @vindex hm--html-idd-create-relative-links
|
|
1050 @vindex hm--html-idd-actions
|
|
1051
|
|
1052 @itemize @bullet
|
|
1053 @item
|
|
1054 @code{hm--html-idd-create-relative-links}: If t, then the
|
|
1055 @code{hm--html-idd-*} functions create relative links. Otherwise
|
|
1056 absolute links are used. The idd functions are used for drag and drop.
|
|
1057 @item
|
|
1058 @code{hm--html-idd-actions}: The action list for the destination mode
|
|
1059 @code{hm--html-mode}. Look at the description of the variable
|
|
1060 idd-actions.
|
|
1061 @end itemize
|
|
1062
|
|
1063
|
|
1064 @node Font Lock Keywords, Prefix Keys, Drag And Drop, Customization Variables
|
|
1065 @comment node-name, next, previous, up
|
|
1066 @subsection Font Lock Keywords
|
|
1067 @cindex font lock keywords
|
|
1068 @vindex hm--html-font-lock-keywords-1
|
|
1069 @vindex hm--html-font-lock-keywords-2
|
|
1070 @vindex hm--html-font-lock-keywords
|
|
1071
|
|
1072 @itemize @bullet
|
|
1073 @item
|
|
1074 @code{hm--html-font-lock-keywords-1}: Subdued level highlighting for
|
|
1075 @code{hm--html-mode}.
|
|
1076 @item
|
|
1077 @code{hm--html-font-lock-keywords-2}: Gaudy level highlighting for
|
|
1078 @code{hm--html-mode}.
|
|
1079 @item
|
|
1080 @code{hm--html-font-lock-keywords}: Default expressions to highlight in
|
|
1081 the @code{hm--html-mode}.
|
|
1082 @end itemize
|
|
1083
|
|
1084
|
|
1085 @node Prefix Keys, Pulldown Menu Names, Font Lock Keywords, Customization Variables
|
|
1086 @comment node-name, next, previous, up
|
|
1087 @subsection Prefix Keys
|
|
1088 @cindex prefix keys
|
|
1089 @kindex prefix keys
|
|
1090 @vindex hm--html-minor-mode-prefix-key
|
|
1091 @vindex hm--html-mode-prefix-key
|
|
1092
|
|
1093 @itemize @bullet
|
|
1094 @item
|
|
1095 @code{hm--html-minor-mode-prefix-key}: The prefix key for the key tables
|
|
1096 in @code{hm--html-minor-mode}.
|
|
1097 @item
|
|
1098 @code{hm--html-mode-prefix-key}: The prefix key for the hm--html keys in
|
|
1099 @code{hm--html-mode}.
|
|
1100 @end itemize
|
|
1101
|
|
1102
|
|
1103 @node Pulldown Menu Names, Hook Variables, Prefix Keys, Customization Variables
|
|
1104 @comment node-name, next, previous, up
|
|
1105 @subsection Pulldown Menu Names
|
|
1106 @cindex pulldown menu names
|
|
1107 @vindex hm--html-minor-mode-pulldown-menu-name
|
|
1108 @vindex hm--html-mode-pulldown-menu-name
|
|
1109
|
|
1110 Perhaps you'd like to change the names to get the same menu
|
|
1111 names in the major and in the minor modes of the @code{hm--html-menus}
|
|
1112 package.
|
|
1113
|
|
1114 @itemize @bullet
|
|
1115 @item
|
|
1116 @code{hm--html-mode-pulldown-menu-name}: The name of the pulldown menu
|
|
1117 in the major html mode.
|
|
1118 @item
|
|
1119 @code{hm--html-minor-mode-pulldown-menu-name}: The name of the pulldown
|
|
1120 menu in the minor html mode.
|
|
1121 @end itemize
|
|
1122
|
|
1123
|
|
1124 @node Hook Variables, Previewing HTML Files, Pulldown Menu Names, Customization Variables
|
|
1125 @comment node-name, next, previous, up
|
|
1126 @subsection Hook Variables
|
|
1127 @vindex hm--html-mode-hook
|
|
1128
|
|
1129 You may use the following two variables, if you'd like to call special
|
|
1130 functions each time the major html mode is entered or the package is
|
|
1131 loaded.
|
|
1132
|
|
1133 @itemize @bullet
|
|
1134 @item
|
|
1135 @code{hm--html-mode-hook}: This hook will be called each time
|
|
1136 @code{hm--html-mode} is invoked.
|
|
1137 @item
|
|
1138 @code{hm--html-load-hook}: Hook variable to execute functions after
|
|
1139 loading the package.
|
|
1140 @end itemize
|
|
1141
|
|
1142
|
|
1143 @node Previewing HTML Files, Meta Element, Hook Variables, Customization Variables
|
|
1144 @comment node-name, next, previous, up
|
|
1145 @subsection Previewing HTML Files
|
|
1146 @cindex previewing HTML files
|
|
1147 @vindex html-view-mosaic-command
|
|
1148 @vindex html-sigusr1-signal-value
|
|
1149
|
|
1150 The following two variables are only used, if you preview html
|
|
1151 documents with @code{Mosaic}. There are also some other variables in
|
|
1152 @file{hmtl-view.el}. @xref{Contents, Contents}. Look at that file if
|
|
1153 you have trouble with the functions to preview the html document with
|
|
1154 @code{Mosaic}.
|
|
1155
|
|
1156 @itemize @bullet
|
|
1157 @item
|
|
1158 @code{html-view-mosaic-command}: The command that runs @code{Mosaic} on your
|
|
1159 system.
|
|
1160 @item
|
|
1161 @code{html-sigusr1-signal-value}: Value for the SIGUSR1 signal on your
|
|
1162 system. See, usually, @file{/usr/include/sys/signal.h}.
|
|
1163 @example
|
|
1164 SunOS 4.1.x : (setq html-sigusr1-signal-value 30)
|
|
1165 SunOS 5.x : (setq html-sigusr1-signal-value 16)
|
|
1166 Linux : (setq html-sigusr1-signal-value 10))
|
|
1167 @end example
|
|
1168 @end itemize
|
|
1169
|
|
1170
|
|
1171 @node Meta Element, Indentation, Previewing HTML Files, Customization Variables
|
|
1172 @comment node-name, next, previous, up
|
|
1173 @subsection Meta Element
|
|
1174 @cindex meta element
|
|
1175 @vindex hm--html-meta-name-alist
|
|
1176
|
|
1177 @itemize @bullet
|
|
1178 @item
|
|
1179 @code{hm--html-meta-name-alist}: Alist with possible names for the name
|
|
1180 or http-equiv attribute of meta. Currently I know of the names
|
|
1181 @code{Expires}, @code{Keys} and @code{Author}. Please send me
|
|
1182 (@emph{muenkel@@tnt.uni-hannover.de}) an email, if you know other
|
|
1183 standard html names for the meta element.
|
|
1184 @end itemize
|
|
1185
|
|
1186
|
|
1187 @node Indentation, , Meta Element, Customization Variables
|
|
1188 @comment node-name, next, previous, up
|
|
1189 @subsection Indentation
|
|
1190 @cindex indentation
|
|
1191 @vindex hm--html-disable-indentation
|
|
1192 @vindex hm--html-inter-tag-indent
|
|
1193 @vindex hm--html-comment-indent
|
|
1194 @vindex hm--html-intra-tag-indent
|
|
1195 @vindex hm--html-tag-name-alist
|
|
1196
|
|
1197 @itemize @bullet
|
|
1198 @item
|
|
1199 @code{hm--html-disable-indentation}: Set this to t if you want to
|
|
1200 disable indentation in @code{hm--html-mode}. And maybe send me
|
|
1201 (@emph{muenkel@@tnt.uni-hannover.de}) a note why you did this.
|
|
1202 @item
|
|
1203 @code{hm--html-inter-tag-indent}: The indentation after a start tag.
|
|
1204 @item
|
|
1205 @code{hm--html-comment-indent}: The indentation of a comment.
|
|
1206 @item
|
|
1207 @code{hm--html-intra-tag-indent}: The indentation after the start of a
|
|
1208 tag.
|
|
1209 @item
|
|
1210 @code{hm--html-tag-name-alist}: An alist with tag names known by
|
|
1211 @code{hm--html-mode}. It is used to determine if a tag is a one element
|
|
1212 tag or not. In the future it should also be used to get possible
|
|
1213 parameters of the tag. Use lower case characters in this list!!!! If
|
|
1214 you have problems with the indentation of
|
|
1215 @code{:hm--html-one-or-two-element-tag} elements, then you should set
|
|
1216 them to either @code{:hm--html-one-element-tag} or
|
|
1217 @code{:hm--html-two-element-tag}, depending on how you use these
|
|
1218 elements. In the future I'll try to implement a better indentation for
|
|
1219 these elements.
|
|
1220 @end itemize
|
|
1221
|
|
1222
|
|
1223 @node Add New Elements, Use With psgml-html, Customization, Top
|
|
1224 @comment node-name, next, previous, up
|
|
1225 @chapter Add New Elements
|
|
1226 @cindex add new html elements
|
|
1227 @cindex non standard html
|
|
1228 @vindex hm--html-tag-name-alist
|
|
1229
|
|
1230 If you'd like to add new HTML elements to this package, you should first take
|
|
1231 a look at the file @file{hm--html-not-standard.el}, which
|
|
1232 already contains some non-standard elements. If you find your tags
|
|
1233 there, you should uncomment the line @code{(require
|
|
1234 'hm--html-not-standard)} in the file @file{hm--html-mode.el}. There are
|
|
1235 also menu entries for these elements in the file
|
|
1236 @file{hm--html-menu.el}, which are commented out. Don't forget to
|
|
1237 recompile the changed lisp files after that!
|
|
1238
|
|
1239 If you don't find your new elements there, you should do the following
|
|
1240 steps to add them:
|
|
1241
|
|
1242 @enumerate
|
|
1243 @item
|
|
1244 Locate a tag which is similar to the one you want to add. "Similar"
|
|
1245 means that it is inserted in the way you want to insert the new
|
|
1246 tags. Now let's assume, that you chose @samp{<strong></strong>}.
|
|
1247 @item
|
|
1248 Look at the file @file{hm--html.el} and search the function(s) which
|
|
1249 inserts the similar tag(s). If the HTML element consists of only one
|
|
1250 tag, then there should be only one function for inserting the tag. If
|
|
1251 the element consists of a start and an end tag, there are at least two
|
|
1252 functions. Only in some special cases, if it is possible to insert
|
|
1253 elements with different attribute values, are there more than two
|
|
1254 functions. In the case of @samp{<strong></strong>}, there are the two
|
|
1255 functions @code{hm--html-add-strong} and
|
|
1256 @code{hm--html-add-strong-to-region}. The first one is used if no
|
|
1257 region is active, and the second if a region is active. The naming scheme
|
|
1258 of these functions is always @var{hm--html-add-<tagname>} and
|
|
1259 @var{hm--html-add-<tagname>-to-region}. @var{<tagname>} is not in all
|
|
1260 cases the tagname. Sometimes a more human readable name is used (e.g.
|
|
1261 bold instead of b).
|
|
1262 @item
|
|
1263 To get the right indentation for the new tags you should add an entry
|
|
1264 for them to the variable @code{hm--html-tag-name-alist}, which is defined
|
|
1265 in @file{hm--html-configuration.el}. Let's assume that the new tagname
|
|
1266 is @samp{foo}. The entry in @code{hm--html-tag-name-alist} should
|
|
1267 be
|
|
1268 @lisp
|
|
1269 ("foo" (:hm--html-one-element-tag t))
|
|
1270 @end lisp
|
|
1271 if the new element consists only of one tag (@samp{img} is such an
|
|
1272 element) or
|
|
1273 @lisp
|
|
1274 ("foo" (:hm--html-two-element-tag t))
|
|
1275 @end lisp
|
|
1276 if the new element consists of two tags (@samp{strong} is such an
|
|
1277 element) or
|
|
1278 @lisp
|
|
1279 ("foo" (:hm--html-one-or-two-element-tag t))
|
|
1280 @end lisp
|
|
1281 if the new element consists of two tags, but it is permissible to use the
|
|
1282 start tag without its end tag (@samp{p} is such an element).
|
|
1283 @end enumerate
|
|
1284
|
|
1285 Now you are ready and able to insert the new tags with
|
|
1286 @example
|
|
1287 M-x hm--html-add-foo
|
|
1288 @end example
|
|
1289 and
|
|
1290 @example
|
|
1291 M-x hm--html-add-foo-to-region
|
|
1292 @end example
|
|
1293
|
|
1294 If you want to add the new commands also to the popup menu,
|
|
1295 then you have to take a look at @file{hm--html-menu.el}, where all the
|
|
1296 menus are defined. Look at @code{hm--html-menu-noregion-expert} and
|
|
1297 @code{hm--html-menu-region-expert}. The first one is used if no region is
|
|
1298 active, and the second if a region is active (both are only available
|
|
1299 if the "expert menus" are used; this is an option in the pulldown
|
|
1300 menu). You should now add an entry like
|
|
1301 @lisp
|
|
1302 ["Foo" hm--html-add-foo t]
|
|
1303 @end lisp
|
|
1304 to the @code{hm--html-menu-noregion-expert} variable and an entry
|
|
1305 @lisp
|
|
1306 ["Foo" hm--html-add-foo-to-region t]
|
|
1307 @end lisp
|
|
1308 to the @code{hm--html-menu-region-expert} variable (only if
|
|
1309 @code{hm--html-add-foo-to-region} exists). You can do this by setting the
|
|
1310 whole variable to a new value or by using the function
|
|
1311 @code{add-menu-button}. I recommend the last method.
|
|
1312
|
|
1313 If you'd like to have a key sequence for inserting the new tag as well,
|
|
1314 take a look at @file{hm--html-keys.el}. There are
|
|
1315 different key tables defined for region and no region cases and for
|
|
1316 different sorts of elements, like anchors, frame elements (doesn't mean
|
|
1317 the Netscape element frame) and so on. These "groups" are the same as
|
|
1318 the submenu groups.
|
|
1319
|
|
1320
|
|
1321 @node Use With psgml-html, Internal Drag And Drop, Add New Elements, Top
|
|
1322 @comment node-name, next, previous, up
|
|
1323 @chapter Use With psgml-html
|
|
1324 @cindex use with other HTML modes
|
|
1325 @findex hm--html-minor-mode
|
|
1326
|
|
1327 The package provides a minor mode called @code{hm--html-minor-mode},
|
|
1328 which could be used to join the features of this package with another
|
|
1329 HTML package. Currently this is only tested with the psgml-html mode in
|
|
1330 XEmacs. Please let me know if it works or not with other packages
|
|
1331 or in Emacs 19.
|
|
1332
|
|
1333 If you'd like to use the minor mode in psgml-html mode,
|
|
1334 put the following line in your @file{.emacs}:
|
|
1335
|
|
1336 @lisp
|
|
1337 (add-hook 'html-mode-hook 'hm--html-minor-mode)
|
|
1338 @end lisp
|
|
1339
|
|
1340 Note: This should work only in XEmacs versions greater than 19.14 and not
|
|
1341 in 20.0. It doesn't work in other versions because the hook variable
|
|
1342 @code{html-mode-hook} doesn't exist in those versions. Therefore in those
|
|
1343 versions you must either call the minor mode by hand or change the
|
|
1344 lisp file of the psgml-html mode.
|
|
1345
|
|
1346
|
|
1347 @node Internal Drag And Drop, Template Minor Mode, Use With psgml-html, Top
|
|
1348 @comment node-name, next, previous, up
|
|
1349 @chapter Internal Drag And Drop
|
|
1350 @cindex drag and drop
|
|
1351 @cindex internal drag and drop
|
|
1352 @vindex idd-actions
|
|
1353 @vindex hm--html-idd-actions
|
|
1354
|
|
1355
|
|
1356 The file @file{internal-drag-and-drop.el}, which is shipped with
|
|
1357 @file{hm--html-menus}, provides a general package for internal drag and
|
|
1358 drop in emacs. "General" means that it can be used apart from
|
|
1359 @code{hm--html-mode} in any other mode.
|
|
1360
|
|
1361 You can start such an action by clicking with the mouse in the source
|
|
1362 buffer and then in the destination buffer. The action may depend on
|
|
1363 the points where you've clicked with the mouse, on the state of the
|
|
1364 region, the point, the mark and any other properties of the source and
|
|
1365 the destination buffers. The actions are defined by the variable
|
|
1366 @code{idd-actions}, which is a buffer local variable.
|
|
1367
|
|
1368
|
|
1369 @menu
|
|
1370 * Drag And Drop Customization::
|
|
1371 * The Drag And Drop Commands::
|
|
1372 @end menu
|
|
1373
|
|
1374 @node Drag And Drop Customization, The Drag And Drop Commands, Internal Drag And Drop, Internal Drag And Drop
|
|
1375 @comment node-name, next, previous, up
|
|
1376 @section Drag And Drop Customization
|
|
1377 @cindex customization
|
|
1378 @cindex configuration
|
|
1379
|
|
1380 The internal drag and drop functions may be used in all
|
|
1381 modes. Therefore their general customization isn't done in
|
|
1382 @file{hm--html-configuration.el}. Its variables are defined in the file
|
|
1383 @file{internal-drag-and-drop.el} instead. You can set them in your
|
|
1384 @file{.emacs} or in one of the other emacs init files (e.g.
|
|
1385 @file{default.el}). The following subsections describe the main
|
|
1386 customization variables.
|
|
1387
|
|
1388
|
|
1389 @menu
|
|
1390 * Defining The Drag And Drop Actions::
|
|
1391 * The Mouse Bindings::
|
|
1392 @end menu
|
|
1393
|
|
1394 @node Defining The Drag And Drop Actions, The Mouse Bindings, Drag And Drop Customization, Drag And Drop Customization
|
|
1395 @comment node-name, next, previous, up
|
|
1396 @subsection Defining The Drag And Drop Actions
|
|
1397 @cindex actions
|
|
1398 @cindex drag and drop actions
|
|
1399 @vindex idd-actions
|
|
1400
|
|
1401 The drag and drop actions are commands which are called after an
|
|
1402 internal drag and drop. They depend on the source and the destination
|
|
1403 of the drag and drop. Drag and drop actions are defined by the
|
|
1404 variable:
|
|
1405
|
|
1406 @itemize @bullet
|
|
1407 @item
|
|
1408 @code{idd-actions}: A list with actions, depending on the source and the
|
|
1409 destination of the drag and drop command.
|
|
1410 @end itemize
|
|
1411
|
|
1412 The list looks like:
|
|
1413 @lisp
|
|
1414 '((@var{<destination-specification-1>} (@var{<source-specification-1>} @var{<action-1-1>})
|
|
1415 (@var{<source-specification-2>} @var{<action-1-2>})
|
|
1416 :
|
|
1417 )
|
|
1418 (@var{<destination-specification-2>} (@var{<source-specification-1>} @var{<action-2-1>})
|
|
1419 (@var{<source-specification-2>} @var{<action-2-2>})
|
|
1420 :
|
|
1421 )
|
|
1422 :
|
|
1423 )
|
|
1424 @end lisp
|
|
1425 The @var{<source-specification>} looks like the following:
|
|
1426 @lisp
|
|
1427 '([(@var{<specification-type>} @var{<value>})])
|
|
1428 @end lisp
|
|
1429 with
|
|
1430 @lisp
|
|
1431 @table @var
|
|
1432 @item <specification-type> :==
|
|
1433 @w{@code{idd-if-minor-mode-p}} | @w{@code{idd-if-buffer-name-p}} |
|
|
1434 @w{@code{idd-if-region-active-p}} | @w{@code{idd-if-url-at-point-p}} |
|
|
1435 @w{@code{idd-if-major-mode-p}} | @w{@code{idd-if-variable-non-nil-p}} |
|
|
1436 @w{@code{idd-if-dired-file-on-line-p}} |
|
|
1437 @w{@code{idd-if-dired-no-file-on-line-p}} |
|
|
1438 @w{@code{idd-if-local-file-p}} | @w{@code{idd-if-buffer-name-p}} |
|
|
1439 @w{@code{idd-if-modifiers-p}} | ...
|
|
1440 @end table
|
|
1441 @end lisp
|
|
1442
|
|
1443 The @var{<specification-type>} - functions must have two arguments. The
|
|
1444 first one is the source or destination and the second is the
|
|
1445 @var{<value>}. It must return @code{nil}, if the test wasn't successful,
|
|
1446 and a number (in general 1), which specifies the weight of the test
|
|
1447 function. The weights of all single tests are added to a summary weight
|
|
1448 and assigned to the action. The action with the highest weight is called
|
|
1449 from the action handler. Look at the definition of
|
|
1450 @w{@code{idd-if-major-mode-p}}, @w{@code{idd-if-minor-mode-p}} and so on for
|
|
1451 examples. Look at the function
|
|
1452 @code{idd-get-source-or-destination-alist}, if you want to know the
|
|
1453 structure of the @code{source-or-destination} argument of these
|
|
1454 functions.
|
|
1455
|
|
1456 The @var{<destination-specification>} looks like
|
|
1457 @var{<source-specification>}, but in general it could be set to
|
|
1458 @code{nil} in mode specific idd-action lists.
|
|
1459
|
|
1460 If @var{<destination-specification-1>} or @var{<source-specification-1>}
|
|
1461 is set to @code{nil}, then every source or source
|
|
1462 matches. @code{idd-actions} is a buffer local variable, which should be
|
|
1463 at least mode depended. So if the @var{<destination-specification-1>} is
|
|
1464 set to @code{nil} it says, that the destination buffer must only have a
|
|
1465 specific mode. However, it's also possible to define a general
|
|
1466 @code{idd-actions} list, where the destination mode is specified by
|
|
1467 @code{idd-if-major-mode-p}.
|
|
1468
|
|
1469 @var{<action>} is a function which has two arguments. The first
|
|
1470 specifies the source and the second the destination. Look at the
|
|
1471 function definition of @code{idd-action-copy-region} and
|
|
1472 @code{idd-action-copy-replace-region}. They are examples for such
|
|
1473 actions.
|
|
1474
|
|
1475 The following is an example for @code{hm--html-mode}:
|
|
1476
|
|
1477 @lisp
|
|
1478 (defvar idd-actions
|
|
1479 '((nil (((idd-if-major-mode-p . dired-mode)
|
|
1480 (idd-if-dired-file-on-line-p . ".*\\.\\(gif\\)\\|\\(jpq\\)"))
|
|
1481 hm--html-idd-add-include-image-from-dired-line)
|
|
1482 (((idd-if-major-mode-p . dired-mode)
|
|
1483 (idd-if-dired-no-file-on-line-p . nil))
|
|
1484 hm--html-idd-add-file-link-to-file-on-dired-line)
|
|
1485 (((idd-if-major-mode-p . dired-mode)
|
|
1486 (idd-if-dired-no-file-on-line-p . t))
|
|
1487 hm--html-idd-add-file-link-to-directory-of-buffer)
|
|
1488 (((idd-if-major-mode-p . w3-mode)
|
|
1489 (idd-if-url-at-point-p . t))
|
|
1490 hm--html-idd-add-html-link-from-w3-buffer-point)
|
|
1491 (((idd-if-major-mode-p . w3-mode))
|
|
1492 hm--html-idd-add-html-link-to-w3-buffer)
|
|
1493 (((idd-if-local-file-p . t))
|
|
1494 hm--html-idd-add-file-link-to-buffer)))
|
|
1495 @end lisp
|
|
1496
|
|
1497
|
|
1498 @node The Mouse Bindings, , Defining The Drag And Drop Actions, Drag And Drop Customization
|
|
1499 @comment node-name, next, previous, up
|
|
1500 @subsection The Mouse Bindings
|
|
1501 @cindex mouse bindings
|
|
1502 @vindex idd-global-mouse-keys
|
|
1503 @vindex idd-global-help-mouse-keys
|
|
1504 @vindex idd-drag-and-drop-mouse-binding-type
|
|
1505 @findex idd-mouse-drag-and-drop
|
|
1506 @findex idd-help-mouse-drag-and-drop
|
|
1507
|
|
1508 The following three variables determine the mouse
|
|
1509 bindings and the mouse behaviour for the internal drag and drop package:
|
|
1510
|
|
1511 @itemize @bullet
|
|
1512 @item
|
|
1513 @code{idd-global-mouse-keys}: The mouse keys for the command
|
|
1514 @code{idd-mouse-drag-and-drop}. The command
|
|
1515 @code{idd-mouse-drag-and-drop} is bound during the loading of the
|
|
1516 package @file{internal-drag-and-drop} to these keys in the @b{global
|
|
1517 keymap}. The drag and drop action @b{must be bound global}, because the
|
|
1518 drag and drop action must be started by a click in the source
|
|
1519 buffer. Therefore no action will be performed if the mouse keys are not
|
|
1520 bound to @code{idd-mouse-drag-and-drop} in the destination buffer.
|
|
1521
|
|
1522 Set it to @code{nil}, if you don't want to bind this function during
|
|
1523 loading.
|
|
1524
|
|
1525 If the command is already bound in the global keymap during loading,
|
|
1526 then this key sequence will not be bound.
|
|
1527
|
|
1528 By default the mouse binding is @key{meta} @key{control} @key{button1}.
|
|
1529
|
|
1530 @item
|
|
1531 @code{idd-global-help-mouse-keys}: The mouse keys for the command
|
|
1532 @code{idd-help-mouse-drag-and-drop}. The command
|
|
1533 @code{idd-help-mouse-drag-and-drop} is bound during the loading of the
|
|
1534 package @file{internal-drag-and-drop} to these keys in the @b{global
|
|
1535 keymap}.
|
|
1536
|
|
1537 Set it to @code{nil} if you don't want to bind this function during
|
|
1538 loading.
|
|
1539
|
|
1540 If the command is already bound in the global keymap during loading,
|
|
1541 then this key sequence will not be bound.
|
|
1542
|
|
1543 By default the mouse binding is @key{meta} @key{control} @key{button3}.
|
|
1544
|
|
1545 @item
|
|
1546 @code{idd-drag-and-drop-mouse-binding-type}: The type of the drag and
|
|
1547 drop mouse binding. The value may be @code{click} or
|
|
1548 @code{press-button-during-move}. A value of @code{click} means that
|
|
1549 you have to click over the source, release the button and click it again
|
|
1550 over the destination. A value of @code{press-button-during-move} means
|
|
1551 that you have to press the button down over the source and hold it until
|
|
1552 the mouse pointer is over the destination.
|
|
1553
|
|
1554 The @emph{disadvantage} of the @code{press-button-during-move} type
|
|
1555 compared with the @code{click} type is that you can't select a destination
|
|
1556 region, and therefore a drag and drop action depending on a selected
|
|
1557 region can't be started with that type of mouse binding.
|
|
1558 @end itemize
|
|
1559
|
|
1560 @node The Drag And Drop Commands, , Drag And Drop Customization, Internal Drag And Drop
|
|
1561 @comment node-name, next, previous, up
|
|
1562 @section The Drag And Drop Commands
|
|
1563 @cindex drag and drop commands
|
|
1564
|
|
1565 There are 2 groups of commands. The first contains commands which
|
|
1566 perform the drag and drop action and the second displays help
|
|
1567 messages about a possible drag and drop action.
|
|
1568
|
|
1569
|
|
1570 @menu
|
|
1571 * Performing The Drag And Drop Action::
|
|
1572 * Displaying Help On Drag And Drop::
|
|
1573 @end menu
|
|
1574
|
|
1575 @node Performing The Drag And Drop Action, Displaying Help On Drag And Drop, The Drag And Drop Commands, The Drag And Drop Commands
|
|
1576 @comment node-name, next, previous, up
|
|
1577 @subsection Performing The Drag And Drop Action
|
|
1578 @cindex drag and drop commands
|
|
1579 @cindex performing drag and drop
|
|
1580 @findex idd-mouse-drag-and-drop
|
|
1581 @findex idd-start-mouse-drag-and-drop
|
|
1582 @findex idd-mouse-drag-and-drop-press-button-during-move
|
|
1583 @findex idd-mouse-drag-and-drop-click
|
|
1584 @findex idd-help-start-action
|
|
1585 @vindex idd-drag-and-drop-mouse-binding-type
|
|
1586
|
|
1587 The following five commands perform internal
|
|
1588 drag and drop actions:
|
|
1589
|
|
1590 @itemize @bullet
|
|
1591 @item
|
|
1592 @code{idd-mouse-drag-and-drop}: Performs a drag and drop action. It
|
|
1593 calls the command @code{idd-mouse-drag-and-drop-click} or
|
|
1594 @code{idd-mouse-drag-and-drop-press-button-during-move} depending on the
|
|
1595 value of @code{idd-drag-and-drop-mouse-binding-type}. However you've set
|
|
1596 this, you start a drag and drop action with this command by pressing
|
|
1597 down its mouse button over the source. This command is bound by default
|
|
1598 to a global mouse key sequence. @xref{The Mouse Bindings}.
|
|
1599
|
|
1600 @item
|
|
1601 @code{idd-start-mouse-drag-and-drop}: Starts a drag and drop command.
|
|
1602 This command could be used to start a drag and drop command without a
|
|
1603 button event. Therefore this should not be bound directly to a mouse
|
|
1604 button. This command can be used to start a drag and drop action with a
|
|
1605 click on a menu item or tool bar icon. After that you have to press a
|
|
1606 mouse button over the source. The rest depends on the value of
|
|
1607 @code{idd-drag-and-drop-mouse-binding-type}, as with the command
|
|
1608 @code{idd-mouse-drag-and-drop}.
|
|
1609
|
|
1610 @item
|
|
1611 @code{idd-help-start-action}: It is possible to display a help buffer
|
|
1612 with a message in it, which describes the action instead of performing
|
|
1613 it immediately (@pxref{Displaying Help On Drag And Drop}). In this case
|
|
1614 you can perform the action by clicking on a special extent in the help
|
|
1615 buffer, which runs this command.
|
|
1616
|
|
1617 @item
|
|
1618 @code{idd-mouse-drag-and-drop-press-button-during-move}: Performs a drag
|
|
1619 and drop action in a more traditional way than
|
|
1620 @code{idd-mouse-drag-and-drop-click}. First you press the button
|
|
1621 over the source and then move with the depressed button to the
|
|
1622 destination, where you release the button. This must be bound to a
|
|
1623 mouse button. The @code{SOURCE-EVENT} must be a
|
|
1624 @code{button-press-event}.
|
|
1625
|
|
1626 The disadvantage of this command compared with the command
|
|
1627 @code{idd-mouse-drag-and-drop-click} is, that you can't select a
|
|
1628 destination region.
|
|
1629
|
|
1630 You should bind the command @code{idd-mouse-drag-and-drop} instead of
|
|
1631 this one, because it's then possible to switch between both drag and
|
|
1632 drop behaviours by changing only one variable.
|
|
1633
|
|
1634 @item
|
|
1635 @code{idd-mouse-drag-and-drop-click}: Performs a drag and drop action in
|
|
1636 a more useful way than
|
|
1637 @code{idd-mouse-drag-and-drop-press-button-during-move}. First you
|
|
1638 click on the source and then on the destination. This must
|
|
1639 be bound to a mouse button. The @code{SOURCE-EVENT} must be a
|
|
1640 @code{button-press-event}.
|
|
1641
|
|
1642 You should bind the command @code{idd-mouse-drag-and-drop} instead of
|
|
1643 this one, because it's then possible to switch between both drag and
|
|
1644 drop behaviours by changing only one variable.
|
|
1645 @end itemize
|
|
1646
|
|
1647
|
|
1648 @node Displaying Help On Drag And Drop, , Performing The Drag And Drop Action, The Drag And Drop Commands
|
|
1649 @comment node-name, next, previous, up
|
|
1650 @subsection Displaying Help On Drag And Drop
|
|
1651 @cindex help on drag and drop
|
|
1652 @cindex displaying help on drag and drop
|
|
1653 @findex idd-help-mouse-drag-and-drop
|
|
1654 @findex idd-start-help-mouse-drag-and-drop
|
|
1655
|
|
1656 It's possible to display a buffer with a help message describing the
|
|
1657 action being considered before actually performing it. To perform the
|
|
1658 action, you then click on a special extent in the help buffer. To get
|
|
1659 the help buffer, you do the same things as you do to perform the action
|
|
1660 itself. Only the mouse key differs. There are two commands for this:
|
|
1661
|
|
1662 @itemize @bullet
|
|
1663 @item
|
|
1664 @code{idd-help-mouse-drag-and-drop}: Displays help about the drag and
|
|
1665 drop action. It works similarly to @code{idd-mouse-drag-and-drop}
|
|
1666 (@pxref{Performing The Drag And Drop Action}).
|
|
1667
|
|
1668 By default this command is globally bound to @key{meta} @key{control}
|
|
1669 @key{button3}. This may be changed with the variable
|
|
1670 @code{idd-global-help-mouse-keys} (@pxref{The Mouse Bindings}).
|
|
1671
|
|
1672 @item
|
|
1673 @code{idd-start-help-mouse-drag-and-drop}: Starts displaying help about
|
|
1674 the drag and drop action. It works similarly to
|
|
1675 @code{idd-start-mouse-drag-and-drop} (@pxref{Performing The Drag And
|
|
1676 Drop Action}) and can be used to start the help by clicking on a menu
|
|
1677 item or a tool bar icon.
|
|
1678 @end itemize
|
|
1679
|
|
1680
|
153
|
1681 @node Template Minor Mode, Hints For Emacs 19 Users, Internal Drag And Drop, Top
|
116
|
1682 @comment node-name, next, previous, up
|
|
1683 @chapter Template Minor Mode
|
|
1684 @cindex templates
|
|
1685
|
|
1686 There's a file called @file{tmpl-minor-mode.el} in the distribution
|
|
1687 of the package @emph{hm---html-menus}. It provides functions to use
|
|
1688 templates for the @code{hm--html-mode} and also for other modes. It
|
|
1689 needs nothing from the rest of the package and therefore it can be used
|
|
1690 independently of @code{hm--html-mode}.
|
|
1691
|
|
1692
|
|
1693 @menu
|
|
1694 * What Are Templates::
|
|
1695 * Syntax Of Templates::
|
|
1696 * Template Customization::
|
|
1697 * Template Commands::
|
|
1698 @end menu
|
|
1699
|
|
1700 @node What Are Templates, Syntax Of Templates, Template Minor Mode, Template Minor Mode
|
|
1701 @comment node-name, next, previous, up
|
|
1702 @section What Are Templates
|
|
1703 @cindex templates
|
|
1704 @findex tmpl-insert-template-file
|
|
1705 @findex tmpl-expand-templates-in-buffer
|
|
1706 @findex tmpl-expand-templates-in-region
|
|
1707
|
|
1708 Templates are special pieces of text, which can be expanded by
|
|
1709 emacs. Expansion means that the template is replaced by something else,
|
|
1710 determined by evaluating lisp forms or emacs commands. The
|
|
1711 expansion can be done automatically after the insertion of templates
|
|
1712 with the command @code{tmpl-insert-template-file} in a buffer or by hand
|
|
1713 with the commands @code{tmpl-expand-templates-in-buffer} or
|
|
1714 @code{tmpl-expand-templates-in-region}.
|
|
1715
|
|
1716 Templates can be put together with normal text in a so called template
|
|
1717 file to provide prototype files. You should name these files with the
|
|
1718 following naming scheme:
|
|
1719
|
|
1720 @example
|
|
1721 @var{<file>}.@var{<type>}.tmpl
|
|
1722 @end example
|
|
1723
|
|
1724 where @var{<file>} is a string which describes for what the template
|
|
1725 could be used and @var{<type>} the normal file extension, e.g. @samp{c}
|
|
1726 for C- files or @samp{html} for HTML- files.
|
|
1727
|
|
1728
|
|
1729 @node Syntax Of Templates, Template Customization, What Are Templates, Template Minor Mode
|
|
1730 @comment node-name, next, previous, up
|
|
1731 @section Syntax Of Templates
|
|
1732 @cindex template syntax
|
|
1733 @vindex tmpl-sign
|
|
1734
|
|
1735 The templates are marked with the sign ^@@, which stands for the null
|
|
1736 character (\000). It can be inserted in a buffer with the keys @kbd{C-q
|
|
1737 C-SPC}. You can also use any other character or string of characters by
|
|
1738 changing the variable @code{tmpl-sign}.
|
|
1739
|
|
1740 At the moment, there are 3 major types of templates:
|
|
1741
|
|
1742 @enumerate
|
|
1743 @item
|
|
1744 @emph{Emacs Lisp function templates}: The expansion of such a template
|
|
1745 evals a lisp form. It is possible to use functions or variables as lisp
|
|
1746 forms. The following is a simple example:
|
|
1747
|
|
1748 @lisp
|
|
1749 ^@@LISP^@@ (insert-file "~/.emacs") ^@@END LISP^@@
|
|
1750 @end lisp
|
|
1751
|
|
1752 inserts the contents of the file @file{~/.emacs} in the current
|
|
1753 buffer during the expansion.
|
|
1754
|
|
1755 @item
|
|
1756 @emph{Emacs command templates}: The expansion of a command template
|
|
1757 evals a template in the same way as an interactive command, which is
|
|
1758 invoked with @kbd{M-x command}. For example:
|
|
1759
|
|
1760 @lisp
|
|
1761 ^@@COMMAND^@@ insert-file ^@@END COMMAND^@@
|
|
1762 @end lisp
|
|
1763
|
|
1764 runs the interactive command @code{insert-file} during the expansion.
|
|
1765
|
|
1766 @item
|
|
1767 @emph{Template comments} Nothing will be evaluated during the expansion
|
|
1768 of a template comment. It is only a comment. For example:
|
|
1769
|
|
1770 @lisp
|
|
1771 ^@@C^@@ This is a comment
|
|
1772 @end lisp
|
|
1773
|
|
1774 The end of the comment is the end of the line. Therefore it has the same
|
|
1775 syntax as a lisp or C++ comment.
|
|
1776 @end enumerate
|
|
1777
|
|
1778 By default, a template will be deleted after its expansion, but
|
|
1779 without the linefeed. Look at the following examples:
|
|
1780
|
|
1781 Before the expansion:
|
|
1782
|
|
1783 @example
|
|
1784 Line before the template
|
|
1785 ^@@C^@@ The Text of a comment template
|
|
1786 Line after the template
|
|
1787 @end example
|
|
1788
|
|
1789 After the expansion:
|
|
1790
|
|
1791 Line before the template
|
|
1792
|
|
1793 Line after the template
|
|
1794
|
|
1795
|
|
1796 Templates can start in any column, and only the template will be deleted
|
|
1797 after its expansion.
|
|
1798
|
|
1799
|
|
1800 It is also possible to put an attribute list in a template. The
|
|
1801 attributes of the list control the deletion of the template. It
|
|
1802 may be that this will be extended in the future with other attributes.
|
|
1803 The attribute list must be specified as an alist (assoc list) in the start
|
|
1804 tag of a template and after its type. Each element of the alist consists
|
|
1805 of the name of the attribute following its value.
|
|
1806 If no attribute list is specified or if an attribute is missing, then the
|
|
1807 default values are used. At the moment there are the following 2 attributes:
|
|
1808
|
|
1809 @enumerate
|
|
1810 @item @emph{don't delete attribute} (@code{DONT_DELETE}): If the value
|
|
1811 is t, then the template will not be deleted after its expansion. If the
|
|
1812 value is nil then the template will be deleted. The default is nil. For
|
|
1813 example:
|
|
1814
|
|
1815 Before the expansion:
|
|
1816
|
|
1817 @example
|
|
1818 Line before the template
|
|
1819 ^@@LISP ((DONT-DELETE t))^@@ (insert-file "~/.cshrc") ^@@END LISP^@@
|
|
1820 Line after the template
|
|
1821 @end example
|
|
1822
|
|
1823 After the expansion:
|
|
1824
|
|
1825 @example
|
|
1826 Line before the template
|
|
1827 ^@@LISP ((DONT-DELETE t))^@@ (insert-file "~/.cshrc") ^@@END LISP^@@
|
|
1828 Line after the template
|
|
1829 @end example
|
|
1830
|
|
1831 It was assumed, that the file @file{~/.cshrc} was empty !
|
|
1832
|
|
1833 @item @emph{delete line attribute} (@code{DELETE-LINE}): If the value is
|
|
1834 t, then the linefeed before or after the template will be deleted. If
|
|
1835 the value is nil then no linefeed will be deleted. The default is
|
|
1836 nil. For example:
|
|
1837
|
|
1838 Before the expansion:
|
|
1839
|
|
1840 @example
|
|
1841 Line before the template
|
|
1842 ^@@LISP ((DELETE-LINE t))^@@ (insert-file "~/.cshrc") ^@@END LISP^@@
|
|
1843 Line after the template
|
|
1844 @end example
|
|
1845
|
|
1846 After the expansion:
|
|
1847
|
|
1848 @example
|
|
1849 Line before the template
|
|
1850 Line after the template
|
|
1851 @end example
|
|
1852
|
|
1853 It was assumed, that the file @file{~/.cshrc} was empty !
|
|
1854 @end enumerate
|
|
1855
|
|
1856 These attributes can be combined. For example:
|
|
1857
|
|
1858 @example
|
|
1859 ^@@COMMAND ((DELETE-LINE t) (DONT-DELETE nil))^@@
|
|
1860 insert-file
|
|
1861 ^@@END COMMAND^@@
|
|
1862 @end example
|
|
1863
|
|
1864 The last examples show also that whitespace (blanks, tabs, linefeeds)
|
|
1865 is allowed at most positions in a template.
|
|
1866
|
|
1867 Look at the file @file{tmpl-minor-mode.el} for a description of the
|
|
1868 commands to expand templates.
|
|
1869
|
|
1870
|
|
1871 @node Template Customization, Template Commands, Syntax Of Templates, Template Minor Mode
|
|
1872 @comment node-name, next, previous, up
|
|
1873 @section Template Customization
|
|
1874 @cindex customization
|
|
1875 @cindex configuration
|
|
1876 @vindex tmpl-template-dir-list
|
|
1877 @vindex tmpl-automatic-expand
|
|
1878 @vindex tmpl-filter-regexp
|
|
1879 @vindex tmpl-sign
|
|
1880 @vindex tmpl-minor-mode-map
|
|
1881
|
|
1882 Templates may be used for all editing modes, not only for
|
|
1883 @code{hm--html-mode}. Therefore their general customization isn't done in
|
|
1884 @file{hm--html-configuration.el}. Template variables are defined in the file
|
|
1885 @file{tmpl-minor-mode.el} instead. You can set them in your
|
|
1886 @file{.emacs} or in one of the other emacs init files (e.g.
|
|
1887 @file{default.el}). The following are the main variables for
|
|
1888 customization.
|
|
1889
|
|
1890 @itemize @bullet
|
|
1891 @item
|
|
1892 @code{tmpl-template-dir-list}: A list of directories with template
|
|
1893 files. If it is nil, the default-directory will be used. If more than
|
|
1894 one directory is specified, then the template filenames should differ
|
|
1895 in all directories.
|
|
1896
|
|
1897 This variable is used in the commands for inserting templates. Look at
|
|
1898 @code{tmpl-insert-template-file-from-fixed-dirs} and at
|
|
1899 @code{tmpl-insert-template-file}. The command
|
|
1900 @code{tmpl-insert-template-file} uses only the car of the list (if it is
|
|
1901 a list.)
|
|
1902 @item
|
|
1903 @code{tmpl-filter-regexp}: This defines a regular expression used for
|
|
1904 filtering out non-template files in template directories. It is used in
|
|
1905 the command @code{tmpl-insert-template-file-from-fixed-dirs} to allow
|
|
1906 only the selection of files which match the regexp. If it is
|
|
1907 nil, then the Filter @code{".*\\.tmpl$"} is used. Set it to
|
|
1908 @code{\".*\"} if you want to disable the filter function or use the
|
|
1909 command @code{tmpl-insert-template-file}.
|
|
1910 @item
|
|
1911 @code{tmpl-automatic-expand}: If you insert a template file with
|
|
1912 @code{tmpl-insert-template-file-from-fixed-dirs} or with
|
|
1913 @code{tmpl-insert-template-file}, this variable is used. The templates
|
|
1914 in the buffer will be automatically expanded if the variable is set to
|
|
1915 t, which is the default.
|
|
1916 @item
|
|
1917 @code{tmpl-sign}: Thisdetermines the sign which marks the beginning and
|
|
1918 the end of template expressions. By default it is set to the null
|
|
1919 character (displayed in emacs as ^@@). You can also set this to a
|
|
1920 string. Be careful if you change it, so that the templates will not be
|
|
1921 mixed up with other non-template text! Note: The expansion function
|
|
1922 looks at the whole template, so that it is very unlikely that the
|
|
1923 function will make a mistake.
|
|
1924 @item
|
|
1925 @code{tmpl-minor-mode-map}: The keymap for the template minor mode.
|
|
1926 @end itemize
|
|
1927
|
|
1928
|
|
1929 @node Template Commands, , Template Customization, Template Minor Mode
|
|
1930 @comment node-name, next, previous, up
|
|
1931 @section Template Commands
|
|
1932 @cindex commands
|
|
1933
|
|
1934 In this section the commands of the template package are described.
|
|
1935
|
|
1936
|
|
1937 @menu
|
|
1938 * Insert Of Template Files::
|
|
1939 * Expansion Of Templates::
|
|
1940 * Escaping Of Template Signs::
|
|
1941 * The Template Minor Mode::
|
|
1942 @end menu
|
|
1943
|
|
1944 @node Insert Of Template Files, Expansion Of Templates, Template Commands, Template Commands
|
|
1945 @comment node-name, next, previous, up
|
|
1946 @subsection Insert Of Template Files
|
|
1947 @cindex template insert
|
|
1948 @cindex template files
|
|
1949 @findex tmpl-insert-template-file-from-fixed-dirs
|
|
1950 @findex tmpl-insert-template-file
|
|
1951
|
|
1952 The template package provides the following two commands for inserting
|
|
1953 template files in an emacs buffer.
|
|
1954
|
|
1955 @itemize @bullet
|
|
1956 @item
|
|
1957 @code{tmpl-insert-template-file}: This command can be used to insert a
|
|
1958 template file in the current buffer. It will expand the templates in the
|
|
1959 buffer if @code{tmpl-automatic-expand} is set to @code{t}. You can set
|
|
1960 a default directory for this command by setting the variable
|
|
1961 @code{tmpl-template-dir-list}. @xref{Template Customization}.
|
|
1962 @item
|
|
1963 @code{tmpl-insert-template-file-from-fixed-dirs}: The difference from
|
|
1964 the simpler command @code{tmpl-insert-template-file} is that this
|
|
1965 command will build a list for filename completion from a list of
|
|
1966 predefined directories (look at @code{tmpl-template-dir-list}). The
|
|
1967 filename completion list will also be filtered with the regular
|
|
1968 expression defined by @code{tmpl-filer-regexp}. @xref{Template
|
|
1969 Customization}. You can set the directory list and/or the filter
|
|
1970 differently in each mode where you use templates, so that you will get
|
|
1971 in the completion list only template files which could be used for the
|
|
1972 current mode.
|
|
1973
|
|
1974 If you want to insert a template file with this command, which is not in
|
|
1975 one of the directories from @code{tmpl-template-dir-list}, then you have
|
|
1976 to enter the string @emph{"Change the directory"} instead of a template
|
|
1977 file. This string is also in the completion list.
|
|
1978 @end itemize
|
|
1979
|
|
1980 Both commands can also be used as functions. In this case the template
|
|
1981 file with is directory path must be given to them as an parameter.
|
|
1982
|
|
1983 You can also use commands like @code{insert-file} to insert template
|
|
1984 files and expand them by hand (@pxref{Expansion Of Templates}).
|
|
1985
|
|
1986
|
|
1987 @node Expansion Of Templates, Escaping Of Template Signs, Insert Of Template Files, Template Commands
|
|
1988 @comment node-name, next, previous, up
|
|
1989 @subsection Expansion Of Templates
|
|
1990 @cindex template expansion
|
|
1991 @cindex expansion
|
|
1992 @findex tmpl-expand-templates-in-region
|
|
1993 @findex tmpl-expand-templates-in-buffer
|
|
1994
|
|
1995 You can expand templates by hand or automatically after their
|
|
1996 insertion. @xref{Insert Of Template Files}, for automatic
|
|
1997 expansion. Expansion by hand can be done with one of the
|
|
1998 following two functions:
|
|
1999
|
|
2000 @itemize @bullet
|
|
2001 @item
|
|
2002 @code{tmpl-expand-templates-in-region}: Expands the templates in the
|
|
2003 region. The region is established by the optional arguments @code{BEGIN}
|
|
2004 and @code{END}. If the arguments are @code{nil}, or if the function is called
|
|
2005 interactively, then the current region will be used.
|
|
2006 @item
|
|
2007 @code{tmpl-expand-templates-in-buffer}: Expands all templates in the
|
|
2008 current buffer.
|
|
2009 @end itemize
|
|
2010
|
|
2011 Both commands are bound to keys in the @code{tmpl-minor-mode}. @xref{The
|
|
2012 Template Minor Mode}.
|
|
2013
|
|
2014
|
|
2015 @node Escaping Of Template Signs, The Template Minor Mode, Expansion Of Templates, Template Commands
|
|
2016 @comment node-name, next, previous, up
|
|
2017 @subsection Escaping Of Template Signs
|
|
2018 @cindex template escaping
|
|
2019 @cindex escaping
|
|
2020 @findex tmpl-escape-tmpl-sign-in-region
|
|
2021 @findex tmpl-escape-tmpl-sign-in-buffer
|
|
2022
|
|
2023 It is possible to escape template signs in a buffer or in a
|
|
2024 region. Templates with escaped template signs are not expanded, but they
|
|
2025 are un-escaped by the expansion functions. Therefore it is possible to
|
|
2026 exclude single templates from the expansion by escaping them. Note:
|
|
2027 You can't escape a template twice. The commands which can be used for
|
|
2028 this are:
|
|
2029
|
|
2030 @itemize @bullet
|
|
2031 @item
|
|
2032 @code{tmpl-escape-tmpl-sign-in-region}: Escapes all @code{tmpl-sign}s
|
|
2033 (@pxref{Template Customization}) with a @code{tmpl-sign} in a
|
|
2034 region. The region is established by the optional arguments @code{BEGIN}
|
|
2035 and @code{END}. If the arguments are @code{nil}, or if the function is
|
|
2036 called interactively, then the current region will be used.
|
|
2037 @item
|
|
2038 @code{tmpl-escape-tmpl-sign-in-buffer}: Same as
|
|
2039 @code{tmpl-escape-tmpl-sign-in-region}, but escapes all templates in the
|
|
2040 whole buffer.
|
|
2041 @end itemize
|
|
2042
|
|
2043 Both commands are bound to keys in @code{tmpl-minor-mode}. @xref{The
|
|
2044 Template Minor Mode}.
|
|
2045
|
|
2046
|
|
2047 @node The Template Minor Mode, , Escaping Of Template Signs, Template Commands
|
|
2048 @comment node-name, next, previous, up
|
|
2049 @subsection The Template Minor Mode
|
|
2050 @cindex template minor mode
|
|
2051 @cindex minor mode
|
|
2052 @cindex key bindings
|
|
2053 @findex tmpl-minor-mode
|
|
2054
|
|
2055 The template minor mode can be toggled with the command
|
|
2056 @code{tmpl-minor-mode}. The purpose of this mode is only to provide
|
|
2057 key bindings for some of the commands of the package
|
|
2058 @file{tmpl-minor-mode}. If you don't want to use the key bindings, you
|
|
2059 don't need this minor mode.
|
|
2060
|
|
2061 Look at the key table @code{tmpl-minor-mode-map} (@pxref{Template
|
|
2062 Customization}) for the definition of the keys.
|
|
2063
|
|
2064 It may be that I'll also provide a pulldown or popup menu for the minor
|
|
2065 mode in a future release.
|
|
2066
|
|
2067
|
153
|
2068 @node Hints For Emacs 19 Users, Bug Reports, Template Minor Mode, Top
|
|
2069 @comment node-name, next, previous, up
|
|
2070 @chapter Hints For Emacs 19 Users
|
|
2071 @cindex Emacs 19
|
|
2072 @cindex missing features in the Emacs 19
|
|
2073 @vindex tmpl-history-variable-name
|
|
2074 @findex file-remote-p
|
|
2075
|
|
2076 This package is tested with the GNU Emacs 19.34. The Emacs 19.34 has had
|
|
2077 not all features of the XEmacs. Therefore also some of the features of
|
|
2078 this package could not be implemeted in the Emacs 19.
|
|
2079
|
|
2080 Please read also the Emacs 19 related file @file{README-EMACS-19}!
|
|
2081
|
|
2082 The following is a list of missing features:
|
|
2083
|
|
2084 @itemize @bullet
|
|
2085 @item
|
|
2086 The capability to start an action from the help buffer. This is only
|
|
2087 possible in the XEmacs, because in the Emacs 19.34 one can't assign
|
|
2088 keymaps to a text region (overlay).
|
|
2089
|
|
2090 @item
|
|
2091 The keybindings of the drag and drop commands are not displayed in
|
|
2092 the menus, because the Emacs 19 isn't able to handle the following
|
|
2093 menu specification: @code{:keys "\\[idd-help-mouse-drag-and-drop]"}.
|
|
2094
|
|
2095 @item
|
|
2096 The function @code{file-remote-p} couldn't be implemeted, because of the
|
|
2097 lack of the function @code{ange-ftp-ftp-p} in the ange-ftp package of
|
|
2098 the Emacs 19.34.
|
|
2099
|
|
2100 @item
|
|
2101 The history variable determined by @code{tmpl-history-variable-name}
|
|
2102 isn't used, because the function @code{read-file-name} doesn't support
|
|
2103 it in the Emacs 19.
|
|
2104 @end itemize
|
|
2105
|
|
2106
|
|
2107 @node Bug Reports, Concept Index, Hints For Emacs 19 Users, Top
|
116
|
2108 @comment node-name, next, previous, up
|
|
2109 @chapter Bug Reports
|
|
2110 @cindex bug report
|
|
2111 @findex hm--html-submit-bug-report
|
|
2112
|
|
2113 There's no software out there without bugs. This package contains
|
|
2114 software, therefore it has bugs. I (Heiko Münkel
|
|
2115 <muenkel@@tnt.uni-hannover.de>) have inserted most of the bugs in this
|
|
2116 package by myself, but I've forgotten where. So please help me out of
|
|
2117 this disaster and send bug reports, if you've found one of these little
|
|
2118 animals. I'll try to do my very best to fix them and to insert new ones.
|
|
2119
|
|
2120 If it's possible, you should use the command
|
|
2121
|
|
2122 @lisp
|
|
2123 M-x hm--html-submit-bug-report
|
|
2124 @end lisp
|
|
2125
|
|
2126 There's also an entry in the pulldown menu for this.
|
|
2127
|
|
2128 In some cases a backtrace would also be appropriate.
|
|
2129
|
|
2130 If you can't send the report with this function, at
|
|
2131 least include the package version and your @code{Emacs}/@code{XEmacs}
|
|
2132 version.
|
|
2133
|
|
2134 In the best of all worlds you would also include a patch to fix the bug.
|
|
2135
|
|
2136 @emph{Note}: It's not true that I've inserted the bugs as a marketing trick,
|
|
2137 so that you must buy the next version to get some of them fixed. This is
|
|
2138 false, because this software is free.
|
|
2139
|
|
2140
|
|
2141 @node Concept Index, Function Index, Bug Reports, Top
|
|
2142 @comment node-name, next, previous, up
|
|
2143 @unnumbered Concept Index
|
|
2144
|
|
2145 @printindex cp
|
|
2146
|
|
2147 @node Function Index, Variable Index, Concept Index, Top
|
|
2148 @comment node-name, next, previous, up
|
|
2149 @unnumbered Function Index
|
|
2150
|
|
2151 @printindex fn
|
|
2152
|
|
2153 @node Variable Index, , Function Index, Top
|
|
2154 @comment node-name, next, previous, up
|
|
2155 @unnumbered Variable Index
|
|
2156
|
|
2157 @printindex vr
|
|
2158
|
|
2159 @summarycontents
|
|
2160 @contents
|
|
2161 @bye
|