diff options
| author | Chong Yidong | 2012-04-04 15:54:02 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-04-04 15:54:02 +0800 |
| commit | 3d439cd10fff3e71c7115263a03a5a92898ca7ea (patch) | |
| tree | e79c2b0c1e66474429fec04614701d38c5bf52e7 /doc/misc/nxml-mode.texi | |
| parent | 97f4a299ee49ed580beb079752bd4d0c9dee0ce7 (diff) | |
| download | emacs-3d439cd10fff3e71c7115263a03a5a92898ca7ea.tar.gz emacs-3d439cd10fff3e71c7115263a03a5a92898ca7ea.zip | |
Several miscellaneous doc changes.
* doc/lispref/display.texi (Delayed Warnings): New node.
* doc/misc/gnus-faq.texi (FAQ 8-2): Mention EasyPG.
* doc/misc/gnus.texi: Reduce references to obsolete pgg library.
(Security): Note that epg is now the default.
* doc/misc/message.texi (Using PGP/MIME): Note that epg is now the default.
* doc/misc/nxml-mode.texi (Completion): C-RET is no longer bound to
nxml-complete.
* lisp/subr.el (delayed-warnings-hook): Doc fix.
* src/keyboard.c (Vdelayed_warnings_list): Doc fix.
Diffstat (limited to 'doc/misc/nxml-mode.texi')
| -rw-r--r-- | doc/misc/nxml-mode.texi | 71 |
1 files changed, 32 insertions, 39 deletions
diff --git a/doc/misc/nxml-mode.texi b/doc/misc/nxml-mode.texi index 73af1ace245..c8d159e2363 100644 --- a/doc/misc/nxml-mode.texi +++ b/doc/misc/nxml-mode.texi | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | @c %**end of header | 5 | @c %**end of header |
| 6 | 6 | ||
| 7 | @copying | 7 | @copying |
| 8 | This manual documents nxml-mode, an Emacs major mode for editing | 8 | This manual documents nXML mode, an Emacs major mode for editing |
| 9 | XML with RELAX NG support. | 9 | XML with RELAX NG support. |
| 10 | 10 | ||
| 11 | Copyright @copyright{} 2007-2012 Free Software Foundation, Inc. | 11 | Copyright @copyright{} 2007-2012 Free Software Foundation, Inc. |
| @@ -108,31 +108,25 @@ lists. Report any bugs with @kbd{M-x report-emacs-bug}. | |||
| 108 | @node Completion | 108 | @node Completion |
| 109 | @chapter Completion | 109 | @chapter Completion |
| 110 | 110 | ||
| 111 | Apart from real-time validation, the most important feature that | 111 | Apart from real-time validation, the most important feature that nXML |
| 112 | nxml-mode provides for assisting in document creation is "completion". | 112 | mode provides for assisting in document creation is "completion". |
| 113 | Completion assists the user in inserting characters at point, based on | 113 | Completion assists the user in inserting characters at point, based on |
| 114 | knowledge of the schema and on the contents of the buffer before | 114 | knowledge of the schema and on the contents of the buffer before |
| 115 | point. | 115 | point. |
| 116 | 116 | ||
| 117 | The traditional GNU Emacs key combination for completion in a | 117 | nXML mode adapts the standard GNU Emacs command for completion in a |
| 118 | buffer is @kbd{M-@key{TAB}}. However, many window systems | 118 | buffer: @code{completion-at-point}, which is bound to @kbd{C-M-i} and |
| 119 | and window managers use this key combination themselves (typically for | 119 | @kbd{M-@key{TAB}}. Note that many window systems and window managers |
| 120 | switching between windows) and do not pass it to applications. It's | 120 | use @kbd{M-@key{TAB}} themselves (typically for switching between |
| 121 | hard to find key combinations in GNU Emacs that are both easy to type | 121 | windows) and do not pass it to applications. In that case, you should |
| 122 | and not taken by something else. @kbd{C-@key{RET}} (i.e. | 122 | type @kbd{C-M-i} or @kbd{@key{ESC} @key{TAB}} for completion, or bind |
| 123 | pressing the Enter or Return key, while the Ctrl key is held down) is | 123 | @code{completion-at-point} to a key that is convenient for you. In |
| 124 | available. It won't be available on a traditional terminal (because | 124 | the following, I will assume that you type @kbd{C-M-i}. |
| 125 | it is indistinguishable from Return), but it will work with a window | 125 | |
| 126 | system. Therefore we adopt the following solution by default: use | 126 | nXML mode completion works by examining the symbol preceding point. |
| 127 | @kbd{C-@key{RET}} when there's a window system and | 127 | This is the symbol to be completed. The symbol to be completed may be |
| 128 | @kbd{M-@key{TAB}} when there's not. In the following, I | 128 | the empty. Completion considers what symbols starting with the symbol |
| 129 | will assume that a window system is being used and will therefore | 129 | to be completed would be valid replacements for the symbol to be |
| 130 | refer to @kbd{C-@key{RET}}. | ||
| 131 | |||
| 132 | Completion works by examining the symbol preceding point. This | ||
| 133 | is the symbol to be completed. The symbol to be completed may be the | ||
| 134 | empty. Completion considers what symbols starting with the symbol to | ||
| 135 | be completed would be valid replacements for the symbol to be | ||
| 136 | completed, given the schema and the contents of the buffer before | 130 | completed, given the schema and the contents of the buffer before |
| 137 | point. These symbols are the possible completions. An example may | 131 | point. These symbols are the possible completions. An example may |
| 138 | make this clearer. Suppose the buffer looks like this (where @point{} | 132 | make this clearer. Suppose the buffer looks like this (where @point{} |
| @@ -168,7 +162,7 @@ completions are @samp{base}, @samp{isindex}, | |||
| 168 | In this case, the symbol to be completed is empty, and the possible | 162 | In this case, the symbol to be completed is empty, and the possible |
| 169 | completions are just @samp{http://www.w3.org/1999/xhtml}. | 163 | completions are just @samp{http://www.w3.org/1999/xhtml}. |
| 170 | 164 | ||
| 171 | When you type @kbd{C-@key{RET}}, what happens depends | 165 | When you type @kbd{C-M-i}, what happens depends |
| 172 | on what the set of possible completions are. | 166 | on what the set of possible completions are. |
| 173 | 167 | ||
| 174 | @itemize @bullet | 168 | @itemize @bullet |
| @@ -186,7 +180,7 @@ required. For example, in this case: | |||
| 186 | @end example | 180 | @end example |
| 187 | 181 | ||
| 188 | @noindent | 182 | @noindent |
| 189 | @kbd{C-@key{RET}} will yield | 183 | @kbd{C-M-i} will yield |
| 190 | 184 | ||
| 191 | @example | 185 | @example |
| 192 | <html xmlns="http://www.w3.org/1999/xhtml"> | 186 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| @@ -202,18 +196,17 @@ is inserted. For example, suppose the buffer is: | |||
| 202 | @end example | 196 | @end example |
| 203 | 197 | ||
| 204 | @noindent | 198 | @noindent |
| 205 | The symbol to be completed is @samp{x}. The possible completions | 199 | The symbol to be completed is @samp{x}. The possible completions are |
| 206 | are @samp{xmlns} and @samp{xml:lang}. These share a | 200 | @samp{xmlns} and @samp{xml:lang}. These share a common prefix of |
| 207 | common prefix of @samp{xml}. Thus, @kbd{C-@key{RET}} | 201 | @samp{xml}. Thus, @kbd{C-M-i} will yield: |
| 208 | will yield: | ||
| 209 | 202 | ||
| 210 | @example | 203 | @example |
| 211 | <html xml@point{} | 204 | <html xml@point{} |
| 212 | @end example | 205 | @end example |
| 213 | 206 | ||
| 214 | @noindent | 207 | @noindent |
| 215 | Typically, you would do @kbd{C-@key{RET}} again, which would | 208 | Typically, you would do @kbd{C-M-i} again, which would have the result |
| 216 | have the result described in the next item. | 209 | described in the next item. |
| 217 | @item | 210 | @item |
| 218 | If there is more than one possible completion, but the | 211 | If there is more than one possible completion, but the |
| 219 | possible completions do not share a non-empty prefix, then Emacs will | 212 | possible completions do not share a non-empty prefix, then Emacs will |
| @@ -251,19 +244,19 @@ If you input @kbd{xmlns}, the result will be: | |||
| 251 | @end example | 244 | @end example |
| 252 | 245 | ||
| 253 | @noindent | 246 | @noindent |
| 254 | (If you do @kbd{C-@key{RET}} again, the namespace URI will | 247 | (If you do @kbd{C-M-i} again, the namespace URI will be |
| 255 | be inserted. Should that happen automatically?) | 248 | inserted. Should that happen automatically?) |
| 256 | @end itemize | 249 | @end itemize |
| 257 | 250 | ||
| 258 | @node Inserting end-tags | 251 | @node Inserting end-tags |
| 259 | @chapter Inserting end-tags | 252 | @chapter Inserting end-tags |
| 260 | 253 | ||
| 261 | The main redundancy in XML syntax is end-tags. nxml-mode provides | 254 | The main redundancy in XML syntax is end-tags. nXML mode provides |
| 262 | several ways to make it easier to enter end-tags. You can use all of | 255 | several ways to make it easier to enter end-tags. You can use all of |
| 263 | these without a schema. | 256 | these without a schema. |
| 264 | 257 | ||
| 265 | You can use @kbd{C-@key{RET}} after @samp{</} | 258 | You can use @kbd{C-M-i} after @samp{</} to complete the rest of the |
| 266 | to complete the rest of the end-tag. | 259 | end-tag. |
| 267 | 260 | ||
| 268 | @kbd{C-c C-f} inserts an end-tag for the element containing | 261 | @kbd{C-c C-f} inserts an end-tag for the element containing |
| 269 | point. This command is useful when you want to input the start-tag, | 262 | point. This command is useful when you want to input the start-tag, |
| @@ -279,9 +272,9 @@ start-tag, point and the end-tag on successive lines, appropriately | |||
| 279 | indented. The @samp{i} is mnemonic for inline and the | 272 | indented. The @samp{i} is mnemonic for inline and the |
| 280 | @samp{b} is mnemonic for block. | 273 | @samp{b} is mnemonic for block. |
| 281 | 274 | ||
| 282 | Finally, you can customize nxml-mode so that @kbd{/} | 275 | Finally, you can customize nXML mode so that @kbd{/} automatically |
| 283 | automatically inserts the rest of the end-tag when it occurs after | 276 | inserts the rest of the end-tag when it occurs after @samp{<}, by |
| 284 | @samp{<}, by doing | 277 | doing |
| 285 | 278 | ||
| 286 | @display | 279 | @display |
| 287 | @kbd{M-x customize-variable @key{RET} nxml-slash-auto-complete-flag @key{RET}} | 280 | @kbd{M-x customize-variable @key{RET} nxml-slash-auto-complete-flag @key{RET}} |
| @@ -868,7 +861,7 @@ an @samp{applyFollowingRules} to the private file. | |||
| 868 | @node DTDs | 861 | @node DTDs |
| 869 | @chapter DTDs | 862 | @chapter DTDs |
| 870 | 863 | ||
| 871 | nxml-mode is designed to support the creation of standalone XML | 864 | nXML mode is designed to support the creation of standalone XML |
| 872 | documents that do not depend on a DTD. Although it is common practice | 865 | documents that do not depend on a DTD. Although it is common practice |
| 873 | to insert a DOCTYPE declaration referencing an external DTD, this has | 866 | to insert a DOCTYPE declaration referencing an external DTD, this has |
| 874 | undesirable side-effects. It means that the document is no longer | 867 | undesirable side-effects. It means that the document is no longer |