Refill some long/short copyright headers.
[bpt/emacs.git] / lisp / nxml / nxml-outln.el
index 96d8ceb..6a2a9da 100644 (file)
@@ -1,16 +1,16 @@
 ;;; nxml-outln.el --- outline support for nXML mode
 
-;; Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2007-2011  Free Software Foundation, Inc.
 
 ;; Author: James Clark
 ;; Keywords: XML
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,9 +18,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -84,7 +82,7 @@
 
 (defcustom nxml-section-element-name-regexp
   "article\\|\\(sub\\)*section\\|chapter\\|div\\|appendix\\|part\\|preface\\|reference\\|simplesect\\|bibliography\\|bibliodiv\\|glossary\\|glossdiv"
-  "*Regular expression matching the name of elements used as sections.
+  "Regular expression matching the name of elements used as sections.
 An XML element is treated as a section if:
 
 - its local name (that is, the name without the prefix) matches
@@ -99,7 +97,7 @@ element has a local name matching the variable
   :type 'regexp)
 
 (defcustom nxml-heading-element-name-regexp "title\\|head"
-  "*Regular expression matching the name of elements used as headings.
+  "Regular expression matching the name of elements used as headings.
 An XML element is only recognized as a heading if it occurs as or
 within the first child of an element that is recognized as a section.
 See the variable `nxml-section-element-name-regexp' for more details."
@@ -107,7 +105,7 @@ See the variable `nxml-section-element-name-regexp' for more details."
   :type 'regexp)
 
 (defcustom nxml-outline-child-indent 2
-  "*Indentation in an outline for child element relative to parent element."
+  "Indentation in an outline for child element relative to parent element."
   :group 'nxml
   :type 'integer)
 
@@ -163,7 +161,7 @@ See the variable `nxml-section-element-name-regexp' for more details."
 (defun nxml-hide-all-text-content ()
   "Hide all text content in the buffer.
 Anything that is in a section but is not a heading will be hidden.
-The visibility of headings at any level will not be changed. See the
+The visibility of headings at any level will not be changed.  See the
 variable `nxml-section-element-name-regexp' for more details on how to
 customize which elements are recognized as sections and headings."
   (interactive)
@@ -172,8 +170,8 @@ customize which elements are recognized as sections and headings."
 (defun nxml-show-direct-text-content ()
   "Show the text content that is directly part of the section containing point.
 Each subsection will be shown according to its individual state, which
-will not be changed. The section containing point is the innermost
-section that contains the character following point. See the variable
+will not be changed.  The section containing point is the innermost
+section that contains the character following point.  See the variable
 `nxml-section-element-name-regexp' for more details on how to
 customize which elements are recognized as sections and headings."
   (interactive)
@@ -185,7 +183,7 @@ customize which elements are recognized as sections and headings."
 (defun nxml-show-direct-subheadings ()
   "Show the immediate subheadings of the section containing point.
 The section containing point is the innermost section that contains
-the character following point. See the variable
+the character following point.  See the variable
 `nxml-section-element-name-regexp' for more details on how to
 customize which elements are recognized as sections and headings."
   (interactive)
@@ -199,7 +197,7 @@ customize which elements are recognized as sections and headings."
   "Hide the text content that is directly part of the section containing point.
 The heading of the section will remain visible.  The state of
 subsections will not be changed.  The section containing point is the
-innermost section that contains the character following point. See the
+innermost section that contains the character following point.  See the
 variable `nxml-section-element-name-regexp' for more details on how to
 customize which elements are recognized as sections and headings."
   (interactive)
@@ -214,7 +212,7 @@ customize which elements are recognized as sections and headings."
 The text content will also be hidden, leaving only the heading of the
 section itself visible.  The state of the subsections will also be
 changed to hide their headings, so that \\[nxml-show-direct-text-content]
-would show only the heading of the subsections. The section containing
+would show only the heading of the subsections.  The section containing
 point is the innermost section that contains the character following
 point.  See the variable `nxml-section-element-name-regexp' for more
 details on how to customize which elements are recognized as sections
@@ -237,7 +235,7 @@ sections and headings."
 (defun nxml-hide-text-content ()
   "Hide text content at all levels in the section containing point.
 The section containing point is the innermost section that contains
-the character following point. See the variable
+the character following point.  See the variable
 `nxml-section-element-name-regexp' for more details on how to
 customize which elements are recognized as sections and headings."
   (interactive)
@@ -247,7 +245,7 @@ customize which elements are recognized as sections and headings."
   "Show the subheadings at all levels of the section containing point.
 The visibility of the text content at all levels in the section is not
 changed.  The section containing point is the innermost section that
-contains the character following point. See the variable
+contains the character following point.  See the variable
 `nxml-section-element-name-regexp' for more details on how to
 customize which elements are recognized as sections and headings."
   (interactive)
@@ -257,7 +255,7 @@ customize which elements are recognized as sections and headings."
   "Hide text content other than that directly in the section containing point.
 Hide headings other than those of ancestors of that section and their
 immediate subheadings.  The section containing point is the innermost
-section that contains the character following point. See the variable
+section that contains the character following point.  See the variable
 `nxml-section-element-name-regexp' for more details on how to
 customize which elements are recognized as sections and headings."
   (interactive)
@@ -351,7 +349,7 @@ customize which elements are recognized as sections and headings."
     (when change
       (nxml-set-outline-state section-start-pos
                              (cdr change)))))
-  
+
 (defun nxml-section-tag-transform-outline-state (startp
                                                 section-start-pos
                                                 &optional
@@ -420,7 +418,7 @@ customize which elements are recognized as sections and headings."
   (or (eq xmltok-type 'end-tag)
       (eq xmltok-type 'partial-end-tag)))
 
-(defun nxml-refresh-outline () 
+(defun nxml-refresh-outline ()
   "Refresh the outline to correspond to the current XML element structure."
   (interactive)
   (save-excursion
@@ -440,7 +438,7 @@ OUTLINE-STATE can be nil, t, hide-children.  START-TAG-INDENT is the
 indent of the start-tag of the current element, or nil if no
 containing element has a non-nil OUTLINE-STATE.  TAG-QNAMES is a list
 of the qnames of the open elements.  Point is after the title content.
-Leave point after the closing end-tag Return t if we had a
+Leave point after the closing end-tag Return t if we had a
 non-transparent child section."
   (let ((last-pos (point))
        (transparent-depth 0)
@@ -663,7 +661,7 @@ non-transparent child section."
                                         t)
               'display
               nxml-highlighted-empty-end-tag))
-    
+
 (defun nxml-outline-display-multi-line-end-tag (last-pos start-tag-indent)
   (let ((indentp (save-excursion
                   (goto-char last-pos)
@@ -767,12 +765,12 @@ non-transparent child section."
                                 &optional
                                 front-advance
                                 rear-advance)
-  "Replace any nxml-outline-display overlays between START and END.
+  "Replace any `nxml-outline-display' overlays between START and END.
 Overlays are removed if they overlay the region between START and END,
-and have a non-nil nxml-outline-display property (typically via their
-category). If CATEGORY is non-nil, they will be replaced with a new overlay
-with that category from START to END. If CATEGORY is nil, no new
-overlay will be created."
+and have a non-nil `nxml-outline-display' property (typically via their
+category).  If CATEGORY is non-nil, they will be replaced with a new
+overlay with that category from START to END.  If CATEGORY is nil,
+no new overlay will be created."
   (when (< start end)
     (let ((overlays (overlays-in start end))
          overlay)
@@ -797,7 +795,7 @@ Do not move past the end of the line."
   (let ((pos (condition-case err
                 (and (nxml-scan-element-forward (point) t)
                      xmltok-start)
-              nil)))
+              (nxml-scan-error nil))))
     (end-of-line)
     (skip-chars-backward " \t")
     (cond ((not pos)
@@ -839,7 +837,7 @@ Do not move past the end of the line."
 
 (defun nxml-section-tag-forward ()
   "Move forward past the first tag that is a section start- or end-tag.
-Return xmltok-type for tag.
+Return `xmltok-type' for tag.
 If no tag found, return nil and move to the end of the buffer."
   (let ((case-fold-search nil)
        (tag-regexp (nxml-make-section-tag-regexp))
@@ -868,10 +866,10 @@ If no tag found, return nil and move to the end of the buffer."
                  nil)
                 (t))))
     xmltok-type)
-        
+
 (defun nxml-section-tag-backward ()
   "Move backward to the end of a tag that is a section start- or end-tag.
-The position of the end of the tag must be <= point
+The position of the end of the tag must be <= point.
 Point is at the end of the tag.  `xmltok-start' is the start."
   (let ((case-fold-search nil)
        (start (point))
@@ -924,7 +922,7 @@ Signal an error on failure."
   "Try to move back to the start of the section containing point.
 The start of the section must be <= point.
 Only visible sections are included unless INVISIBLE-OK is non-nil.
-If found, return t.  Otherwise move to point-min and return nil.
+If found, return t.  Otherwise move to `point-min' and return nil.
 If unbalanced section tags are found, signal an `nxml-outline-error'."
   (when (or (nxml-after-section-start-tag)
            (nxml-section-tag-backward))
@@ -972,7 +970,7 @@ immediately after the section's start-tag."
        (heading-regexp (concat "\\`\\("
                                nxml-heading-element-name-regexp
                                "\\)\\'"))
-       
+
        (section-regexp (concat "\\`\\("
                                nxml-section-element-name-regexp
                                "\\)\\'"))
@@ -1039,5 +1037,4 @@ immediately after the section's start-tag."
 
 (provide 'nxml-outln)
 
-;; arch-tag: 1f1b7454-e573-4cd7-a505-d9dc64eef828
 ;;; nxml-outln.el ends here