]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/semantic/html.el
Update copyright year to 2015
[gnu-emacs] / lisp / cedet / semantic / html.el
index 05d1b2b7d8f2b4d370d3a72354f8184ade3c21ee..2194bf5bd382ecd5fe870b983820323442253045 100644 (file)
@@ -1,6 +1,6 @@
-;;; html.el --- Semantic details for html files
+;;; semantic/html.el --- Semantic details for html files
 
-;;; Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2005, 2007-2015 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\\)\\>"
@@ -68,7 +61,7 @@
 (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
@@ -133,7 +126,7 @@ html parser.  PNT is the new point to set."
 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
@@ -183,8 +176,8 @@ tag with greater section value than LEVEL is found."
          (goto-char (car oldl))
          (if (looking-at "<\\(\\w+\\)")
              (let* ((word (match-string 1))
-                    (levelmatch (assoc-ignore-case
-                                  word semantic-html-section-list))
+                    (levelmatch (assoc-string
+                                  word semantic-html-section-list t))
                     text begin tmp
                     )
                (when (not levelmatch)
@@ -229,6 +222,12 @@ tag with greater section value than LEVEL is found."
   "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."
   ;; This will use our parser.
@@ -244,6 +243,7 @@ tag with greater section value than LEVEL is found."
        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
@@ -252,11 +252,14 @@ tag with greater section value than LEVEL is found."
    t)
   )
 
-(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'.")
 
 (provide 'semantic/html)
 
-;;; semantic-html.el ends here
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-load-name: "semantic/html"
+;; End:
+
+;;; semantic/html.el ends here