Commits

scop  committed dd09350

2002-07-25 Ville Skyttä <ville.skytta@xemacs.org>

* Makefile (VERSION): Unsupported XEmacs package 0.03 released.

* docbookide.el: Docstring nit fixes.
(docbook-electric-slash): Don't match <?xml, <!DOCTYPE or <!ENTITY.

  • Participants
  • Parent commits 867c843

Comments (0)

Files changed (3)

+2002-07-25  Ville Skyttä  <ville.skytta@xemacs.org>
+
+	* Makefile (VERSION): Unsupported XEmacs package 0.03 released.
+
+	* docbookide.el: Docstring nit fixes.
+	(docbook-electric-slash): Don't match <?xml, <!DOCTYPE or <!ENTITY.
+
 2002-06-24  Ville Skyttä  <ville.skytta@xemacs.org>
 
 	* docbookide.el: Add autoloaded auto-mode-alist entry.
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-VERSION = 0.02
+VERSION = 0.03
 AUTHOR_VERSION = 0.1
 MAINTAINER = Ville Skyttä <ville.skytta@xemacs.org>
 PACKAGE = docbookide

File docbookide.el

   "Version number of docbookide.")
 
 (defun docbookide-version ()
-  "Returns the value of the variable docbookide-version."
+  "Return the value of the variable `docbookide-version'."
   docbookide-version)
 
 (defconst docbookide-maintainer-address "docbookide-bug@nwalsh.com")
   "*Non-nil disables case insensitive searches by `docbook-grep'.")
 
 (defvar docbook-comment-start "<!--"
-  "*Comment start character sequence")
+  "*Comment start character sequence.")
 
 (defvar docbook-comment-end "-->"
-  "*Comment end character sequence")
+  "*Comment end character sequence.")
 
 (defvar docbook-comment-max-column 70
-  "*Maximum column number for text in a comment")
+  "*Maximum column number for text in a comment.")
 
 ;; DOCBOOKIDE house style puts all comments starting on a favourite column
 (defun docbook-comment (comment)
 )
 
 (defun docbook-electric-apos ()
-  "Function called when \"'\" is pressed in DOCBOOK mode"
+  "Function called when \"'\" is pressed in DOCBOOK mode."
   (interactive)
   (insert "'")
   (if (looking-at "\\([\"/})]\\|$\\)")
 	(insert "'"))))
 
 (defun docbook-electric-quote ()
-  "Function called when '\"' is pressed in DOCBOOK mode"
+  "Function called when '\"' is pressed in DOCBOOK mode."
   (interactive)
   (insert "\"")
   (if (looking-at "\\(['/})]\\|$\\)")
 	(insert "\""))))
 
 (defun docbook-electric-lsqb ()
-  "Function called when \"[\" is pressed in DOCBOOK mode"
+  "Function called when \"[\" is pressed in DOCBOOK mode."
   (interactive)
   (insert "[")
   (if (looking-at "\\([\"'/})]\\|$\\)")
 	(insert "]"))))
 
 (defun docbook-electric-lpar ()
-  "Function called when \"(\" is pressed in DOCBOOK mode"
+  "Function called when \"(\" is pressed in DOCBOOK mode."
   (interactive)
   (insert "(")
   (if (looking-at "\\([\]\"'/}]\\|$\\)")
 	(insert ")"))))
 
 (defun docbook-electric-lcub ()
-  "Function called when \"{\" is pressed in DOCBOOK mode"
+  "Function called when \"{\" is pressed in DOCBOOK mode."
   (interactive)
   (insert "{")
   (if (looking-at "\\([\])\"'/}]\\|$\\)")
 	(insert "}"))))
 
 (defun docbook-electric-less-than ()
-  "Function called when \"<\" is pressed in DOCBOOK mode"
+  "Function called when \"<\" is pressed in DOCBOOK mode."
   (interactive)
   (insert "<")
   (docbook-electric-tab))
 
 (defun docbook-electric-slash ()
-  "Function called when \"/\" is pressed in DOCBOOK mode"
+  "Function called when \"/\" is pressed in DOCBOOK mode."
   (interactive)
   (insert "/")
   (docbook-electric-tab)
 			((looking-at "<\\(\\([^/>]\\|/[^>]\\)+\\)/>"))
 ;;			 (message "Empty tag: %s" (match-string 1)))
 			((looking-at "<!--[^-]*\\(-[^-]+\\)*-->"))
-			((looking-at "<\\([^/> \t]+\\)")
+			;; skip CDATA sections
+			((looking-at "<!\\[CDATA\\["))
+			;; ...and the XML declaration, DOCTYPE and ENTITY stuff
+			((looking-at
+                          "<\\(\\?xml\\|!\\(DOCTYPE\\|ENTITY\\)\\)[ \t\n\r]"))
+			((looking-at "<\\([^/> \n\t]+\\)")
 ;;			 (message "Start tag: %s" (match-string 1))
 			 (throw 'start-tag (match-string 1)))
 			((bobp)
 
 
 (defun docbook-electric-return ()
+  "Function called when RET is pressed in DOCBOOK mode."
   (interactive)
   (insert "\n")
   (docbook-electric-tab))
       (goto-char (match-end 0))))
 
 (defun docbook-calculate-indent ()
-  "Calculate what the indent should be for the current line"
+  "Calculate what the indent should be for the current line."
   (interactive)
   (save-excursion
     (if (re-search-backward "^\\([ \t]*\\)<" nil t)
 	(goto-char (match-end 1))
       (beginning-of-line))
-    (if (or 
+    (if (or
 	 (save-excursion
 	   (re-search-forward "\\(</[^<>]+>\\|<[^/][^<>]+/>\\)[ \t]*$"
 			      (save-excursion (end-of-line) (1+ (point)))
 docbook-default-filespec, but `docbook-grep' also maintains a history of
 FILESPEC arguments so you can easily re-use a previous value.  The
 history is shared with `docbook-etags' so you can re-use the same FILESPEC
-with both functions.
-"
+with both functions."
   (interactive
    (list
     (docbook-read-from-minibuffer "Pattern: "
 
 Font lock mode:
 
-Turning on font lock mode causes various DOCBOOK syntactic structures to be 
-hightlighted. To turn this on whenever you visit an DOCBOOK file, add
+Turning on font lock mode causes various DOCBOOK syntactic structures to be
+hightlighted.  To turn this on whenever you visit an DOCBOOK file, add
 the following to your .emacs file:
-  \(add-hook 'docbook-mode-hook 'turn-on-font-lock\)
-"
+  \(add-hook 'docbook-mode-hook 'turn-on-font-lock\)"
   (interactive)
   (kill-all-local-variables)
   (use-local-map docbook-mode-map)
        (reporter-submit-bug-report
 	docbookide-maintainer-address
 	(concat "docbookide.el " docbookide-version)
-	(list 
+	(list
 	 )
 	nil
 	nil