comparison lisp/hm--html-menus/hm--html-configuration.el @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children ac2d302a0011
comparison
equal deleted inserted replaced
-1:000000000000 0:376386a54a3c
1 ;;; hm--html-configuration.el - Configurationfile for the html-mode
2 ;;; v3.6; 17 Sep 1995
3 ;;; Copyright (C) 1993, 1994, 1995 Heiko Muenkel
4 ;;; email: muenkel@tnt.uni-hannover.de
5 ;;;
6 ;;; This program is free software; you can redistribute it and/or modify
7 ;;; it under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 2, or (at your option)
9 ;;; any later version.
10 ;;;
11 ;;; This program is distributed in the hope that it will be useful,
12 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with this program; if not, write to the Free Software
18 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 ;;;
20 ;;;
21 ;;; Description:
22 ;;;
23 ;;; This file is for the configuration of the html mode.
24 ;;;
25 ;;; Installation:
26 ;;;
27 ;;; Put this file in one of your lisp load path directories or
28 ;;; set the environment variable HTML_CONFIG_FILE to this file.
29 ;;; For example:
30 ;;; setenv HTML_CONFIG_FILE "~/data/hm--htm-environment.el"
31 ;;; if you have put this file in the directory "~/data/"
32 ;;;
33
34
35 (provide 'hm--html-configuration)
36 (require 'adapt)
37
38
39 ;; The User config file (an proposal of Manoj Srivastava)
40 (defvar hm--html-user-config-file nil
41 "*The location of the users config file.
42 This variable will only be used, if no environment variable
43 \"HTML_USER_CONFIG_FILE\" is set.
44 Example value: \"~/.hm--html-configuration.el\".")
45
46
47 ;; Chose the initial popup menu
48
49
50 (defvar hm--html-expert nil
51 "*t : Use the HTML expert popup menu,
52 nil : Use the HTML novice (simple) menu.
53 The variable 'hm--html-marc must be nil. If 'hm--html-marc is
54 not nil, this variable has no effect.")
55
56
57 (defvar hm--html-marc nil
58 "*t : Use the HTML popup menu from Marc Andreessen.")
59
60
61 ;;; Your Signature
62
63 (defvar hm--html-signature-file nil
64 "*Your Signature file.
65 For example: \"http://www.tnt.uni-hannover.de:80/data/info/www/tnt/info/tnt/whois/muenkel.html\".")
66
67
68 (defvar hm--html-username nil
69 "*Your Name for the signature. For example: \"Heiko Münkel\".")
70
71
72 ;;; Your favorite server (eg: the name of the host of your own http server)
73 ;;; This is used in some other variables
74
75 (defvar hm--html-favorite-http-server-host-name "www.tnt.uni-hannover.de"
76 "*The name of your favorite http server host. It must be specified !")
77
78
79 ;;; For links to Info Gateways
80
81 (defvar hm--html-info-hostname:port-alist nil
82 "*Alist with hostnames and ports for the Info gateway.")
83
84 (setq hm--html-info-hostname:port-alist '(("www.tnt.uni-hannover.de:8005")))
85
86 (defvar hm--html-info-hostname:port-default nil
87 "*Default hostname with port for the Info gateway.")
88
89 (setq hm--html-info-hostname:port-default "www.tnt.uni-hannover.de:8005")
90
91 (defvar hm--html-info-path-alist nil
92 "*Alist with directories for the Info gateway.")
93
94 (setq hm--html-info-path-alist '((1 . "/appl/lemacs/Global/emacs/info")
95 (2 . "/appl/emacs/info")
96 (3 . "/appl/gnu/Global/info")
97 (4 . "/appl/emacs-19/Global/info")
98 (5 . "/")))
99
100
101 ;;; For links to WAIS Gateways
102
103 (defvar hm--html-wais-hostname:port-alist nil
104 "*Alist with hostnames and ports for the WAIS gateway.")
105
106 (setq hm--html-wais-hostname:port-alist '(("www.tnt.uni-hannover.de:8001")
107 ("info.cern.ch:8001")))
108
109 (defvar hm--html-wais-hostname:port-default nil
110 "*Default hostname with port for the WAIS gateway.")
111
112 (setq hm--html-wais-hostname:port-default "www.tnt.uni-hannover.de:8001")
113
114 (defvar hm--html-wais-servername:port-alist nil
115 "*Alist with servernames and ports for the WAIS gateway.")
116
117 (setq hm--html-wais-servername:port-alist
118 '(("wais.tnt.uni-hannover.de:210")
119 ("daedalus.tnt.uni-hannover.de:21408")
120 ("ikarus.tnt.uni-hannover.de:21401")))
121
122 (defvar hm--html-wais-servername:port-default nil
123 "*Default servername with port for the WAIS gateway.")
124
125 (setq hm--html-wais-servername:port-default "www.tnt.uni-hannover.de:210")
126
127 (defvar hm--html-wais-path-alist nil
128 "*Alist with directories for the wais gateway.")
129
130 (setq hm--html-wais-path-alist nil)
131
132
133 ;;; For links to HTML servers
134
135 (defvar hm--html-html-hostname:port-alist nil
136 "*Alist with hostnames and ports for the HTML server.")
137
138 (setq hm--html-html-hostname:port-alist '(("www.tnt.uni-hannover.de:80")
139 ("vxcrna.cern.ch:80")
140 ("www.ncsa.uiuc.edu:80")))
141
142 (defvar hm--html-html-hostname:port-default nil
143 "*Default hostname with port for the HTML server.")
144
145 (setq hm--html-html-hostname:port-default "www.tnt.uni-hannover.de:80")
146
147 (defvar hm--html-html-path-alist nil
148 "*Alist with directories for the HTML server.")
149
150 (setq hm--html-html-path-alist '((1 . "/data/info/www/tnt/")
151 (2 . "/data/info/www/")
152 (3 . "/data/info/")
153 (4 . "/data/")
154 (5 . "/appl/")
155 (6 . "/project/")
156 (7 . "~/")
157 (8 . "/")))
158
159
160
161 ;;; For links to file gateways
162
163 (defvar hm--html-file-path-alist nil
164 "*Alist with directories for the file gateway.")
165
166 (setq hm--html-file-path-alist '((1 . "/data/info/www/tnt/")
167 (2 . "/data/info/www/")
168 (3 . "/data/info/")
169 (4 . "/data/")
170 (5 . "/appl/")
171 (6 . "/project/")
172 (7 . "~/")
173 (8 . "/")))
174
175
176 ;;; For links to ftp servers
177
178 (defvar hm--html-ftp-hostname:port-alist nil
179 "*Alist with hostnames and ports for the ftp server.")
180
181 (setq hm--html-ftp-hostname:port-alist '(("ftp.tnt.uni-hannover.de")
182 ("ftp.rrzn.uni-hannover.de")
183 ("wega.informatik.uni-hannover.de")
184 ("rusmv1.rus.uni-stuttgart.de")
185 ("export.lcs.mit.edu")
186 ))
187
188 (defvar hm--html-ftp-hostname:port-default nil
189 "*Default hostname with port for the ftp server.")
190
191 (setq hm--html-ftp-hostname:port-default "ftp.rrzn.uni-hannover.de")
192
193 (defvar hm--html-ftp-path-alist nil
194 "*Alist with directories for the ftp server.")
195
196 (setq hm--html-ftp-path-alist '((1 . "/pub")
197 (2 . "/pub/gnu")
198 (3 . "/pub/linux")
199 (4 . "/pub/unix")
200 (5 . "/incoming")
201 (6 . "/")))
202
203
204 ;;; For links to gopher servers
205
206 (defvar hm--html-gopher-hostname:port-alist nil
207 "*Alist with hostnames and ports for the gopher server.")
208
209 (setq hm--html-gopher-hostname:port-alist
210 '(("newsserver.rrzn.uni-hannover.de:70")
211 ("solaris.rz.tu-clausthal.de:70")
212 ("veronica.scs.unr.edu:70")
213 ("pinus.slu.se:70")
214 ("sunic.sunet.se:70")
215 ))
216
217 (defvar hm--html-gopher-doctype-alist nil
218 "*Alist with doctype strings for the gopher server.")
219
220 (setq hm--html-gopher-doctype-alist
221 '(("/1")
222 ("/11")
223 ("/00")))
224
225 (defvar hm--html-gopher-doctype-default nil
226 "*Default doctype string for the gopher server.")
227
228 (setq hm--html-gopher-doctype-default "/1")
229
230 (defvar hm--html-gopher-hostname:port-default nil
231 "*Default hostname with port for the gopher server.")
232
233 (setq hm--html-gopher-hostname:port-default
234 "newsserver.rrzn.uni-hannover.de:70")
235
236 (defvar hm--html-gopher-anchor-alist nil
237 "*Alist with directories for the gopher server.")
238
239 (setq hm--html-gopher-anchor-alist
240 '(("veronica")
241 ("Wide%20Area%20Information%20Services%20databases")
242 ("Subject%20Tree")))
243
244
245 ;;; For the links to the Program Gateway
246
247 (defvar hm--html-proggate-hostname:port-alist nil
248 "*Alist with hostnames and ports for the proggate server.")
249
250 (setq hm--html-proggate-hostname:port-alist '(("www.tnt.uni-hannover.de:8007")
251 ))
252
253 (defvar hm--html-proggate-hostname:port-default nil
254 "*Default hostname with port for the proggate server.")
255
256 (setq hm--html-proggate-hostname:port-default "www.tnt.uni-hannover.de:8007")
257
258
259 (defvar hm--html-proggate-allowed-file nil
260 "*The filename (with path) of the proggate allowed file.")
261
262
263 (setq hm--html-proggate-allowed-file "/appl/www/bin/proggate.allowed")
264
265
266 ;;; For links to the Local Program Gatewy
267
268 (defvar hm--html-local-proggate-path-alist nil
269 "*Alist with directories for the local program gateway.")
270
271
272 (setq hm--html-local-proggate-path-alist '((1 . "/bin/")
273 (2 . "/usr/bin/")
274 (3 . "/usr/local/bin/")
275 (4 . "/appl/util/bin/")
276 (5 . "/appl/gnu/Global/bin/")
277 (6 . "/")
278 (7 . "/appl/")
279 (8 . "~/appl/Global/bin/")
280 (9 . "~/")))
281
282
283 ;;; For links to the mail gateway
284
285 (defvar hm--html-mail-hostname:port-alist nil
286 "*Alist with hostnames and ports for the mail gateway.")
287
288 (setq hm--html-mail-hostname:port-alist '(("www.tnt.uni-hannover.de:8003")
289 ))
290
291 (defvar hm--html-mail-hostname:port-default nil
292 "*Default hostname with port for the mail gateway.")
293
294 (setq hm--html-mail-hostname:port-default "www.tnt.uni-hannover.de:8003")
295
296 (defvar hm--html-mail-path-alist nil
297 "*Alist with directories for the mail gateway.")
298
299 (setq hm--html-mail-path-alist '((1 . "~/data/docs/mail")
300 (2 . "~/data/docs/news")
301 (3 . "~/docs/mail")
302 (4 . "~/docs/news")
303 (5 . "~/mail")
304 (6 . "~/news")
305 (7 . "~/")
306 (8 . "/data/info/mail")
307 (9 . "/data/info/news")
308 (10 . "/")))
309
310 ;;; For mailto links
311
312 (defvar hm--html-mailto-alist nil
313 "*Alist with mail adresses for the mailto alist.
314 The value of `user-mail-address' will also be added by the package to
315 this alist.")
316
317 (setq hm--html-mailto-alist '(("muenkel@tnt.uni-hannover.de")))
318
319
320 ;;; For the server side include directive
321
322 (defvar hm--html-server-side-include-command-alist nil
323 "*Alist with commands for the server side include directive.
324 These commands needs no parameter.")
325
326 (setq hm--html-server-side-include-command-alist
327 '(("/bin/date")
328 ("/usr/bin/finger")
329 ("/bin/df")))
330
331 (defvar hm--html-server-side-include-command-with-parameter-alist nil
332 "*Alist with commands for the server side include directive.
333 These commands needs parameters.")
334
335 (setq hm--html-server-side-include-command-with-parameter-alist
336 '(("/usr/bin/man")
337 ("/usr/bin/finger")
338 ("/usr/bin/ls")
339 ("/bin/cat")))
340
341
342 ;;; Alist with URL'S for FORMS and IMAGE tags
343
344 (defvar hm--html-url-alist nil
345 "*Alist with URL's for FORMS and IMAGE tags.
346 The cdr of each list contains symbols, which specifys the use of the
347 URL.")
348
349 (setq hm--html-url-alist (list
350 '("http://hoohoo.ncsa.uiuc.edu/htbin-post/post-query"
351 POST)
352 '("http://hoohoo.ncsa.uiuc.edu/htbin/query"
353 GET)
354 (list
355 (concat "http://"
356 hm--html-favorite-http-server-host-name
357 "/")
358 'IMAGE)))
359
360
361 ;;; For the marking of examples in the help buffer
362
363 (defvar hm--html-help-foreground "red"
364 "The foreground color to highlight examples.")
365
366 (defvar hm--html-help-background nil
367 "The background color to highlight examples.")
368
369 (defvar hm--html-help-font (face-font 'bold)
370 "The font to highlight examples.")
371
372
373 ;(if (not (face-foreground 'hm--html-help-face))
374 ; (set-face-foreground 'hm--html-help-face "red"))
375
376
377 ;;; For the Templates
378
379
380 (defvar hm--html-template-dir nil
381 "*A directory with templatefiles")
382
383
384 (setq hm--html-template-dir "/data/info/www/tnt/guide/templates/")
385
386 (if (not (file-exists-p hm--html-template-dir))
387 ;; Use a system directory, if the above one doesn't exist
388 ;; This is only useful, in the XEmacs 19.12
389 (setq hm--html-template-dir (concat data-directory
390 "../lisp/hm--html-menus/")))
391
392
393 (defvar hm--html-frame-template-file nil
394 "File, which is used as template for a html frame.")
395
396 (setq hm--html-frame-template-file (concat hm--html-template-dir
397 "frame.tmpl"))
398
399
400 (defvar hm--html-automatic-expand-templates nil
401 "*Automatic expansion of templates. This feature needs the file
402 tmpl-minor-mode.el from Heiko Muenkel (muenkel@tnt.uni-hannover.de),
403 which is distributed with the package hm--html-menus.")
404
405
406 (setq hm--html-automatic-expand-templates t)
407
408
409 ;;; For font lock mode
410 ;(defvar hm--html-font-lock-color
411 ; (if (facep 'font-lock-comment-face)
412 ; (face-foreground 'font-lock-comment-face))
413 ; "*The color for the html font lock.")
414
415
416 ;(setq hm--html-font-lock-color "grey80")
417
418
419 ;;; for deleting the automounter path-prefix
420 (defvar hm--html-delete-wrong-path-prefix nil
421 "If non nil, it specifies path-prefixes, which should be deleted in pathes.
422 The Sun automounter adds a temporary prefix to the automounted directories
423 (At our site the prefix is /tmp_mnt). But you can't select such a path, if
424 the automounter has currently not mounted the directory and so you can't
425 follow a html-link, which consists of such a path. To overcome this behaviour,
426 you can set this variable to the prefix (eg. \"/tmp_mnt\"). After that, the
427 prefix should be stripped from the pathes during the creation of the links.
428 ATTENTION: This variable is used as regular expression !
429 It can be set to a string or to a list of strings.")
430
431 (setq hm--html-delete-wrong-path-prefix '("/tmp_mnt" "/phys/[^/]+"))
432
433
434 ;;; For insertation of created and changed comments and automatic
435 ;;; date update in the title line
436
437 (defvar hm--html-automatic-new-date t
438 "*t => The date in the title line will be updated before filesaving.
439 nil => No automatic update of the date.")
440
441 (defvar hm--html-automatic-changed-comment t
442 "*t => A \"changed comment\" line will be added before filesaving.
443 nil => No automatic insertation of a \"changed comment\" line.")
444
445 (defvar hm--html-automatic-created-comment t
446 "*t => A \"created comment\" line will be added.
447 nil => No automatic insertation of a \"created comment\" line.")
448
449
450
451 ;;; For the file html-mode.el
452
453 (setq html-document-previewer "/appl/www/bin/mosaic")
454
455
456 ;;; For the file html-view.el
457
458 (setq html-view-mosaic-command "/appl/www/bin/mosaic")
459
460
461 ;;; For the files html-mode.el and html-view.el
462
463 ;; Value for the SIGUSR1 signal on your system. See, usually,
464 ;; /usr/include/sys/signal.h.
465 ;; SunOS 4.1.x : (setq html-sigusr1-signal-value 30)
466 ;; Linux : (setq html-sigusr1-signal-value 10)
467 (setq html-sigusr1-signal-value 30)
468
469
470 ;;; Keybindings:
471
472 (defvar hm--html-bind-latin-1-char-entities t
473 "Set this to nil, if you don't want to use the ISO Latin 1 charcter entities.
474 This is only useful, if `hm--html-use-old-keymap' is set to nil. It is only
475 used during loading the html package the first time.")
476
477 (defvar hm--html-use-old-keymap nil
478 "Set this to t, if you want to use the old keymap from Marc.
479 This variable and the choice to use the old map will be deleted
480 in the future.")
481
482 (if (not hm--html-use-old-keymap)
483 ;; The new map
484 (require 'hm--html-keys)
485
486 ;; Additional bindings to the old map
487
488 ;;; Keytable html-mode-map (see also the file html-mode.el)
489
490 (define-key html-mode-map "\C-cr" 'hm--html-add-link-target)
491 (define-key html-mode-map "\C-ch" 'hm--html-add-header)
492 (define-key html-mode-map "\C-ct" 'hm--html-add-title)
493 (define-key html-mode-map "\C-cn" 'hm--html-add-numberlist)
494 (define-key html-mode-map "\C-c\C-p" 'hm--html-add-preformated)
495 (define-key html-mode-map "\C-c\C-b" 'hm--html-add-bold)
496 (define-key html-mode-map "\C-c\C-i" 'hm--html-add-italic)
497 (define-key html-mode-map "\C-c\M-h" 'hm--html-add-html-link)
498 (define-key html-mode-map "\C-c\M-i" 'hm--html-add-info-link)
499 (define-key html-mode-map "\C-c\M-g" 'hm--html-add-gopher-link)
500 (define-key html-mode-map "\C-c\M-f" 'hm--html-add-file-link)
501 (define-key html-mode-map "\C-c\M-n" 'hm--html-add-news-link)
502 (define-key html-mode-map "\C-c\M-m" 'hm--html-add-mail-link)
503 ;(define-key html-mode-map "\C-c\M-w" 'hm--html-add-wais-link)
504 (define-key html-mode-map "\C-c\M-w" 'hm--html-add-direct-wais-link)
505 (define-key html-mode-map "\C-c\M-t" 'hm--html-add-ftp-link)
506 (if (adapt-xemacsp)
507 (define-key html-mode-map '(button3) 'hm--popup-html-menu)
508 (define-key html-mode-map [mouse-3] 'hm--popup-html-menu)
509 ;;(define-key html-mode-map [S-mouse-3] 'hm--popup-html-menu)
510 ;;(define-key html-mode-map [C-mouse-3] 'hm--popup-html-menu-region)
511 )
512
513 ;;; Keytable html-region-mode-map (for the minor mode region-mode-map
514 ;;; This minor mode is active, if a region is active
515
516 (if html-region-mode-map
517 ()
518 (setq html-region-mode-map (make-sparse-keymap))
519 (define-key html-region-mode-map "\t" 'tab-to-tab-stop)
520 (define-key html-region-mode-map "\C-ca" 'hm--html-add-address-to-region)
521 (define-key html-region-mode-map "\C-cb" 'hm--html-add-blockquote-to-region)
522 (define-key html-region-mode-map "\C-cc" 'hm--html-add-code-to-region)
523 (define-key html-region-mode-map "\C-cd"
524 'hm--html-add-description-list-to-region)
525 (define-key html-region-mode-map "\C-ch" 'hm--html-add-header-to-region)
526 (define-key html-region-mode-map "\C-cl" 'html-add-normal-link-to-region)
527 (define-key html-region-mode-map "\C-cm" 'hm--html-add-menu-to-region)
528 (define-key html-region-mode-map "\C-cn" 'hm--html-add-numberlist-to-region)
529 (define-key html-region-mode-map "\C-cr" 'html-add-reference-to-region)
530 (define-key html-region-mode-map "\C-cs" 'hm--html-add-list-to-region)
531 (define-key html-region-mode-map "\C-ct" 'hm--html-add-title-to-region)
532 (define-key html-region-mode-map "\C-cx" 'hm--html-add-plaintext-to-region)
533 (define-key html-region-mode-map "\C-c\C-b" 'hm--html-add-bold-to-region)
534 (define-key html-region-mode-map "\C-c\C-c" 'hm--html-add-citation-to-region)
535 (define-key html-region-mode-map "\C-c\C-e"
536 'hm--html-add-emphasized-to-region)
537 (define-key html-region-mode-map "\C-c\C-f" 'hm--html-add-fixed-to-region)
538 (define-key html-region-mode-map "\C-c\C-i" 'hm--html-add-italic-to-region)
539 (define-key html-region-mode-map "\C-c\C-k" 'hm--html-add-keyboard-to-region)
540 (define-key html-region-mode-map "\C-c\C-l" 'hm--html-add-listing-to-region)
541 (define-key html-region-mode-map "\C-c\C-m" 'hm--html-add-sample-to-region)
542 (define-key html-region-mode-map "\C-c\C-p"
543 'hm--html-add-preformated-to-region)
544 (define-key html-region-mode-map "\C-c\C-s" 'hm--html-add-strong-to-region)
545 (define-key html-region-mode-map "\C-c\C-v" 'hm--html-add-variable-to-region)
546 (define-key html-region-mode-map "<" 'html-less-than)
547 (define-key html-region-mode-map ">" 'html-greater-than)
548 (define-key html-region-mode-map "&" 'html-ampersand)
549 (define-key html-region-mode-map "\C-c\C-rl" 'html-add-normal-link-to-region)
550 (define-key html-region-mode-map "\C-c\C-rr" 'html-add-reference-to-region)
551 (define-key html-region-mode-map "\C-c\M-h"
552 'hm--html-add-html-link-to-region)
553 (define-key html-region-mode-map "\C-c\M-i"
554 'hm--html-add-info-link-to-region)
555 (define-key html-region-mode-map "\C-c\M-g"
556 'hm--html-add-gopher-link-to-region)
557 (define-key html-region-mode-map "\C-c\M-f"
558 'hm--html-add-file-link-to-region)
559 (define-key html-region-mode-map "\C-c\M-n"
560 'hm--html-add-news-link-to-region)
561 (define-key html-region-mode-map "\C-c\M-m"
562 'hm--html-add-mail-link-to-region)
563 ; (define-key html-region-mode-map "\C-c\M-w"
564 ; 'hm--html-add-wais-link-to-region)
565 (define-key html-region-mode-map "\C-c\M-w"
566 'hm--html-add-direct-wais-link-to-region)
567 (define-key html-region-mode-map "\C-c\M-t"
568 'hm--html-add-ftp-link-to-region)
569 (if (adapt-xemacsp)
570 (define-key html-region-mode-map '(button3) 'hm--popup-html-menu-region)
571 (define-key html-region-mode-map [mouse-3] 'hm--popup-html-menu-region))
572 )
573
574 )
575