| 1 | This package contains an emacs major mode for editing SGML and XML
|
|---|
| 2 | DTDs. The current revision is 0.8 beta 1, dated 1st September, 2001.
|
|---|
| 3 |
|
|---|
| 4 | The tdtd home page is http://www.menteith.com/tdtd/
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 | * MANIFEST
|
|---|
| 8 |
|
|---|
| 9 | File Contents
|
|---|
| 10 |
|
|---|
| 11 | readme.txt The file you are reading
|
|---|
| 12 | dot_emacs Some things for your .emacs file
|
|---|
| 13 | tdtd.el A collection of DTD-related procedures
|
|---|
| 14 | tdtd-font.el Font lock keywords for DTDs
|
|---|
| 15 | tdtd-font-maker.el Data and procedure to create tdtd-font.el
|
|---|
| 16 | tdtd-make-regexp.el Used by tdtd-font-maker.el
|
|---|
| 17 | changelog.txt List of changes
|
|---|
| 18 | tutorial.txt A tutorial on using dtd-mode
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 | * FEATURES
|
|---|
| 22 |
|
|---|
| 23 | - Standalone mode for editing DTDs;
|
|---|
| 24 |
|
|---|
| 25 | - "Goto" menu for locating declarations within the current buffer;
|
|---|
| 26 |
|
|---|
| 27 | - `dtd-etags' function for creating Emacs TAGS files for easy lookup
|
|---|
| 28 | across multiple files of any element, parameter entity, or
|
|---|
| 29 | notation's definition using Emacs's built-in tag-lookup functions;
|
|---|
| 30 |
|
|---|
| 31 | - `dtd-grep' function for searching files that shares a file history
|
|---|
| 32 | with `dtd-etags' for easy searching of the same files with both
|
|---|
| 33 | functions;
|
|---|
| 34 |
|
|---|
| 35 | - Specific font lock highlighting of declarations in XML DTDs, SGML
|
|---|
| 36 | DTDs, SGML Declarations, and System Declarations so that the
|
|---|
| 37 | important information stands out;
|
|---|
| 38 |
|
|---|
| 39 | - XML-specific behaviour that, at user option, is triggered by
|
|---|
| 40 | automatic detection of the XML Declaration;
|
|---|
| 41 |
|
|---|
| 42 | - Functions for writing and editing element, attribute, internal
|
|---|
| 43 | parameter entity and external parameter entity declarations and
|
|---|
| 44 | comments to ease creating and keeping a consistent style; and
|
|---|
| 45 |
|
|---|
| 46 | - Elements and parameter entity names referenced in declarations are
|
|---|
| 47 | stored in minibuffer history to minimise retyping in new
|
|---|
| 48 | declarations.
|
|---|
| 49 |
|
|---|
| 50 | dtd-mode references `sgml-validate' for its validation function. Use
|
|---|
| 51 | with Lennart Staflin's psgml package is recommended.
|
|---|
| 52 |
|
|---|
| 53 | Use with resize-minibuffer-mode is also recommended.
|
|---|
| 54 |
|
|---|
| 55 | The "Goto" menu is only available if you have imenu.el.
|
|---|
| 56 |
|
|---|
| 57 | dtd-mode was tested using NTEmacs 20.7.1.
|
|---|
| 58 |
|
|---|
| 59 | * FORMATTING VARIABLES
|
|---|
| 60 |
|
|---|
| 61 | dtd-mode uses many user-definable variables to control the formatting
|
|---|
| 62 | of declarations, some of which are shown in the following examples:
|
|---|
| 63 |
|
|---|
| 64 | dtd-comment-start-column dtd-dtd-max-column
|
|---|
| 65 | | dtd-comment-max-column |
|
|---|
| 66 | | | |
|
|---|
| 67 | <!-- This is a comment -->
|
|---|
| 68 |
|
|---|
| 69 | dtd-element-name-column
|
|---|
| 70 | | dtd-element-tag-ommission-column
|
|---|
| 71 | | | dtd-element-content-spec-start-column
|
|---|
| 72 | | | |dtd-element-content-spec-continuation-column
|
|---|
| 73 | | | || dtd-dtd-max-column
|
|---|
| 74 | | | || |
|
|---|
| 75 | <!ELEMENT element-tag - - (insert, your, content, specification,
|
|---|
| 76 | here) >
|
|---|
| 77 |
|
|---|
| 78 | * BUG REPORTS/ENCHANCEMENTS
|
|---|
| 79 |
|
|---|
| 80 | I would be glad to accept bug reports and/or enhancements. Use
|
|---|
| 81 | `dtd-submit-bug-report'.
|
|---|
| 82 |
|
|---|
| 83 | * INSTALLATION
|
|---|
| 84 |
|
|---|
| 85 | 1. Unzip the distribution.
|
|---|
| 86 |
|
|---|
| 87 | This should extract the files listed in the manifest above.
|
|---|
| 88 |
|
|---|
| 89 | The files have DOS-style line breaks. You may need to use "unzip
|
|---|
| 90 | -a" or "gunzip -a" to convert the line ends in the files to your
|
|---|
| 91 | local convention.
|
|---|
| 92 |
|
|---|
| 93 | 2. Copy the tdtd.el and tdtd-font.el files to somewhere on your emacs
|
|---|
| 94 | `load-path'; for example, your emacs site-lisp directory (e.g.,
|
|---|
| 95 | /usr/local/lib/emacs/site-lisp).
|
|---|
| 96 |
|
|---|
| 97 | XEmacs users also need to make sure that they have imenu.el
|
|---|
| 98 | installed before they can use the "Goto" menu.
|
|---|
| 99 |
|
|---|
| 100 | 3. Byte compile tdtd.el and tdtd-font.el using M-x byte-compile-file
|
|---|
| 101 | and supplying the path name of each file.
|
|---|
| 102 |
|
|---|
| 103 | The provided makefile also has rules for byte-compiling the files.
|
|---|
| 104 |
|
|---|
| 105 | If you byte-compiled a previous version of tdtd.el and
|
|---|
| 106 | tdtd-font.el, then you must byte-compile the new files (or remove
|
|---|
| 107 | the old .elc files) so that autoload loads the correct versions.
|
|---|
| 108 |
|
|---|
| 109 | If you do not have imenu.el, you may receive a "assignment to free
|
|---|
| 110 | variable imenu-create-index-function" warning when you byte compile
|
|---|
| 111 | tdtd.el. You will, however, be able to use the compiled tdtd.elc
|
|---|
| 112 | without error (and without the "Goto" menu).
|
|---|
| 113 |
|
|---|
| 114 | You do not need tdtd-font-maker.el or make-regexp.el in order to
|
|---|
| 115 | use tdtd. They are provided in case you want to modify the
|
|---|
| 116 | font-lock regular expressions and remake tdtd-font.el.
|
|---|
| 117 |
|
|---|
| 118 | 4. Add the elisp code in dot_emacs to your .emacs file.
|
|---|
| 119 |
|
|---|
| 120 | Windows users that are not using a Unix-like shell (e.g. bash)
|
|---|
| 121 | should uncomment and use the definition of dtd-etags-regex-option
|
|---|
| 122 | in dot_emacs.
|
|---|
| 123 |
|
|---|
| 124 | 5. When you visit a file with an extension of .dtd, etc., dtd-mode
|
|---|
| 125 | will automatically be loaded.
|
|---|
| 126 |
|
|---|
| 127 |
|
|---|
| 128 | * MAKING tdtd-font.el
|
|---|
| 129 |
|
|---|
| 130 | tdtd-font.el is created by tdtd-font-maker.el. You should not need to
|
|---|
| 131 | remake tdtd-font.el unless you have tinkered with the regular
|
|---|
| 132 | expressions in tdtd-font-maker.el.
|
|---|
| 133 |
|
|---|
| 134 | 1. Load file `tdtd-font-maker.el'.
|
|---|
| 135 |
|
|---|
| 136 | 2. Execute `dtd-make-tdtd-font'.
|
|---|
| 137 |
|
|---|
| 138 | tdtd-font.el is created in the current directory.
|
|---|
| 139 |
|
|---|
| 140 | -----
|
|---|
| 141 | Tony Graham
|
|---|
| 142 | 17 August 2007
|
|---|
| 143 |
|
|---|