aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2008-07-03 15:18:32 +0000
committerJuanma Barranquero2008-07-03 15:18:32 +0000
commit92439579f3a00655358f48ea64b8fb142bfda1b6 (patch)
tree7cc696b514cdca4b976905ac56b5a0734ca48777
parent10545bd83d3b5c7f6082d56a59449ff1eddae2ff (diff)
downloademacs-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/ChangeLog25
-rw-r--r--lisp/ChangeLog.72
-rw-r--r--lisp/eshell/esh-arg.el10
-rw-r--r--lisp/textmodes/fill.el16
-rw-r--r--lisp/textmodes/rst.el124
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 @@
12008-07-03 Juanma Barranquero <lekktu@gmail.com> 12008-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
22971998-06-09 Richard Stallman <rms@psilocin.ai.mit.edu> 22971998-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.
105When each function on this hook is called, point will be at the 105When each function on this hook is called, point will be at the
106current position within the argument list. The function should either 106current position within the argument list. The function should either
107return nil, meaning that it did no argument parsing, or it should 107return 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.
139Without escaping them, they will introduce a change in the argument." 139Without 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.
283If the character is itself a backslash, it needs no escaping." 283If 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'.
38Non-nil means changing indent doesn't end a paragraph. 38Non-nil means changing indent doesn't end a paragraph.
39That mode can handle paragraphs with extra indentation on the first line, 39That mode can handle paragraphs with extra indentation on the first line,
40but it requires separator lines between paragraphs. 40but 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.
64Kinsoku processing is designed to prevent certain characters from being 64Kinsoku processing is designed to prevent certain characters from being
65placed at the beginning or end of a line by filling. 65placed at the beginning or end of a line by filling.
66See the documentation of `kinsoku' for more information." 66See 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.
97If Adaptive Fill mode is enabled, a prefix matching this pattern 97If Adaptive Fill mode is enabled, a prefix matching this pattern
98on the first and second lines of a paragraph is used as the 98on the first and second lines of a paragraph is used as the
99standard indentation for the whole paragraph. 99standard 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.
109When a paragraph has just one line, then after `adaptive-fill-regexp' 109When a paragraph has just one line, then after `adaptive-fill-regexp'
110finds the prefix at the beginning of the line, if it doesn't 110finds the prefix at the beginning of the line, if it doesn't
111match this regexp, it is replaced with whitespace. 111match this regexp, it is replaced with whitespace.
@@ -773,7 +773,7 @@ left to move.")
773If JUSTIFY is non-nil (interactively, with prefix argument), justify as well. 773If JUSTIFY is non-nil (interactively, with prefix argument), justify as well.
774If `sentence-end-double-space' is non-nil, then period followed by one 774If `sentence-end-double-space' is non-nil, then period followed by one
775space does not end a sentence, so don't break a line there. 775space does not end a sentence, so don't break a line there.
776the variable `fill-column' controls the width for filling. 776The variable `fill-column' controls the width for filling.
777 777
778If `fill-paragraph-function' is non-nil, we call it (passing our 778If `fill-paragraph-function' is non-nil, we call it (passing our
779argument to it), and if it returns non-nil, we simply return its value. 779argument 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.
1047Possible values are `left', `right', `full', `center', or `none'. 1047Possible values are `left', `right', `full', `center', or `none'.
1048The requested kind of justification is done whenever lines are filled. 1048The requested kind of justification is done whenever lines are filled.
1049The `justification' text-property can locally override this variable." 1049The `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.
355Because this is really slow it should be set to nil if neither `jit-lock-mode' 355Because this is really slow it should be set to nil if neither `jit-lock-mode'
356not `lazy-lock-mode' and activated. 356not `lazy-lock-mode' and activated.
357 357
358If nil, comments and literal blocks are font-locked only on the line they start. 358If nil, comments and literal blocks are font-locked only on the line they start.
359 359
360The value of this variable is used when Rst Mode is turned on." 360The 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
371There are a number of convenient keybindings provided by 371There are a number of convenient keybindings provided by
372rst-mode. The main one is \[rst-adjust\], it updates or rotates 372Rst mode. The main one is \\[rst-adjust\], it updates or rotates
373the section title around point or promotes/demotes the 373the section title around point or promotes/demotes the
374decorations within the region (see full details below). Use 374decorations within the region (see full details below).
375negative prefix arg to rotate in the other direction. 375Use negative prefix arg to rotate in the other direction.
376\\{rst-mode-map} 376\\{rst-mode-map}
377 377
378Turning on `rst-mode' calls the normal hooks `text-mode-hook' and 378Turning on `rst-mode' calls the normal hooks `text-mode-hook' and
@@ -448,10 +448,9 @@ With no argument, this command toggles the mode.
448Non-null prefix argument turns on the mode. 448Non-null prefix argument turns on the mode.
449Null prefix argument turns off the mode. 449Null prefix argument turns off the mode.
450 450
451When ReST minor mode is enabled, the ReST mode 451When ReST minor mode is enabled, the ReST mode keybindings
452keybindings are installed on top of the major 452are installed on top of the major mode bindings. Use this
453mode bindings. Use this for modes derived from 453for modes derived from Text mode, like Mail mode."
454text-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."
559decorations."
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
583THis is used for when toggling decoration styles, when switching 581This is used for when toggling decoration styles, when switching
584from a simple decoration style to a over-and-under decoration 582from a simple decoration style to a over-and-under decoration
585style." 583style."
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
596Predicate that returns the unique char if the current line is 594Predicate that returns the unique char if the current line is
597composed only of a single repeated non-whitespace character. This 595composed only of a single repeated non-whitespace character.
598returns the char even if there is whitespace at the beginning of 596This returns the char even if there is whitespace at the
599the line. 597beginning of the line.
600 598
601If ACCEPT-SPECIAL is specified we do not ignore special sequences 599If ACCEPT-SPECIAL is specified we do not ignore special sequences
602which normally we would ignore when doing a search on many lines. 600which normally we would ignore when doing a search on many lines.
603For example, normally we have cases to ignore commonly occuring 601For example, normally we have cases to ignore commonly occurring
604patterns, such as :: or ...; with the flag do not ignore them." 602patterns, 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.
635Returns true if both DECO1 and DECO2 decorations are equal, 633Return true if both DECO1 and DECO2 decorations are equal,
636according to restructured text semantics (only the character and 634according to restructured text semantics (only the character and
637the style are compared, the indentation does not matter." 635the 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.
644This basically just searches for the item using the appropriate 642This basically just searches for the item using the appropriate
645comparison and returns the index. We return nil if the item is 643comparison and returns the index. Return nil if the item is
646not found." 644not 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
656ALLDECOS is the set of all decorations, including the line 654ALLDECOS is the set of all decorations, including the line numbers.
657numbers. PREV is the optional previous decoration, in order to 655PREV is the optional previous decoration, in order to suggest a
658suggest a better match." 656better 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
692Do this using the given character CHAR, with STYLE 'simple or 690Do this using the given character CHAR, with STYLE 'simple
693'over-and-under, and with indent INDENT. If the STYLE is 691or 'over-and-under, and with indent INDENT. If the STYLE
694'simple, whitespace before the title is removed (indent is always 692is 'simple, whitespace before the title is removed (indent
695assume to be 0). 693is always assumed to be 0).
696 694
697If there are existing overline and/or underline from the 695If there are existing overline and/or underline from the
698existing decoration, they are removed before adding the 696existing 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
861Looks around point and finds the characteristics of the 859Looks around point and finds the characteristics of the
862decoration that is found there. We assume that the cursor is 860decoration that is found there. Assumes that the cursor is
863already placed on the title line (and not on the overline or 861already placed on the title line (and not on the overline or
864underline). 862underline).
865 863
866This function returns a (char, style, indent) triple. If the 864This function returns a (char, style, indent) triple. If the
867characters of overline and underline are different, we return 865characters of overline and underline are different, return
868the underline character. The indent is always calculated. A 866the underline character. The indent is always calculated.
869decoration can be said to exist if the style is not nil. 867A decoration can be said to exist if the style is not nil.
870 868
871A point can be specified to go to the given location before 869A point can be specified to go to the given location before
872extracting the decoration." 870extracting 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
928Given the list of all decorations ALLDECOS (with positions), find 926Given the list of all decorations ALLDECOS (with positions),
929the decorations before and after the given point. A list of the 927find the decorations before and after the given point.
930previous and next decorations is returned." 928A 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
1082can vary its behavior with a true TOGGLE-STYLE argument, or with 1080can vary its behavior with a true TOGGLE-STYLE argument, or with
1083a REVERSE-DIRECTION argument. 1081a REVERSE-DIRECTION argument.
1084 1082
1085General Behaviour 1083General Behavior
1086================= 1084================
1087 1085
1088The next action it takes depends on context around the point, and 1086The next action it takes depends on context around the point, and
1089it is meant to be invoked possibly more than once to rotate among 1087it is meant to be invoked possibly more than once to rotate among
@@ -1121,8 +1119,8 @@ The decorations consist in
1121See source code for mode details. 1119See source code for mode details.
1122 1120
1123 1121
1124Detailed Behaviour Description 1122Detailed Behavior Description
1125============================== 1123=============================
1126 1124
1127Here are the gory details of the algorithm (it seems quite 1125Here are the gory details of the algorithm (it seems quite
1128complicated, but really, it does the most obvious thing in all 1126complicated, 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
1183not including the decoration around point), and the next 1181not including the decoration around point), and the next
1184invocation rolls over to the other end of the hierarchy (i.e. it 1182invocation rolls over to the other end of the hierarchy (i.e. it
1185cycles). This allows you to avoid having to set which character 1183cycles). This allows you to avoid having to set which character
1186to use by always using the 1184to use.
1187 1185
1188If REVERSE-DIRECTION is true, the effect is to change the 1186If REVERSE-DIRECTION is true, the effect is to change the
1189direction of rotation in the hierarchy of decorations, thus 1187direction 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
1215are illegal in restructuredtext and thus not recognized by the 1213are invalid in restructuredtext and thus not recognized by the
1216parser. This code will thus not work in a way that would support 1214parser. This code will thus not work in a way that would support
1217indented sections (it would be ambiguous anyway). 1215indented 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.
1610If there are missing section levels, the section titles are 1608If there are missing section levels, the section titles are
1611inserted automatically, and the title string is set to nil, and 1609inserted automatically, and the title string is set to nil, and
1612the marker set to the first non-nil child of itself. 1610the marker set to the first non-nil child of itself.
1613Conceptually, the nil nodes--i.e. those which have no title--are 1611Conceptually, the nil nodes--i.e. those which have no title--are
1614to be considered as being the same line as their first non-nil 1612to be considered as being the same line as their first non-nil
1615child. This has advantages later in processing the graph." 1613child. This has advantages later in processing the graph."
1616 1614
@@ -1684,9 +1682,9 @@ POINT (default being the current point in the current buffer),
1684find and return the node within the sectree where the cursor 1682find and return the node within the sectree where the cursor
1685lives. 1683lives.
1686 1684
1687Return values: a pair of (parent path, container subtree). The 1685Return values: a pair of (parent path, container subtree).
1688parent path is simply a list of the nodes above the container 1686The parent path is simply a list of the nodes above the
1689subtree node that we're returning." 1687container 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.
1792Recursive function that does printing of the inserted toc. LEVEL 1790Recursive function that does printing of the inserted toc.
1793is the depth level of the sections in the tree. INDENT bis the 1791LEVEL is the depth level of the sections in the tree.
1794indentation string. PFX is the prefix numbering, that includes 1792INDENT is the indentation string. PFX is the prefix numbering,
1795the alignment necessary for all the children of level to 1793that includes the alignment necessary for all the children of
1796align." 1794level 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.
1868Delete that region. Return t if found and the cursor is left after the comment." 1866Delete 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.
1957This recursive function returns a cons of the number of 1955This recursive function returns a cons of the number of
1958additional lines that have been counted for its node and children 1956additional lines that have been counted for its node and
1959and 't if the node has been found." 1957children, 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
2671ection title faces for all levels." 2669section 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.
3061for `rst-font-lock-handle-adornment'.") 3059Also 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.