diff options
| author | Juanma Barranquero | 2008-07-03 15:18:32 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2008-07-03 15:18:32 +0000 |
| commit | 92439579f3a00655358f48ea64b8fb142bfda1b6 (patch) | |
| tree | 7cc696b514cdca4b976905ac56b5a0734ca48777 | |
| parent | 10545bd83d3b5c7f6082d56a59449ff1eddae2ff (diff) | |
| download | emacs-92439579f3a00655358f48ea64b8fb142bfda1b6.tar.gz emacs-92439579f3a00655358f48ea64b8fb142bfda1b6.zip | |
Typos, doc fixes, etc.
* eshell/esh-arg.el (eshell-quote-backslash): Fix typo in docstring.
(eshell-parse-argument-hook, eshell-special-chars-inside-quoting)
(eshell-arg-load-hook, eshell-special-chars-outside-quoting):
Remove spurious * in defcustom docstrings.
* textmodes/fill.el (fill-paragraph): Fix typo in docstring.
(fill-individual-varying-indent, colon-double-space, enable-kinsoku)
(adaptive-fill-mode, adaptive-fill-first-line-regexp)
(default-justification): Remove spurious * in defcustom docstrings.
* textmodes/rst.el (rst, rst-line-homogeneous-p, rst-mode-abbrev-table)
(rst-font-lock-keywords-function, rst-mode, rst-minor-mode)
(rst-compare-decorations, rst-default-indent, rst-update-section)
(rst-decoration-complete-p, rst-section-tree, rst-toc-insert-node)
(rst-toc-insert-find-delete-contents, rst-toc-count-lines)
(rst-toc-mode-goto-section, rst-faces, rst-level-face-base-color):
Fix typos in docstrings.
(rst-mode-lazy): Fix typo in docstring. Remove spurious *.
(rst-adjust, rst-line-homogeneous-p, rst-suggest-new-decoration)
(rst-get-decorations-around, rst-section-tree-point)
(rst-font-lock-adornment-point): Reflow docstrings.
(rst-get-decoration, rst-get-decoration-match, rst-adjust-decoration):
Doc fixes.
(rst-re-enumerations): Comment out.
| -rw-r--r-- | lisp/ChangeLog | 25 | ||||
| -rw-r--r-- | lisp/ChangeLog.7 | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-arg.el | 10 | ||||
| -rw-r--r-- | lisp/textmodes/fill.el | 16 | ||||
| -rw-r--r-- | lisp/textmodes/rst.el | 124 |
5 files changed, 100 insertions, 77 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6891f69f07e..92e6b3b4542 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,30 @@ | |||
| 1 | 2008-07-03 Juanma Barranquero <lekktu@gmail.com> | 1 | 2008-07-03 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 2 | ||
| 3 | * eshell/esh-arg.el (eshell-quote-backslash): Fix typo in docstring. | ||
| 4 | (eshell-parse-argument-hook, eshell-special-chars-inside-quoting) | ||
| 5 | (eshell-arg-load-hook, eshell-special-chars-outside-quoting): | ||
| 6 | Remove spurious * in defcustom docstrings. | ||
| 7 | |||
| 8 | * textmodes/fill.el (fill-paragraph): Fix typo in docstring. | ||
| 9 | (fill-individual-varying-indent, colon-double-space, enable-kinsoku) | ||
| 10 | (adaptive-fill-mode, adaptive-fill-first-line-regexp) | ||
| 11 | (default-justification): Remove spurious * in defcustom docstrings. | ||
| 12 | |||
| 13 | * textmodes/rst.el (rst, rst-line-homogeneous-p, rst-mode-abbrev-table) | ||
| 14 | (rst-font-lock-keywords-function, rst-mode, rst-minor-mode) | ||
| 15 | (rst-compare-decorations, rst-default-indent, rst-update-section) | ||
| 16 | (rst-decoration-complete-p, rst-section-tree, rst-toc-insert-node) | ||
| 17 | (rst-toc-insert-find-delete-contents, rst-toc-count-lines) | ||
| 18 | (rst-toc-mode-goto-section, rst-faces, rst-level-face-base-color): | ||
| 19 | Fix typos in docstrings. | ||
| 20 | (rst-mode-lazy): Fix typo in docstring. Remove spurious *. | ||
| 21 | (rst-adjust, rst-line-homogeneous-p, rst-suggest-new-decoration) | ||
| 22 | (rst-get-decorations-around, rst-section-tree-point) | ||
| 23 | (rst-font-lock-adornment-point): Reflow docstrings. | ||
| 24 | (rst-get-decoration, rst-get-decoration-match, rst-adjust-decoration): | ||
| 25 | Doc fixes. | ||
| 26 | (rst-re-enumerations): Comment out. | ||
| 27 | |||
| 3 | * nxml/nxml-glyph.el (nxml-glyph-set-hook): | 28 | * nxml/nxml-glyph.el (nxml-glyph-set-hook): |
| 4 | * nxml/nxml-uchnm.el (nxml-unicode-blocks) | 29 | * nxml/nxml-uchnm.el (nxml-unicode-blocks) |
| 5 | (nxml-unicode-block-char-name-set): | 30 | (nxml-unicode-block-char-name-set): |
diff --git a/lisp/ChangeLog.7 b/lisp/ChangeLog.7 index 64289cedf51..0b9986e993f 100644 --- a/lisp/ChangeLog.7 +++ b/lisp/ChangeLog.7 | |||
| @@ -2291,7 +2291,7 @@ | |||
| 2291 | (calendar-mouse-view-other-diary-entries): Rewritten to put results | 2291 | (calendar-mouse-view-other-diary-entries): Rewritten to put results |
| 2292 | in popup menu to be consistent with other functions. | 2292 | in popup menu to be consistent with other functions. |
| 2293 | 2293 | ||
| 2294 | * calendar/diary-lib.el (view-other-diary-entries): Don't overide | 2294 | * calendar/diary-lib.el (view-other-diary-entries): Don't override |
| 2295 | default value of diary-file. | 2295 | default value of diary-file. |
| 2296 | 2296 | ||
| 2297 | 1998-06-09 Richard Stallman <rms@psilocin.ai.mit.edu> | 2297 | 1998-06-09 Richard Stallman <rms@psilocin.ai.mit.edu> |
diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index 922ac6bb0bd..7e86772e797 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el | |||
| @@ -101,7 +101,7 @@ yield the values intended." | |||
| 101 | 101 | ||
| 102 | ;; argument delimiter | 102 | ;; argument delimiter |
| 103 | 'eshell-parse-delimiter) | 103 | 'eshell-parse-delimiter) |
| 104 | "*Define how to process Eshell command line arguments. | 104 | "Define how to process Eshell command line arguments. |
| 105 | When each function on this hook is called, point will be at the | 105 | When each function on this hook is called, point will be at the |
| 106 | current position within the argument list. The function should either | 106 | current position within the argument list. The function should either |
| 107 | return nil, meaning that it did no argument parsing, or it should | 107 | return nil, meaning that it did no argument parsing, or it should |
| @@ -119,7 +119,7 @@ treated as a literal character." | |||
| 119 | ;;; User Variables: | 119 | ;;; User Variables: |
| 120 | 120 | ||
| 121 | (defcustom eshell-arg-load-hook '(eshell-arg-initialize) | 121 | (defcustom eshell-arg-load-hook '(eshell-arg-initialize) |
| 122 | "*A hook that gets run when `eshell-arg' is loaded." | 122 | "A hook that gets run when `eshell-arg' is loaded." |
| 123 | :type 'hook | 123 | :type 'hook |
| 124 | :group 'eshell-arg) | 124 | :group 'eshell-arg) |
| 125 | 125 | ||
| @@ -129,13 +129,13 @@ treated as a literal character." | |||
| 129 | :group 'eshell-arg) | 129 | :group 'eshell-arg) |
| 130 | 130 | ||
| 131 | (defcustom eshell-special-chars-inside-quoting '(?\\ ?\") | 131 | (defcustom eshell-special-chars-inside-quoting '(?\\ ?\") |
| 132 | "*Characters which are still special inside double quotes." | 132 | "Characters which are still special inside double quotes." |
| 133 | :type '(repeat character) | 133 | :type '(repeat character) |
| 134 | :group 'eshell-arg) | 134 | :group 'eshell-arg) |
| 135 | 135 | ||
| 136 | (defcustom eshell-special-chars-outside-quoting | 136 | (defcustom eshell-special-chars-outside-quoting |
| 137 | (append eshell-delimiter-argument-list '(?# ?! ?\\ ?\" ?\')) | 137 | (append eshell-delimiter-argument-list '(?# ?! ?\\ ?\" ?\')) |
| 138 | "*Characters that require escaping outside of double quotes. | 138 | "Characters that require escaping outside of double quotes. |
| 139 | Without escaping them, they will introduce a change in the argument." | 139 | Without escaping them, they will introduce a change in the argument." |
| 140 | :type '(repeat character) | 140 | :type '(repeat character) |
| 141 | :group 'eshell-arg) | 141 | :group 'eshell-arg) |
| @@ -279,7 +279,7 @@ Point is left at the end of the arguments." | |||
| 279 | (= (+ pos 2) (point-max)))))) | 279 | (= (+ pos 2) (point-max)))))) |
| 280 | 280 | ||
| 281 | (defun eshell-quote-backslash (string &optional index) | 281 | (defun eshell-quote-backslash (string &optional index) |
| 282 | "Intelligently backslash the character occuring in STRING at INDEX. | 282 | "Intelligently backslash the character occurring in STRING at INDEX. |
| 283 | If the character is itself a backslash, it needs no escaping." | 283 | If the character is itself a backslash, it needs no escaping." |
| 284 | (let ((char (aref string index))) | 284 | (let ((char (aref string index))) |
| 285 | (if (eq char ?\\) | 285 | (if (eq char ?\\) |
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 0da0d70359a..47182d7e1fb 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | :group 'editing) | 34 | :group 'editing) |
| 35 | 35 | ||
| 36 | (defcustom fill-individual-varying-indent nil | 36 | (defcustom fill-individual-varying-indent nil |
| 37 | "*Controls criterion for a new paragraph in `fill-individual-paragraphs'. | 37 | "Controls criterion for a new paragraph in `fill-individual-paragraphs'. |
| 38 | Non-nil means changing indent doesn't end a paragraph. | 38 | Non-nil means changing indent doesn't end a paragraph. |
| 39 | That mode can handle paragraphs with extra indentation on the first line, | 39 | That mode can handle paragraphs with extra indentation on the first line, |
| 40 | but it requires separator lines between paragraphs. | 40 | but it requires separator lines between paragraphs. |
| @@ -43,7 +43,7 @@ A value of nil means that any change in indentation starts a new paragraph." | |||
| 43 | :group 'fill) | 43 | :group 'fill) |
| 44 | 44 | ||
| 45 | (defcustom colon-double-space nil | 45 | (defcustom colon-double-space nil |
| 46 | "*Non-nil means put two spaces after a colon when filling." | 46 | "Non-nil means put two spaces after a colon when filling." |
| 47 | :type 'boolean | 47 | :type 'boolean |
| 48 | :group 'fill) | 48 | :group 'fill) |
| 49 | (put 'colon-double-space 'safe-local-variable 'booleanp) | 49 | (put 'colon-double-space 'safe-local-variable 'booleanp) |
| @@ -60,7 +60,7 @@ such as `fill-forward-paragraph-function'.") | |||
| 60 | "Non-nil means paragraph filling will try to pay attention to comments.") | 60 | "Non-nil means paragraph filling will try to pay attention to comments.") |
| 61 | 61 | ||
| 62 | (defcustom enable-kinsoku t | 62 | (defcustom enable-kinsoku t |
| 63 | "*Non-nil means enable \"kinsoku\" processing on filling paragraphs. | 63 | "Non-nil means enable \"kinsoku\" processing on filling paragraphs. |
| 64 | Kinsoku processing is designed to prevent certain characters from being | 64 | Kinsoku processing is designed to prevent certain characters from being |
| 65 | placed at the beginning or end of a line by filling. | 65 | placed at the beginning or end of a line by filling. |
| 66 | See the documentation of `kinsoku' for more information." | 66 | See the documentation of `kinsoku' for more information." |
| @@ -84,7 +84,7 @@ reinserts the fill prefix in each resulting line." | |||
| 84 | (message "fill-prefix cancelled"))) | 84 | (message "fill-prefix cancelled"))) |
| 85 | 85 | ||
| 86 | (defcustom adaptive-fill-mode t | 86 | (defcustom adaptive-fill-mode t |
| 87 | "*Non-nil means determine a paragraph's fill prefix from its text." | 87 | "Non-nil means determine a paragraph's fill prefix from its text." |
| 88 | :type 'boolean | 88 | :type 'boolean |
| 89 | :group 'fill) | 89 | :group 'fill) |
| 90 | 90 | ||
| @@ -93,7 +93,7 @@ reinserts the fill prefix in each resulting line." | |||
| 93 | ;; Added `%' for TeX comments. | 93 | ;; Added `%' for TeX comments. |
| 94 | ;; RMS: deleted the code to match `1.' and `(1)'. | 94 | ;; RMS: deleted the code to match `1.' and `(1)'. |
| 95 | "[ \t]*\\([-!|#%;>*,A7$,1s"s#sC$,2"F(B]+[ \t]*\\)*" | 95 | "[ \t]*\\([-!|#%;>*,A7$,1s"s#sC$,2"F(B]+[ \t]*\\)*" |
| 96 | "*Regexp to match text at start of line that constitutes indentation. | 96 | "Regexp to match text at start of line that constitutes indentation. |
| 97 | If Adaptive Fill mode is enabled, a prefix matching this pattern | 97 | If Adaptive Fill mode is enabled, a prefix matching this pattern |
| 98 | on the first and second lines of a paragraph is used as the | 98 | on the first and second lines of a paragraph is used as the |
| 99 | standard indentation for the whole paragraph. | 99 | standard indentation for the whole paragraph. |
| @@ -105,7 +105,7 @@ a role." | |||
| 105 | :group 'fill) | 105 | :group 'fill) |
| 106 | 106 | ||
| 107 | (defcustom adaptive-fill-first-line-regexp "\\`[ \t]*\\'" | 107 | (defcustom adaptive-fill-first-line-regexp "\\`[ \t]*\\'" |
| 108 | "*Regexp specifying whether to set fill prefix from a one-line paragraph. | 108 | "Regexp specifying whether to set fill prefix from a one-line paragraph. |
| 109 | When a paragraph has just one line, then after `adaptive-fill-regexp' | 109 | When a paragraph has just one line, then after `adaptive-fill-regexp' |
| 110 | finds the prefix at the beginning of the line, if it doesn't | 110 | finds the prefix at the beginning of the line, if it doesn't |
| 111 | match this regexp, it is replaced with whitespace. | 111 | match this regexp, it is replaced with whitespace. |
| @@ -773,7 +773,7 @@ left to move.") | |||
| 773 | If JUSTIFY is non-nil (interactively, with prefix argument), justify as well. | 773 | If JUSTIFY is non-nil (interactively, with prefix argument), justify as well. |
| 774 | If `sentence-end-double-space' is non-nil, then period followed by one | 774 | If `sentence-end-double-space' is non-nil, then period followed by one |
| 775 | space does not end a sentence, so don't break a line there. | 775 | space does not end a sentence, so don't break a line there. |
| 776 | the variable `fill-column' controls the width for filling. | 776 | The variable `fill-column' controls the width for filling. |
| 777 | 777 | ||
| 778 | If `fill-paragraph-function' is non-nil, we call it (passing our | 778 | If `fill-paragraph-function' is non-nil, we call it (passing our |
| 779 | argument to it), and if it returns non-nil, we simply return its value. | 779 | argument to it), and if it returns non-nil, we simply return its value. |
| @@ -1043,7 +1043,7 @@ space does not end a sentence, so don't break a line there." | |||
| 1043 | 1043 | ||
| 1044 | 1044 | ||
| 1045 | (defcustom default-justification 'left | 1045 | (defcustom default-justification 'left |
| 1046 | "*Method of justifying text not otherwise specified. | 1046 | "Method of justifying text not otherwise specified. |
| 1047 | Possible values are `left', `right', `full', `center', or `none'. | 1047 | Possible values are `left', `right', `full', `center', or `none'. |
| 1048 | The requested kind of justification is done whenever lines are filled. | 1048 | The requested kind of justification is done whenever lines are filled. |
| 1049 | The `justification' text-property can locally override this variable." | 1049 | The `justification' text-property can locally override this variable." |
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 7eca907bc20..7d0006a8ee5 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el | |||
| @@ -199,7 +199,7 @@ | |||
| 199 | ;;; Code: | 199 | ;;; Code: |
| 200 | 200 | ||
| 201 | 201 | ||
| 202 | (defgroup rst nil "Support for reStructuredText documents" | 202 | (defgroup rst nil "Support for reStructuredText documents." |
| 203 | :group 'wp | 203 | :group 'wp |
| 204 | :version "23.1" | 204 | :version "23.1" |
| 205 | :link '(url-link "http://docutils.sourceforge.net/rst.html")) | 205 | :link '(url-link "http://docutils.sourceforge.net/rst.html")) |
| @@ -308,7 +308,7 @@ This inherits from Text mode.") | |||
| 308 | 308 | ||
| 309 | ;; Abbrevs. | 309 | ;; Abbrevs. |
| 310 | (defvar rst-mode-abbrev-table nil | 310 | (defvar rst-mode-abbrev-table nil |
| 311 | "Abbrev table used while in rst mode.") | 311 | "Abbrev table used while in Rst mode.") |
| 312 | (define-abbrev-table 'rst-mode-abbrev-table | 312 | (define-abbrev-table 'rst-mode-abbrev-table |
| 313 | '( | 313 | '( |
| 314 | ("contents" ".. contents::\n..\n " nil 0) | 314 | ("contents" ".. contents::\n..\n " nil 0) |
| @@ -351,13 +351,13 @@ The hook for Text Mode is run before this one." | |||
| 351 | 351 | ||
| 352 | 352 | ||
| 353 | (defcustom rst-mode-lazy t | 353 | (defcustom rst-mode-lazy t |
| 354 | "*If non-nil Rst Mode tries to font-lock multi-line elements correctly. | 354 | "If non-nil Rst mode tries to font-lock multi-line elements correctly. |
| 355 | Because this is really slow it should be set to nil if neither `jit-lock-mode' | 355 | Because this is really slow it should be set to nil if neither `jit-lock-mode' |
| 356 | not `lazy-lock-mode' and activated. | 356 | not `lazy-lock-mode' and activated. |
| 357 | 357 | ||
| 358 | If nil, comments and literal blocks are font-locked only on the line they start. | 358 | If nil, comments and literal blocks are font-locked only on the line they start. |
| 359 | 359 | ||
| 360 | The value of this variable is used when Rst Mode is turned on." | 360 | The value of this variable is used when Rst mode is turned on." |
| 361 | :group 'rst | 361 | :group 'rst |
| 362 | :type '(boolean)) | 362 | :type '(boolean)) |
| 363 | 363 | ||
| @@ -369,10 +369,10 @@ The value of this variable is used when Rst Mode is turned on." | |||
| 369 | "Major mode for editing reStructuredText documents. | 369 | "Major mode for editing reStructuredText documents. |
| 370 | 370 | ||
| 371 | There are a number of convenient keybindings provided by | 371 | There are a number of convenient keybindings provided by |
| 372 | rst-mode. The main one is \[rst-adjust\], it updates or rotates | 372 | Rst mode. The main one is \\[rst-adjust\], it updates or rotates |
| 373 | the section title around point or promotes/demotes the | 373 | the section title around point or promotes/demotes the |
| 374 | decorations within the region (see full details below). Use | 374 | decorations within the region (see full details below). |
| 375 | negative prefix arg to rotate in the other direction. | 375 | Use negative prefix arg to rotate in the other direction. |
| 376 | \\{rst-mode-map} | 376 | \\{rst-mode-map} |
| 377 | 377 | ||
| 378 | Turning on `rst-mode' calls the normal hooks `text-mode-hook' and | 378 | Turning on `rst-mode' calls the normal hooks `text-mode-hook' and |
| @@ -448,10 +448,9 @@ With no argument, this command toggles the mode. | |||
| 448 | Non-null prefix argument turns on the mode. | 448 | Non-null prefix argument turns on the mode. |
| 449 | Null prefix argument turns off the mode. | 449 | Null prefix argument turns off the mode. |
| 450 | 450 | ||
| 451 | When ReST minor mode is enabled, the ReST mode | 451 | When ReST minor mode is enabled, the ReST mode keybindings |
| 452 | keybindings are installed on top of the major | 452 | are installed on top of the major mode bindings. Use this |
| 453 | mode bindings. Use this for modes derived from | 453 | for modes derived from Text mode, like Mail mode." |
| 454 | text-mode, like mail-mode.." | ||
| 455 | ;; The initial value. | 454 | ;; The initial value. |
| 456 | nil | 455 | nil |
| 457 | ;; The indicator for the mode line. | 456 | ;; The indicator for the mode line. |
| @@ -555,8 +554,7 @@ text-mode, like mail-mode.." | |||
| 555 | ;; that has been found previously). | 554 | ;; that has been found previously). |
| 556 | 555 | ||
| 557 | (defgroup rst-adjust nil | 556 | (defgroup rst-adjust nil |
| 558 | "Settings for adjustment and cycling of section title | 557 | "Settings for adjustment and cycling of section title decorations." |
| 559 | decorations." | ||
| 560 | :group 'rst | 558 | :group 'rst |
| 561 | :version "21.1") | 559 | :version "21.1") |
| 562 | 560 | ||
| @@ -580,7 +578,7 @@ title in the file." | |||
| 580 | (defcustom rst-default-indent 1 | 578 | (defcustom rst-default-indent 1 |
| 581 | "Number of characters to indent the section title. | 579 | "Number of characters to indent the section title. |
| 582 | 580 | ||
| 583 | THis is used for when toggling decoration styles, when switching | 581 | This is used for when toggling decoration styles, when switching |
| 584 | from a simple decoration style to a over-and-under decoration | 582 | from a simple decoration style to a over-and-under decoration |
| 585 | style." | 583 | style." |
| 586 | :group 'rst-adjust) | 584 | :group 'rst-adjust) |
| @@ -594,13 +592,13 @@ style." | |||
| 594 | "Return true if the line is homogeneous. | 592 | "Return true if the line is homogeneous. |
| 595 | 593 | ||
| 596 | Predicate that returns the unique char if the current line is | 594 | Predicate that returns the unique char if the current line is |
| 597 | composed only of a single repeated non-whitespace character. This | 595 | composed only of a single repeated non-whitespace character. |
| 598 | returns the char even if there is whitespace at the beginning of | 596 | This returns the char even if there is whitespace at the |
| 599 | the line. | 597 | beginning of the line. |
| 600 | 598 | ||
| 601 | If ACCEPT-SPECIAL is specified we do not ignore special sequences | 599 | If ACCEPT-SPECIAL is specified we do not ignore special sequences |
| 602 | which normally we would ignore when doing a search on many lines. | 600 | which normally we would ignore when doing a search on many lines. |
| 603 | For example, normally we have cases to ignore commonly occuring | 601 | For example, normally we have cases to ignore commonly occurring |
| 604 | patterns, such as :: or ...; with the flag do not ignore them." | 602 | patterns, such as :: or ...; with the flag do not ignore them." |
| 605 | (save-excursion | 603 | (save-excursion |
| 606 | (back-to-indentation) | 604 | (back-to-indentation) |
| @@ -632,9 +630,9 @@ See `rst-line-homogeneous-p' about ACCEPT-SPECIAL." | |||
| 632 | 630 | ||
| 633 | (defun rst-compare-decorations (deco1 deco2) | 631 | (defun rst-compare-decorations (deco1 deco2) |
| 634 | "Compare decorations. | 632 | "Compare decorations. |
| 635 | Returns true if both DECO1 and DECO2 decorations are equal, | 633 | Return true if both DECO1 and DECO2 decorations are equal, |
| 636 | according to restructured text semantics (only the character and | 634 | according to restructured text semantics (only the character and |
| 637 | the style are compared, the indentation does not matter." | 635 | the style are compared, the indentation does not matter)." |
| 638 | (and (eq (car deco1) (car deco2)) | 636 | (and (eq (car deco1) (car deco2)) |
| 639 | (eq (cadr deco1) (cadr deco2)))) | 637 | (eq (cadr deco1) (cadr deco2)))) |
| 640 | 638 | ||
| @@ -642,7 +640,7 @@ the style are compared, the indentation does not matter." | |||
| 642 | (defun rst-get-decoration-match (hier deco) | 640 | (defun rst-get-decoration-match (hier deco) |
| 643 | "Return the index (level) in hierarchy HIER of decoration DECO. | 641 | "Return the index (level) in hierarchy HIER of decoration DECO. |
| 644 | This basically just searches for the item using the appropriate | 642 | This basically just searches for the item using the appropriate |
| 645 | comparison and returns the index. We return nil if the item is | 643 | comparison and returns the index. Return nil if the item is |
| 646 | not found." | 644 | not found." |
| 647 | (let ((cur hier)) | 645 | (let ((cur hier)) |
| 648 | (while (and cur (not (rst-compare-decorations (car cur) deco))) | 646 | (while (and cur (not (rst-compare-decorations (car cur) deco))) |
| @@ -653,9 +651,9 @@ not found." | |||
| 653 | (defun rst-suggest-new-decoration (alldecos &optional prev) | 651 | (defun rst-suggest-new-decoration (alldecos &optional prev) |
| 654 | "Suggest a new, different decoration from all that have been seen. | 652 | "Suggest a new, different decoration from all that have been seen. |
| 655 | 653 | ||
| 656 | ALLDECOS is the set of all decorations, including the line | 654 | ALLDECOS is the set of all decorations, including the line numbers. |
| 657 | numbers. PREV is the optional previous decoration, in order to | 655 | PREV is the optional previous decoration, in order to suggest a |
| 658 | suggest a better match." | 656 | better match." |
| 659 | 657 | ||
| 660 | ;; For all the preferred decorations... | 658 | ;; For all the preferred decorations... |
| 661 | (let* ( | 659 | (let* ( |
| @@ -689,10 +687,10 @@ suggest a better match." | |||
| 689 | (defun rst-update-section (char style &optional indent) | 687 | (defun rst-update-section (char style &optional indent) |
| 690 | "Unconditionally update the style of a section decoration. | 688 | "Unconditionally update the style of a section decoration. |
| 691 | 689 | ||
| 692 | Do this using the given character CHAR, with STYLE 'simple or | 690 | Do this using the given character CHAR, with STYLE 'simple |
| 693 | 'over-and-under, and with indent INDENT. If the STYLE is | 691 | or 'over-and-under, and with indent INDENT. If the STYLE |
| 694 | 'simple, whitespace before the title is removed (indent is always | 692 | is 'simple, whitespace before the title is removed (indent |
| 695 | assume to be 0). | 693 | is always assumed to be 0). |
| 696 | 694 | ||
| 697 | If there are existing overline and/or underline from the | 695 | If there are existing overline and/or underline from the |
| 698 | existing decoration, they are removed before adding the | 696 | existing decoration, they are removed before adding the |
| @@ -859,14 +857,14 @@ is one) is not taken into account when building the hierarchy." | |||
| 859 | "Get the decoration at POINT. | 857 | "Get the decoration at POINT. |
| 860 | 858 | ||
| 861 | Looks around point and finds the characteristics of the | 859 | Looks around point and finds the characteristics of the |
| 862 | decoration that is found there. We assume that the cursor is | 860 | decoration that is found there. Assumes that the cursor is |
| 863 | already placed on the title line (and not on the overline or | 861 | already placed on the title line (and not on the overline or |
| 864 | underline). | 862 | underline). |
| 865 | 863 | ||
| 866 | This function returns a (char, style, indent) triple. If the | 864 | This function returns a (char, style, indent) triple. If the |
| 867 | characters of overline and underline are different, we return | 865 | characters of overline and underline are different, return |
| 868 | the underline character. The indent is always calculated. A | 866 | the underline character. The indent is always calculated. |
| 869 | decoration can be said to exist if the style is not nil. | 867 | A decoration can be said to exist if the style is not nil. |
| 870 | 868 | ||
| 871 | A point can be specified to go to the given location before | 869 | A point can be specified to go to the given location before |
| 872 | extracting the decoration." | 870 | extracting the decoration." |
| @@ -925,9 +923,9 @@ extracting the decoration." | |||
| 925 | (defun rst-get-decorations-around (&optional alldecos) | 923 | (defun rst-get-decorations-around (&optional alldecos) |
| 926 | "Return the decorations around point. | 924 | "Return the decorations around point. |
| 927 | 925 | ||
| 928 | Given the list of all decorations ALLDECOS (with positions), find | 926 | Given the list of all decorations ALLDECOS (with positions), |
| 929 | the decorations before and after the given point. A list of the | 927 | find the decorations before and after the given point. |
| 930 | previous and next decorations is returned." | 928 | A list of the previous and next decorations is returned." |
| 931 | (let* ((all (or alldecos (rst-find-all-decorations))) | 929 | (let* ((all (or alldecos (rst-find-all-decorations))) |
| 932 | (curline (line-number-at-pos)) | 930 | (curline (line-number-at-pos)) |
| 933 | prev next | 931 | prev next |
| @@ -947,7 +945,7 @@ previous and next decorations is returned." | |||
| 947 | 945 | ||
| 948 | 946 | ||
| 949 | (defun rst-decoration-complete-p (deco) | 947 | (defun rst-decoration-complete-p (deco) |
| 950 | "Return true if the decoration DECO around POINT is complete." | 948 | "Return true if the decoration DECO around point is complete." |
| 951 | ;; Note: we assume that the detection of the overline as being the underline | 949 | ;; Note: we assume that the detection of the overline as being the underline |
| 952 | ;; of a preceding title has already been detected, and has been eliminated | 950 | ;; of a preceding title has already been detected, and has been eliminated |
| 953 | ;; from the decoration that is given to us. | 951 | ;; from the decoration that is given to us. |
| @@ -1082,8 +1080,8 @@ This function is meant to be invoked possibly multiple times, and | |||
| 1082 | can vary its behavior with a true TOGGLE-STYLE argument, or with | 1080 | can vary its behavior with a true TOGGLE-STYLE argument, or with |
| 1083 | a REVERSE-DIRECTION argument. | 1081 | a REVERSE-DIRECTION argument. |
| 1084 | 1082 | ||
| 1085 | General Behaviour | 1083 | General Behavior |
| 1086 | ================= | 1084 | ================ |
| 1087 | 1085 | ||
| 1088 | The next action it takes depends on context around the point, and | 1086 | The next action it takes depends on context around the point, and |
| 1089 | it is meant to be invoked possibly more than once to rotate among | 1087 | it is meant to be invoked possibly more than once to rotate among |
| @@ -1121,8 +1119,8 @@ The decorations consist in | |||
| 1121 | See source code for mode details. | 1119 | See source code for mode details. |
| 1122 | 1120 | ||
| 1123 | 1121 | ||
| 1124 | Detailed Behaviour Description | 1122 | Detailed Behavior Description |
| 1125 | ============================== | 1123 | ============================= |
| 1126 | 1124 | ||
| 1127 | Here are the gory details of the algorithm (it seems quite | 1125 | Here are the gory details of the algorithm (it seems quite |
| 1128 | complicated, but really, it does the most obvious thing in all | 1126 | complicated, but really, it does the most obvious thing in all |
| @@ -1183,7 +1181,7 @@ of those decoration that has not been seen in the file yet (and | |||
| 1183 | not including the decoration around point), and the next | 1181 | not including the decoration around point), and the next |
| 1184 | invocation rolls over to the other end of the hierarchy (i.e. it | 1182 | invocation rolls over to the other end of the hierarchy (i.e. it |
| 1185 | cycles). This allows you to avoid having to set which character | 1183 | cycles). This allows you to avoid having to set which character |
| 1186 | to use by always using the | 1184 | to use. |
| 1187 | 1185 | ||
| 1188 | If REVERSE-DIRECTION is true, the effect is to change the | 1186 | If REVERSE-DIRECTION is true, the effect is to change the |
| 1189 | direction of rotation in the hierarchy of decorations, thus | 1187 | direction of rotation in the hierarchy of decorations, thus |
| @@ -1212,7 +1210,7 @@ Indented section titles such as :: | |||
| 1212 | My Title | 1210 | My Title |
| 1213 | -------- | 1211 | -------- |
| 1214 | 1212 | ||
| 1215 | are illegal in restructuredtext and thus not recognized by the | 1213 | are invalid in restructuredtext and thus not recognized by the |
| 1216 | parser. This code will thus not work in a way that would support | 1214 | parser. This code will thus not work in a way that would support |
| 1217 | indented sections (it would be ambiguous anyway). | 1215 | indented sections (it would be ambiguous anyway). |
| 1218 | 1216 | ||
| @@ -1533,9 +1531,9 @@ is a regular expression for matching the lines with items." | |||
| 1533 | (format "\\([%s][ \t]\\)[^ \t]" (regexp-quote (concat rst-bullets))) | 1531 | (format "\\([%s][ \t]\\)[^ \t]" (regexp-quote (concat rst-bullets))) |
| 1534 | "Regexp for finding bullets.") | 1532 | "Regexp for finding bullets.") |
| 1535 | 1533 | ||
| 1536 | (defvar rst-re-enumerations | 1534 | ;; (defvar rst-re-enumerations |
| 1537 | "\\(\\(#\\|[0-9]+\\)\\.[ \t]\\)[^ \t]" | 1535 | ;; "\\(\\(#\\|[0-9]+\\)\\.[ \t]\\)[^ \t]" |
| 1538 | "Regexp for finding bullets.") | 1536 | ;; "Regexp for finding bullets.") |
| 1539 | 1537 | ||
| 1540 | (defvar rst-re-items | 1538 | (defvar rst-re-items |
| 1541 | (format "\\(%s\\|%s\\)[^ \t]" | 1539 | (format "\\(%s\\|%s\\)[^ \t]" |
| @@ -1610,7 +1608,7 @@ string and a marker to the section in the original text document. | |||
| 1610 | If there are missing section levels, the section titles are | 1608 | If there are missing section levels, the section titles are |
| 1611 | inserted automatically, and the title string is set to nil, and | 1609 | inserted automatically, and the title string is set to nil, and |
| 1612 | the marker set to the first non-nil child of itself. | 1610 | the marker set to the first non-nil child of itself. |
| 1613 | Conceptually, the nil nodes--i.e. those which have no title--are | 1611 | Conceptually, the nil nodes--i.e. those which have no title--are |
| 1614 | to be considered as being the same line as their first non-nil | 1612 | to be considered as being the same line as their first non-nil |
| 1615 | child. This has advantages later in processing the graph." | 1613 | child. This has advantages later in processing the graph." |
| 1616 | 1614 | ||
| @@ -1684,9 +1682,9 @@ POINT (default being the current point in the current buffer), | |||
| 1684 | find and return the node within the sectree where the cursor | 1682 | find and return the node within the sectree where the cursor |
| 1685 | lives. | 1683 | lives. |
| 1686 | 1684 | ||
| 1687 | Return values: a pair of (parent path, container subtree). The | 1685 | Return values: a pair of (parent path, container subtree). |
| 1688 | parent path is simply a list of the nodes above the container | 1686 | The parent path is simply a list of the nodes above the |
| 1689 | subtree node that we're returning." | 1687 | container subtree node that we're returning." |
| 1690 | 1688 | ||
| 1691 | (let (path outtree) | 1689 | (let (path outtree) |
| 1692 | 1690 | ||
| @@ -1789,11 +1787,11 @@ The TOC is inserted indented at the current column." | |||
| 1789 | 1787 | ||
| 1790 | (defun rst-toc-insert-node (node level indent pfx) | 1788 | (defun rst-toc-insert-node (node level indent pfx) |
| 1791 | "Insert tree node NODE in table-of-contents. | 1789 | "Insert tree node NODE in table-of-contents. |
| 1792 | Recursive function that does printing of the inserted toc. LEVEL | 1790 | Recursive function that does printing of the inserted toc. |
| 1793 | is the depth level of the sections in the tree. INDENT bis the | 1791 | LEVEL is the depth level of the sections in the tree. |
| 1794 | indentation string. PFX is the prefix numbering, that includes | 1792 | INDENT is the indentation string. PFX is the prefix numbering, |
| 1795 | the alignment necessary for all the children of level to | 1793 | that includes the alignment necessary for all the children of |
| 1796 | align." | 1794 | level to align." |
| 1797 | 1795 | ||
| 1798 | ;; Note: we do child numbering from the parent, so we start number the | 1796 | ;; Note: we do child numbering from the parent, so we start number the |
| 1799 | ;; children one level before we print them. | 1797 | ;; children one level before we print them. |
| @@ -1864,7 +1862,7 @@ align." | |||
| 1864 | 1862 | ||
| 1865 | 1863 | ||
| 1866 | (defun rst-toc-insert-find-delete-contents () | 1864 | (defun rst-toc-insert-find-delete-contents () |
| 1867 | "Find and deletes an existing comment after the first contents directive. | 1865 | "Find and delete an existing comment after the first contents directive. |
| 1868 | Delete that region. Return t if found and the cursor is left after the comment." | 1866 | Delete that region. Return t if found and the cursor is left after the comment." |
| 1869 | (goto-char (point-min)) | 1867 | (goto-char (point-min)) |
| 1870 | ;; We look for the following and the following only (in other words, if your | 1868 | ;; We look for the following and the following only (in other words, if your |
| @@ -1955,8 +1953,8 @@ file-write hook to always make it up-to-date automatically." | |||
| 1955 | (defun rst-toc-count-lines (node target-node) | 1953 | (defun rst-toc-count-lines (node target-node) |
| 1956 | "Count the number of lines from NODE to the TARGET-NODE node. | 1954 | "Count the number of lines from NODE to the TARGET-NODE node. |
| 1957 | This recursive function returns a cons of the number of | 1955 | This recursive function returns a cons of the number of |
| 1958 | additional lines that have been counted for its node and children | 1956 | additional lines that have been counted for its node and |
| 1959 | and 't if the node has been found." | 1957 | children, and t if the node has been found." |
| 1960 | 1958 | ||
| 1961 | (let ((count 1) | 1959 | (let ((count 1) |
| 1962 | found) | 1960 | found) |
| @@ -2045,7 +2043,7 @@ brings the cursor in that section." | |||
| 2045 | (recenter 5))) | 2043 | (recenter 5))) |
| 2046 | 2044 | ||
| 2047 | (defun rst-toc-mode-goto-section () | 2045 | (defun rst-toc-mode-goto-section () |
| 2048 | "Go to the section the current line describes and kill the toc buffer." | 2046 | "Go to the section the current line describes and kill the TOC buffer." |
| 2049 | (interactive) | 2047 | (interactive) |
| 2050 | (rst-goto-section t)) | 2048 | (rst-goto-section t)) |
| 2051 | 2049 | ||
| @@ -2575,7 +2573,7 @@ With prefix argument set the empty lines too." | |||
| 2575 | 2573 | ||
| 2576 | (require 'font-lock) | 2574 | (require 'font-lock) |
| 2577 | 2575 | ||
| 2578 | (defgroup rst-faces nil "Faces used in Rst Mode" | 2576 | (defgroup rst-faces nil "Faces used in Rst Mode." |
| 2579 | :group 'rst | 2577 | :group 'rst |
| 2580 | :group 'faces | 2578 | :group 'faces |
| 2581 | :version "21.1") | 2579 | :version "21.1") |
| @@ -2668,7 +2666,7 @@ general but you do not like the details." | |||
| 2668 | :set 'rst-set-level-default) | 2666 | :set 'rst-set-level-default) |
| 2669 | (defcustom rst-level-face-base-color "grey" | 2667 | (defcustom rst-level-face-base-color "grey" |
| 2670 | "The base name of the color to be used for creating background colors in | 2668 | "The base name of the color to be used for creating background colors in |
| 2671 | ection title faces for all levels." | 2669 | section title faces for all levels." |
| 2672 | :group 'rst-faces-defaults | 2670 | :group 'rst-faces-defaults |
| 2673 | :type '(string) | 2671 | :type '(string) |
| 2674 | :set 'rst-set-level-default) | 2672 | :set 'rst-set-level-default) |
| @@ -2759,7 +2757,7 @@ details check the Rst Faces Defaults group." | |||
| 2759 | "Non-nil if we can use the character classes in our regexps.") | 2757 | "Non-nil if we can use the character classes in our regexps.") |
| 2760 | 2758 | ||
| 2761 | (defun rst-font-lock-keywords-function () | 2759 | (defun rst-font-lock-keywords-function () |
| 2762 | "Return keywords to highlight in rst mode according to current settings." | 2760 | "Return keywords to highlight in Rst mode according to current settings." |
| 2763 | ;; The reST-links in the comments below all relate to sections in | 2761 | ;; The reST-links in the comments below all relate to sections in |
| 2764 | ;; http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html | 2762 | ;; http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html |
| 2765 | (let* ( ;; This gets big - so let's define some abbreviations | 2763 | (let* ( ;; This gets big - so let's define some abbreviations |
| @@ -3057,8 +3055,8 @@ point is not moved." | |||
| 3057 | ;; Adornments | 3055 | ;; Adornments |
| 3058 | 3056 | ||
| 3059 | (defvar rst-font-lock-adornment-point nil | 3057 | (defvar rst-font-lock-adornment-point nil |
| 3060 | "Stores the point where the current adornment ends. Also used as a trigger | 3058 | "Stores the point where the current adornment ends. |
| 3061 | for `rst-font-lock-handle-adornment'.") | 3059 | Also used as a trigger for `rst-font-lock-handle-adornment'.") |
| 3062 | 3060 | ||
| 3063 | ;; Here `rst-font-lock-handle-adornment' stores the section level of the | 3061 | ;; Here `rst-font-lock-handle-adornment' stores the section level of the |
| 3064 | ;; current adornment or t for a transition. | 3062 | ;; current adornment or t for a transition. |