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