comparison lisp/hm--html-menus/hm--html-configuration.el @ 98:0d2f883870bc r20-1b1

Import from CVS: tag r20-1b1
author cvs
date Mon, 13 Aug 2007 09:13:56 +0200
parents 131b0175ea99
children 4be1180a9e89
comparison
equal deleted inserted replaced
97:498bf5da1c90 98:0d2f883870bc
1 ;;; hm--html-configuration.el - Configurationfile for the html-mode 1 ;;; hm--html-configuration.el - Configurationfile for the html-mode
2 ;;; 2 ;;;
3 ;;; $Id: hm--html-configuration.el,v 1.1.1.1 1996/12/18 22:43:20 steve Exp $ 3 ;;; $Id: hm--html-configuration.el,v 1.2 1997/02/15 22:21:03 steve Exp $
4 ;;; 4 ;;;
5 ;;; Copyright (C) 1993, 1994, 1995, 1996 Heiko Muenkel 5 ;;; Copyright (C) 1993 - 1997 Heiko Muenkel
6 ;;; email: muenkel@tnt.uni-hannover.de 6 ;;; email: muenkel@tnt.uni-hannover.de
7 ;;; 7 ;;;
8 ;;; This program is free software; you can redistribute it and/or modify 8 ;;; This program is free software; you can redistribute it and/or modify
9 ;;; it under the terms of the GNU General Public License as published by 9 ;;; it under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 2, or (at your option) 10 ;;; the Free Software Foundation; either version 2, or (at your option)
47 "*The location of the users config file. 47 "*The location of the users config file.
48 This variable will only be used, if no environment variable 48 This variable will only be used, if no environment variable
49 \"HTML_USER_CONFIG_FILE\" is set. 49 \"HTML_USER_CONFIG_FILE\" is set.
50 Example value: \"~/.hm--html-configuration.el\".") 50 Example value: \"~/.hm--html-configuration.el\".")
51 51
52 ;;; The site specific config file
53 (defvar hm--html-site-config-file nil
54 "*The location of a site specific config file.
55 This variable will only be used, if no environment variable
56 \"HTML_SITE_CONFIG_FILE\" is set.")
52 57
53 ;;; Chose the initial popup menu 58 ;;; Chose the initial popup menu
54 (defvar hm--html-expert nil 59 (defvar hm--html-expert nil
55 "*t : Use the HTML expert popup menu, 60 "*t : Use the HTML expert popup menu,
56 nil : Use the HTML novice (simple) menu. 61 nil : Use the HTML novice (simple) menu.
307 312
308 313
309 ;;; For the Templates 314 ;;; For the Templates
310 315
311 (defvar hm--html-template-dir "/data/info/www/tnt/guide/templates" 316 (defvar hm--html-template-dir "/data/info/www/tnt/guide/templates"
312 "*A directory with templatefiles") 317 "*A directory with templatefiles.
313 318 It is now also possible to use it as a list of directories.
314 (if (not (file-exists-p hm--html-template-dir)) 319 Look at the variable `tmpl-template-dir-list' for further descriptions.")
320
321 (if (listp hm--html-template-dir)
322 (unless (file-exists-p (car hm--html-template-dir))
323 ;; Use a system directory, if the above one doesn't exist
324 ;; This may only be useful, in the XEmacs >= 19.12
325 (setq hm--html-template-dir (cons (concat data-directory
326 "../lisp/hm--html-menus/")
327 hm--html-template-dir)))
328 (unless (file-exists-p hm--html-template-dir)
315 ;; Use a system directory, if the above one doesn't exist 329 ;; Use a system directory, if the above one doesn't exist
316 ;; This is only useful, in the XEmacs 19.12 330 ;; This may only be useful, in the XEmacs >= 19.12
317 (setq hm--html-template-dir (concat data-directory 331 (setq hm--html-template-dir (concat data-directory
318 "../lisp/hm--html-menus/"))) 332 "../lisp/hm--html-menus/"))))
319 333
320 (defvar hm--html-frame-template-file (concat hm--html-template-dir 334 (defvar hm--html-frame-template-file (concat data-directory
335 "../lisp/hm--html-menus/"
321 "frame.tmpl") 336 "frame.tmpl")
322 "File, which is used as template for a html frame.") 337 "File, which is used as template for a html frame.")
323 338
324 (defvar hm--html-automatic-expand-templates t 339 (defvar hm--html-automatic-expand-templates t
325 "*Automatic expansion of templates. This feature needs the file 340 "*Automatic expansion of templates. This feature needs the file
326 tmpl-minor-mode.el from Heiko Muenkel (muenkel@tnt.uni-hannover.de), 341 tmpl-minor-mode.el from Heiko Muenkel (muenkel@tnt.uni-hannover.de),
327 which is distributed with the package hm--html-menus.") 342 which is distributed with the package hm--html-menus.")
328 343
344 (defvar hm--html-template-filter-regexp ".*\\.html\\.tmpl$"
345 "*Regexp for filtering out non template files in a directory.")
329 346
330 ;;; for deleting the automounter path-prefix 347 ;;; for deleting the automounter path-prefix
331 (defvar hm--html-delete-wrong-path-prefix '("/tmp_mnt" "/phys/[^/]+") 348 (defvar hm--html-delete-wrong-path-prefix '("/tmp_mnt" "/phys/[^/]+")
332 "If non nil, it specifies path-prefixes, which should be deleted in pathes. 349 "If non nil, it specifies path-prefixes, which should be deleted in pathes.
333 The Sun automounter adds a temporary prefix to the automounted directories 350 The Sun automounter adds a temporary prefix to the automounted directories
369 "If t, then the hm--html-idd-* functions are creating relative links. 386 "If t, then the hm--html-idd-* functions are creating relative links.
370 Otherwise absolute links are used. The idd functions are used for 387 Otherwise absolute links are used. The idd functions are used for
371 drag and drop.") 388 drag and drop.")
372 389
373 (defvar hm--html-idd-actions 390 (defvar hm--html-idd-actions
374 '((nil (((idd-major-mode-p . dired-mode) 391 '((nil (((idd-if-major-mode-p . dired-mode)
375 (idd-dired-file-on-line-p . ".*\\.\\(gif\\)\\|\\(jpq\\)")) 392 (idd-if-dired-file-on-line-p . ".*\\.\\(gif\\)\\|\\(jpg\\)"))
376 hm--html-idd-add-include-image-from-dired-line) 393 hm--html-idd-add-include-image-from-dired-line)
377 (((idd-major-mode-p . dired-mode) 394 (((idd-if-major-mode-p . dired-mode)
378 (idd-dired-no-file-on-line-p . nil)) 395 (idd-if-dired-no-file-on-line-p . nil))
379 hm--html-idd-add-file-link-to-file-on-dired-line) 396 hm--html-idd-add-file-link-to-file-on-dired-line)
380 (((idd-major-mode-p . dired-mode) 397 (((idd-if-major-mode-p . dired-mode)
381 (idd-dired-no-file-on-line-p . t)) 398 (idd-if-dired-no-file-on-line-p . t))
382 hm--html-idd-add-file-link-to-directory-of-buffer) 399 hm--html-idd-add-file-link-to-directory-of-buffer)
383 (((idd-major-mode-p . w3-mode) 400 (((idd-if-major-mode-p . w3-mode)
384 (idd-url-at-point-p . t)) 401 (idd-if-url-at-point-p . t))
385 hm--html-idd-add-html-link-from-w3-buffer-point) 402 hm--html-idd-add-html-link-from-w3-buffer-point)
386 (((idd-major-mode-p . w3-mode)) 403 (((idd-if-major-mode-p . w3-mode))
387 hm--html-idd-add-html-link-to-w3-buffer) 404 hm--html-idd-add-html-link-to-w3-buffer)
388 (((idd-local-file-p . t)) 405 (((idd-if-local-file-p . t))
389 hm--html-idd-add-file-link-to-buffer))) 406 hm--html-idd-add-file-link-to-buffer)))
390 "The action list for the source mode `hm--html-mode'. 407 "The action list for the destination mode `hm--html-mode'.
391 Look at the description of the variable idd-actions") 408 Look at the description of the variable idd-actions")
392 409
393 410
394 ;;; The font lock keywords 411 ;;; The font lock keywords
395 412
396 (defvar hm--html-font-lock-keywords 413 (defconst hm--html-font-lock-keywords-1
397 (list 414 (list
398 '("\\(<!--.*-->\\)\\|\\(<[^>]*>\\)+" . font-lock-comment-face) 415 '("<!--.*-->" . font-lock-comment-face)
399 '("[Hh][Rr][Ee][Ff]=\"\\([^\"]*\\)\"" 1 font-lock-string-face t) 416 '("<[^>]*>" . font-lock-keyword-face)
400 '("[Ss][Rr][Cc]=\"\\([^\"]*\\)\"" 1 font-lock-string-face t)) 417 '("<[^>=]*href[ \t\n]*=[ \t\n]*\"\\([^\"]*\\)\"" 1 font-lock-string-face t)
418 '("<[^>=]src[ \t\n]*=[ \t\n]*\"\\([^\"]*\\)\"" 1 font-lock-string-face t))
419 "Subdued level highlighting for hm--html-mode.")
420
421 (defconst hm--html-font-lock-keywords-2
422 (append hm--html-font-lock-keywords-1
423 (list
424 '(">\\([^<]*\\)</a>" 1 font-lock-reference-face)
425 '("</b>\\([^<]*\\)</b>" 1 bold)
426 '("</i>\\([^<]*\\)</i>" 1 italic)
427 ))
428 "Gaudy level highlighting for hm--html-mode.")
429
430 (defvar hm--html-font-lock-keywords hm--html-font-lock-keywords-1
401 "Default expressions to highlight in the hm--html-mode.") 431 "Default expressions to highlight in the hm--html-mode.")
432
402 433
403 434
404 ;;; The Prefix- Key for the keytables 435 ;;; The Prefix- Key for the keytables
405 (defvar hm--html-minor-mode-prefix-key "\C-z" 436 (defvar hm--html-minor-mode-prefix-key "\C-z"
406 "The prefix key for the keytables in the `hm--html-minor-mode'.") 437 "The prefix key for the keytables in the `hm--html-minor-mode'.")
438 SunOS 4.1.x : (setq html-sigusr1-signal-value 30) 469 SunOS 4.1.x : (setq html-sigusr1-signal-value 30)
439 SunOS 5.x : (setq html-sigusr1-signal-value 16) 470 SunOS 5.x : (setq html-sigusr1-signal-value 16)
440 Linux : (setq html-sigusr1-signal-value 10))") 471 Linux : (setq html-sigusr1-signal-value 10))")
441 472
442 473
474 ;;; indentation
475
476 (defvar hm--html-disable-indentation nil
477 "*Set this to t, if you want to disable the indentation in the hm--html-mode.
478 And may be send me (muenkel@tnt.uni-hannover.de) a note, why you've
479 done this.")
480
481 (defvar hm--html-inter-tag-indent 2
482 "*The indentation after a start tag.")
483
484 (defvar hm--html-comment-indent 5
485 "*The indentation of a comment.")
486
487 (defvar hm--html-intra-tag-indent 2
488 "*The indentation after the start of a tag.")
489
490 (defvar hm--html-tag-name-alist
491 '(("!--" (:hm--html-one-element-tag t))
492 )
493 "An alist with tag names known by the `hm--html-mode'.
494 CURRENTLY THIS LIST CONTAINS NOT ALL TAGS!!!!.
495
496 It is used to determine, if a tag is a one element tag or not.
497
498 In the future it should also be used to get possible parameters of
499 the tag.")
500
501
443 ;;; Announce the feature hm--html-configuration 502 ;;; Announce the feature hm--html-configuration
444 (provide 'hm--html-configuration) 503 (provide 'hm--html-configuration)
445 504