comparison lisp/hm--html-menus/hm--html-mode.el @ 22:8fc7fe29b841 r19-15b94

Import from CVS: tag r19-15b94
author cvs
date Mon, 13 Aug 2007 08:50:29 +0200
parents ac2d302a0011
children 4103f0995bd7
comparison
equal deleted inserted replaced
21:b88636d63495 22:8fc7fe29b841
1 ;;; hm--html-mode --- Major mode for editing HTML documents for the WWW 1 ;;; hm--html-mode --- Major mode for editing HTML documents for the WWW
2 ;;; 2 ;;;
3 ;;; Keywords: hypermedia languages help docs wp 3 ;;; Keywords: hypermedia languages help docs wp
4 ;;; 4 ;;;
5 ;;; $Id: hm--html-mode.el,v 1.1.1.1 1996/12/18 03:46:48 steve Exp $ 5 ;;; $Id: hm--html-mode.el,v 1.2 1997/02/16 01:29:10 steve Exp $
6 ;;; 6 ;;;
7 ;;; Copyright (C) 1996 Heiko Muenkel 7 ;;; Copyright (C) 1996, 1997 Heiko Muenkel
8 ;;; email: muenkel@tnt.uni-hannover.de 8 ;;; email: muenkel@tnt.uni-hannover.de
9 ;;; 9 ;;;
10 ;;; This program is free software; you can redistribute it and/or modify 10 ;;; This program is free software; you can redistribute it and/or modify
11 ;;; it under the terms of the GNU General Public License as published by 11 ;;; it under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 1, or (at your option) 12 ;;; the Free Software Foundation; either version 2, or (at your option)
13 ;;; any later version. 13 ;;; any later version.
14 ;;; 14 ;;;
15 ;;; This program is distributed in the hope that it will be useful, 15 ;;; This program is distributed in the hope that it will be useful,
16 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
62 (require 'font-lock) 62 (require 'font-lock)
63 (require 'adapt) 63 (require 'adapt)
64 (require 'hm--date) 64 (require 'hm--date)
65 (require 'hm--html) 65 (require 'hm--html)
66 (hm--html-load-config-files) 66 (hm--html-load-config-files)
67 (require 'hm--html-indentation)
67 (require 'hm--html-menu) 68 (require 'hm--html-menu)
68 (require 'hm--html-drag-and-drop) 69 (require 'hm--html-drag-and-drop)
69 ;(hm--html-load-config-files) ; Load the system and user configuration files 70 ;(hm--html-load-config-files) ; Load the system and user configuration files
70 (require 'hm--html-keys) 71 (require 'hm--html-keys)
71 72
73 ;;; The package version 74 ;;; The package version
74 (defconst hm--html-menus-package-maintainer "muenkel@tnt.uni-hannover.de") 75 (defconst hm--html-menus-package-maintainer "muenkel@tnt.uni-hannover.de")
75 76
76 (defconst hm--html-menus-package-name "hm--html-menus") 77 (defconst hm--html-menus-package-name "hm--html-menus")
77 78
78 (defconst hm--html-menus-package-version "5.0") 79 (defconst hm--html-menus-package-version "5.1")
79 80
80 81
81 ;;; Generate the help buffer faces 82 ;;; Generate the help buffer faces
82 (hm--html-generate-help-buffer-faces) 83 (hm--html-generate-help-buffer-faces)
83 84
87 "Syntax table used while in html mode.") 88 "Syntax table used while in html mode.")
88 89
89 (if hm--html-mode-syntax-table 90 (if hm--html-mode-syntax-table
90 () 91 ()
91 (setq hm--html-mode-syntax-table (make-syntax-table)) 92 (setq hm--html-mode-syntax-table (make-syntax-table))
92 (modify-syntax-entry ?\" ". " hm--html-mode-syntax-table) 93 ; (modify-syntax-entry ?\" ". " hm--html-mode-syntax-table)
93 (modify-syntax-entry ?\\ ". " hm--html-mode-syntax-table) 94 ; (modify-syntax-entry ?\\ ". " hm--html-mode-syntax-table)
94 (modify-syntax-entry ?' "w " hm--html-mode-syntax-table)) 95 ; (modify-syntax-entry ?' "w " hm--html-mode-syntax-table)
96 (modify-syntax-entry ?\\ "." hm--html-mode-syntax-table)
97 (modify-syntax-entry ?' "w" hm--html-mode-syntax-table)
98 (modify-syntax-entry ?< "(>" hm--html-mode-syntax-table)
99 (modify-syntax-entry ?> ")<" hm--html-mode-syntax-table)
100 (modify-syntax-entry ?\" "\"" hm--html-mode-syntax-table)
101 (modify-syntax-entry ?= "." hm--html-mode-syntax-table))
95 102
96 103
97 ;;; abbreviation table 104 ;;; abbreviation table
98 105
99 (defvar hm--html-mode-abbrev-table nil 106 (defvar hm--html-mode-abbrev-table nil
117 (use-local-map hm--html-mode-map) 124 (use-local-map hm--html-mode-map)
118 (setq mode-name hm--html-mode-name-string) 125 (setq mode-name hm--html-mode-name-string)
119 (setq major-mode 'hm--html-mode) 126 (setq major-mode 'hm--html-mode)
120 (setq local-abbrev-table hm--html-mode-abbrev-table) 127 (setq local-abbrev-table hm--html-mode-abbrev-table)
121 (set-syntax-table hm--html-mode-syntax-table) 128 (set-syntax-table hm--html-mode-syntax-table)
129 (make-local-variable 'comment-start)
130 (make-local-variable 'comment-end)
131 (setq comment-start "<!--" comment-end "-->")
132 (make-local-variable 'sentence-end)
133 (setq sentence-end "[<>.?!][]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*")
134 (setq indent-line-function 'hm--html-indent-line)
122 (setq idd-actions hm--html-idd-actions) 135 (setq idd-actions hm--html-idd-actions)
123 (hm--install-html-menu hm--html-mode-pulldown-menu-name) 136 (hm--install-html-menu hm--html-mode-pulldown-menu-name)
124 (make-variable-buffer-local 'write-file-hooks) 137 (make-variable-buffer-local 'write-file-hooks)
125 (add-hook 'write-file-hooks 'hm--html-maybe-new-date-and-changed-comment) 138 (add-hook 'write-file-hooks 'hm--html-maybe-new-date-and-changed-comment)
126 (make-local-variable 'font-lock-keywords) 139 ; (make-local-variable 'font-lock-keywords)
127 (setq font-lock-keywords hm--html-font-lock-keywords) 140 ; (setq font-lock-keywords-case-fold-search t)
141 ; (setq font-lock-keywords hm--html-font-lock-keywords)
142 (put major-mode 'font-lock-defaults '((hm--html-font-lock-keywords
143 hm--html-font-lock-keywords-1
144 hm--html-font-lock-keywords-2)
145 t
146 t
147 nil
148 nil
149 ))
128 (run-hooks 'hm--html-mode-hook)) 150 (run-hooks 'hm--html-mode-hook))
129 151
130 ;;;; Minor Modes 152 ;;;; Minor Modes
131 153
132 ;;; hm--html-region-mode 154 ;;; hm--html-region-mode