;;; semantic/html.el --- Semantic details for html files
-;;; Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2005, 2007-2016 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; ToDo: Find <script> tags, and parse the contents in other
;; parsers, such as javascript, php, shtml, or others.
+;;; Code:
+
(require 'semantic)
(require 'semantic/format)
-(condition-case nil
- ;; This is not installed in all versions of Emacs.
- (require 'sgml-mode) ;; html-mode is in here.
- (error
- (require 'psgml-mode) ;; XEmacs uses psgml, and html-mode is in here.
- ))
+(require 'sgml-mode)
-;;; Code:
-(eval-when-compile
- (require 'semantic/ctxt)
-;; (require 'semantic/imenu)
-;; (require 'senator)
-)
+(defvar semantic-command-separation-character)
(defvar semantic-html-super-regex
"<\\(h[1-9]\\|title\\|script\\|body\\|a +href\\)\\>"
(define-mode-local-override semantic-parse-region
html-mode (&rest ignore)
"Parse the current html buffer for semantic tags.
-INGNORE any arguments. Always parse the whole buffer.
+IGNORE any arguments. Always parse the whole buffer.
Each tag returned is of the form:
(\"NAME\" section (:members CHILDREN))
or
NAME is the name of this section.
MEMBERS is a list of semantic tags representing the elements that make
up this section.
-LEVEL is the levelling level.
+LEVEL is the leveling level.
START and END define the location of data described by the tag."
(let ((anchorp (eq level 11)))
(append (semantic-tag name
"The children TAG expands to."
(semantic-html-components tag))
+;; In semantic/imenu.el, not part of Emacs.
+(defvar semantic-imenu-expandable-tag-classes)
+(defvar semantic-imenu-bucketize-file)
+(defvar semantic-imenu-bucketize-type-members)
+
;;;###autoload
(defun semantic-default-html-setup ()
"Set up a buffer for parsing of HTML files."
semantic-imenu-bucketize-file nil
semantic-imenu-bucketize-type-members nil
senator-step-at-start-end-tag-classes '(section)
+ senator-step-at-tag-classes '(section)
semantic-stickyfunc-sticky-classes '(section)
)
(semantic-install-function-overrides
t)
)
-;;;###autoload
-(add-hook 'html-mode-hook 'semantic-default-html-setup)
-
(define-child-mode html-helper-mode html-mode
"`html-helper-mode' needs the same semantic support as `html-mode'.")
;; Local variables:
;; generated-autoload-file: "loaddefs.el"
-;; generated-autoload-feature: semantic/loaddefs
;; generated-autoload-load-name: "semantic/html"
;; End: