2008-06-20 16:00:33 +00:00
|
|
|
|
;;; rst.el --- Mode for viewing and editing reStructuredText-documents.
|
|
|
|
|
|
2012-01-05 09:46:05 +00:00
|
|
|
|
;; Copyright (C) 2003-2012 Free Software Foundation, Inc.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Maintainer: Stefan Merten <smerten@oekonux.de>
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Author: Stefan Merten <smerten@oekonux.de>,
|
|
|
|
|
;; Martin Blais <blais@furius.ca>,
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; David Goodger <goodger@python.org>,
|
|
|
|
|
;; Wei-Wei Guo <wwguocn@gmail.com>
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; This package provides major mode rst-mode, which supports documents marked
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; up using the reStructuredText format. Support includes font locking as well
|
|
|
|
|
;; as a lot of convenience functions for editing. It does this by defining a
|
|
|
|
|
;; Emacs major mode: rst-mode (ReST). This mode is derived from text-mode.
|
|
|
|
|
;; This package also contains:
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
|
|
|
|
;; - Functions to automatically adjust and cycle the section underline
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; adornments;
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; - A mode that displays the table of contents and allows you to jump anywhere
|
|
|
|
|
;; from it;
|
|
|
|
|
;; - Functions to insert and automatically update a TOC in your source
|
|
|
|
|
;; document;
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; - Function to insert list, processing item bullets and enumerations
|
|
|
|
|
;; automatically;
|
|
|
|
|
;; - Font-lock highlighting of most reStructuredText structures;
|
|
|
|
|
;; - Indentation and filling according to reStructuredText syntax;
|
|
|
|
|
;; - Cursor movement according to reStructuredText syntax;
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; - Some other convenience functions.
|
|
|
|
|
;;
|
|
|
|
|
;; See the accompanying document in the docutils documentation about
|
|
|
|
|
;; the contents of this package and how to use it.
|
|
|
|
|
;;
|
|
|
|
|
;; For more information about reStructuredText, see
|
|
|
|
|
;; http://docutils.sourceforge.net/rst.html
|
|
|
|
|
;;
|
|
|
|
|
;; For full details on how to use the contents of this file, see
|
|
|
|
|
;; http://docutils.sourceforge.net/docs/user/emacs.html
|
|
|
|
|
;;
|
|
|
|
|
;;
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; There are a number of convenient key bindings provided by rst-mode.
|
2008-06-20 17:53:42 +00:00
|
|
|
|
;; For more on bindings, see rst-mode-map below. There are also many variables
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; that can be customized, look for defcustom in this file.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
|
|
|
|
;; If you use the table-of-contents feature, you may want to add a hook to
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; update the TOC automatically every time you adjust a section title::
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
|
|
|
|
;; (add-hook 'rst-adjust-hook 'rst-toc-update)
|
|
|
|
|
;;
|
2008-06-20 17:53:42 +00:00
|
|
|
|
;; Syntax highlighting: font-lock is enabled by default. If you want to turn
|
|
|
|
|
;; off syntax highlighting to rst-mode, you can use the following::
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
|
|
|
|
;; (setq font-lock-global-modes '(not rst-mode ...))
|
|
|
|
|
;;
|
|
|
|
|
;;
|
|
|
|
|
;;
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Customization is done by customizable variables contained in customization
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; group "rst" and subgroups. Group "rst" is contained in the "wp" group.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
;;; DOWNLOAD
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; The latest release of this file lies in the docutils source code repository:
|
|
|
|
|
;; http://docutils.svn.sourceforge.net/svnroot/docutils/trunk/docutils/tools/editors/emacs/rst.el
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;;; INSTALLATION
|
|
|
|
|
|
|
|
|
|
;; Add the following lines to your `.emacs' file:
|
|
|
|
|
;;
|
|
|
|
|
;; (require 'rst)
|
|
|
|
|
;;
|
|
|
|
|
;; If you are using `.txt' as a standard extension for reST files as
|
|
|
|
|
;; http://docutils.sourceforge.net/FAQ.html#what-s-the-standard-filename-extension-for-a-restructuredtext-file
|
|
|
|
|
;; suggests you may use one of the `Local Variables in Files' mechanism Emacs
|
2008-06-20 17:53:42 +00:00
|
|
|
|
;; provides to set the major mode automatically. For instance you may use::
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
|
|
|
|
;; .. -*- mode: rst -*-
|
|
|
|
|
;;
|
2008-06-20 17:53:42 +00:00
|
|
|
|
;; in the very first line of your file. The following code is useful if you
|
|
|
|
|
;; want automatically enter rst-mode from any file with compatible extensions:
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
|
|
|
|
;; (setq auto-mode-alist
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; (append '(("\\.txt\\'" . rst-mode)
|
|
|
|
|
;; ("\\.rst\\'" . rst-mode)
|
|
|
|
|
;; ("\\.rest\\'" . rst-mode)) auto-mode-alist))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;;; Code:
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-06-02 09:43:51 +00:00
|
|
|
|
;; FIXME: Use `eval-when-compile' when calls to `some', `position', `signum'
|
|
|
|
|
;; and `position-if' are replaced.
|
|
|
|
|
(require 'cl)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; Versions
|
|
|
|
|
|
|
|
|
|
(defun rst-extract-version (delim-re head-re re tail-re var &optional default)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Extract the version from a variable according to the given regexes.
|
|
|
|
|
Return the version after regex DELIM-RE and HEAD-RE matching RE
|
|
|
|
|
and before TAIL-RE and DELIM-RE in VAR or DEFAULT for no match."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (string-match
|
|
|
|
|
(concat delim-re head-re "\\(" re "\\)" tail-re delim-re)
|
|
|
|
|
var)
|
|
|
|
|
(match-string 1 var)
|
|
|
|
|
default))
|
|
|
|
|
|
|
|
|
|
;; Use CVSHeader to really get information from CVS and not other version
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; control systems.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defconst rst-cvs-header
|
2012-06-02 09:43:51 +00:00
|
|
|
|
"$CVSHeader: sm/rst_el/rst.el,v 1.257.2.10 2012-06-02 09:38:40 stefan Exp $")
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defconst rst-cvs-rev
|
|
|
|
|
(rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+"
|
|
|
|
|
" .*" rst-cvs-header "0.0")
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"The CVS revision of this file. CVS revision is the development revision.")
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defconst rst-cvs-timestamp
|
|
|
|
|
(rst-extract-version "\\$" "CVSHeader: \\S + \\S + "
|
|
|
|
|
"[0-9]+-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+" " .*"
|
|
|
|
|
rst-cvs-header "1970-01-01 00:00:00")
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"The CVS time stamp of this file.")
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Use LastChanged... to really get information from SVN.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defconst rst-svn-rev
|
|
|
|
|
(rst-extract-version "\\$" "LastChangedRevision: " "[0-9]+" " "
|
|
|
|
|
"$LastChangedRevision: 7399 $")
|
|
|
|
|
"The SVN revision of this file.
|
|
|
|
|
SVN revision is the upstream (docutils) revision.")
|
|
|
|
|
(defconst rst-svn-timestamp
|
|
|
|
|
(rst-extract-version "\\$" "LastChangedDate: " ".+?+" " "
|
|
|
|
|
"$LastChangedDate: 2012-04-29 17:01:05 +0200 (Sun, 29 Apr 2012) $")
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"The SVN time stamp of this file.")
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Maintained by the release process.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defconst rst-official-version
|
|
|
|
|
(rst-extract-version "%" "OfficialVersion: " "[0-9]+\\(?:\\.[0-9]+\\)+" " "
|
|
|
|
|
"%OfficialVersion: 1.2.1 %")
|
|
|
|
|
"Official version of the package.")
|
|
|
|
|
(defconst rst-official-cvs-rev
|
|
|
|
|
(rst-extract-version "[%$]" "Revision: " "[0-9]+\\(?:\\.[0-9]+\\)+" " "
|
|
|
|
|
"%Revision: 1.256 %")
|
|
|
|
|
"CVS revision of this file in the official version.")
|
|
|
|
|
|
|
|
|
|
(defconst rst-version
|
|
|
|
|
(if (equal rst-official-cvs-rev rst-cvs-rev)
|
|
|
|
|
rst-official-version
|
|
|
|
|
(format "%s (development %s [%s])" rst-official-version
|
|
|
|
|
rst-cvs-rev rst-cvs-timestamp))
|
|
|
|
|
"The version string.
|
2012-05-29 20:14:18 +00:00
|
|
|
|
Starts with the current official version. For developer versions
|
|
|
|
|
in parentheses follows the development revision and the time stamp.")
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
(defconst rst-package-emacs-version-alist
|
|
|
|
|
'(("1.0.0" . "24.0")
|
|
|
|
|
("1.1.0" . "24.0")
|
|
|
|
|
("1.2.0" . "24.0")
|
|
|
|
|
("1.2.1" . "24.0")))
|
|
|
|
|
|
|
|
|
|
(unless (assoc rst-official-version rst-package-emacs-version-alist)
|
|
|
|
|
(error "Version %s not listed in `rst-package-emacs-version-alist'"
|
|
|
|
|
rst-version))
|
|
|
|
|
|
|
|
|
|
(add-to-list 'customize-package-emacs-version-alist
|
|
|
|
|
(cons 'ReST rst-package-emacs-version-alist))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; Initialize customization
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
(defgroup rst nil "Support for reStructuredText documents."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'wp
|
|
|
|
|
:version "23.1"
|
|
|
|
|
:link '(url-link "http://docutils.sourceforge.net/rst.html"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Facilities for regular expressions used everywhere
|
|
|
|
|
|
|
|
|
|
;; The trailing numbers in the names give the number of referenceable regex
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; groups contained in the regex.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Used to be customizable but really is not customizable but fixed by the reST
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; syntax.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defconst rst-bullets
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Sorted so they can form a character class when concatenated.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
'(?- ?* ?+ ?\u2022 ?\u2023 ?\u2043)
|
|
|
|
|
"List of all possible bullet characters for bulleted lists.")
|
|
|
|
|
|
|
|
|
|
(defconst rst-uri-schemes
|
|
|
|
|
'("acap" "cid" "data" "dav" "fax" "file" "ftp" "gopher" "http" "https" "imap"
|
|
|
|
|
"ldap" "mailto" "mid" "modem" "news" "nfs" "nntp" "pop" "prospero" "rtsp"
|
|
|
|
|
"service" "sip" "tel" "telnet" "tip" "urn" "vemmi" "wais")
|
|
|
|
|
"Supported URI schemes.")
|
|
|
|
|
|
|
|
|
|
(defconst rst-adornment-chars
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Sorted so they can form a character class when concatenated.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
'(?\]
|
|
|
|
|
?! ?\" ?# ?$ ?% ?& ?' ?\( ?\) ?* ?+ ?, ?. ?/ ?: ?\; ?< ?= ?> ?? ?@ ?\[ ?\\
|
|
|
|
|
?^ ?_ ?` ?{ ?| ?} ?~
|
|
|
|
|
?-)
|
|
|
|
|
"Characters which may be used in adornments for sections and transitions.")
|
|
|
|
|
|
|
|
|
|
(defconst rst-max-inline-length
|
|
|
|
|
1000
|
|
|
|
|
"Maximum length of inline markup to recognize.")
|
|
|
|
|
|
|
|
|
|
(defconst rst-re-alist-def
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; `*-beg' matches * at the beginning of a line.
|
|
|
|
|
;; `*-end' matches * at the end of a line.
|
|
|
|
|
;; `*-prt' matches a part of *.
|
|
|
|
|
;; `*-tag' matches *.
|
|
|
|
|
;; `*-sta' matches the start of * which may be followed by respective content.
|
|
|
|
|
;; `*-pfx' matches the delimiter left of *.
|
|
|
|
|
;; `*-sfx' matches the delimiter right of *.
|
|
|
|
|
;; `*-hlp' helper for *.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;;
|
|
|
|
|
;; A trailing number says how many referenceable groups are contained.
|
|
|
|
|
`(
|
|
|
|
|
|
|
|
|
|
;; Horizontal white space (`hws')
|
|
|
|
|
(hws-prt "[\t ]")
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(hws-tag hws-prt "*") ; Optional sequence of horizontal white space.
|
|
|
|
|
(hws-sta hws-prt "+") ; Mandatory sequence of horizontal white space.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Lines (`lin')
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(lin-beg "^" hws-tag) ; Beginning of a possibly indented line.
|
|
|
|
|
(lin-end hws-tag "$") ; End of a line with optional trailing white space.
|
|
|
|
|
(linemp-tag "^" hws-tag "$") ; Empty line with optional white space.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Various tags and parts
|
|
|
|
|
(ell-tag "\\.\\.\\.") ; Ellipsis
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(bul-tag ,(concat "[" rst-bullets "]")) ; A bullet.
|
|
|
|
|
(ltr-tag "[a-zA-Z]") ; A letter enumerator tag.
|
|
|
|
|
(num-prt "[0-9]") ; A number enumerator part.
|
|
|
|
|
(num-tag num-prt "+") ; A number enumerator tag.
|
|
|
|
|
(rom-prt "[IVXLCDMivxlcdm]") ; A roman enumerator part.
|
|
|
|
|
(rom-tag rom-prt "+") ; A roman enumerator tag.
|
|
|
|
|
(aut-tag "#") ; An automatic enumerator tag.
|
|
|
|
|
(dcl-tag "::") ; Double colon.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Block lead in (`bli')
|
|
|
|
|
(bli-sfx (:alt hws-sta "$")) ; Suffix of a block lead-in with *optional*
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; immediate content.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Various starts
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(bul-sta bul-tag bli-sfx) ; Start of a bulleted item.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Explicit markup tag (`exm')
|
|
|
|
|
(exm-tag "\\.\\.")
|
|
|
|
|
(exm-sta exm-tag hws-sta)
|
|
|
|
|
(exm-beg lin-beg exm-sta)
|
|
|
|
|
|
|
|
|
|
;; Counters in enumerations (`cnt')
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(cntany-tag (:alt ltr-tag num-tag rom-tag aut-tag)) ; An arbitrary counter.
|
|
|
|
|
(cntexp-tag (:alt ltr-tag num-tag rom-tag)) ; An arbitrary explicit counter.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Enumerator (`enm')
|
|
|
|
|
(enmany-tag (:alt
|
|
|
|
|
(:seq cntany-tag "\\.")
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(:seq "(?" cntany-tag ")"))) ; An arbitrary enumerator.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(enmexp-tag (:alt
|
|
|
|
|
(:seq cntexp-tag "\\.")
|
|
|
|
|
(:seq "(?" cntexp-tag ")"))) ; An arbitrary explicit
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; enumerator.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(enmaut-tag (:alt
|
|
|
|
|
(:seq aut-tag "\\.")
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(:seq "(?" aut-tag ")"))) ; An automatic enumerator.
|
|
|
|
|
(enmany-sta enmany-tag bli-sfx) ; An arbitrary enumerator start.
|
|
|
|
|
(enmexp-sta enmexp-tag bli-sfx) ; An arbitrary explicit enumerator start.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(enmexp-beg lin-beg enmexp-sta) ; An arbitrary explicit enumerator start
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; at the beginning of a line.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Items may be enumerated or bulleted (`itm')
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(itmany-tag (:alt enmany-tag bul-tag)) ; An arbitrary item tag.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(itmany-sta-1 (:grp itmany-tag) bli-sfx) ; An arbitrary item start, group
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; is the item tag.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(itmany-beg-1 lin-beg itmany-sta-1) ; An arbitrary item start at the
|
|
|
|
|
; beginning of a line, group is the
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; item tag.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Inline markup (`ilm')
|
|
|
|
|
(ilm-pfx (:alt "^" hws-prt "[-'\"([{<\u2018\u201c\u00ab\u2019/:]"))
|
|
|
|
|
(ilm-sfx (:alt "$" hws-prt "[]-'\")}>\u2019\u201d\u00bb/:.,;!?\\]"))
|
|
|
|
|
|
|
|
|
|
;; Inline markup content (`ilc')
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(ilcsgl-tag "\\S ") ; A single non-white character.
|
|
|
|
|
(ilcast-prt (:alt "[^*\\]" "\\\\.")) ; Part of non-asterisk content.
|
|
|
|
|
(ilcbkq-prt (:alt "[^`\\]" "\\\\.")) ; Part of non-backquote content.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(ilcbkqdef-prt (:alt "[^`\\\n]" "\\\\.")) ; Part of non-backquote
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; definition.
|
|
|
|
|
(ilcbar-prt (:alt "[^|\\]" "\\\\.")) ; Part of non-vertical-bar content.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(ilcbardef-prt (:alt "[^|\\\n]" "\\\\.")) ; Part of non-vertical-bar
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; definition.
|
|
|
|
|
(ilcast-sfx "[^\t *\\]") ; Suffix of non-asterisk content.
|
|
|
|
|
(ilcbkq-sfx "[^\t `\\]") ; Suffix of non-backquote content.
|
|
|
|
|
(ilcbar-sfx "[^\t |\\]") ; Suffix of non-vertical-bar content.
|
|
|
|
|
(ilcrep-hlp ,(format "\\{0,%d\\}" rst-max-inline-length)) ; Repeat count.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(ilcast-tag (:alt ilcsgl-tag
|
|
|
|
|
(:seq ilcsgl-tag
|
|
|
|
|
ilcast-prt ilcrep-hlp
|
2012-05-29 20:14:18 +00:00
|
|
|
|
ilcast-sfx))) ; Non-asterisk content.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(ilcbkq-tag (:alt ilcsgl-tag
|
|
|
|
|
(:seq ilcsgl-tag
|
|
|
|
|
ilcbkq-prt ilcrep-hlp
|
2012-05-29 20:14:18 +00:00
|
|
|
|
ilcbkq-sfx))) ; Non-backquote content.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(ilcbkqdef-tag (:alt ilcsgl-tag
|
|
|
|
|
(:seq ilcsgl-tag
|
|
|
|
|
ilcbkqdef-prt ilcrep-hlp
|
2012-05-29 20:14:18 +00:00
|
|
|
|
ilcbkq-sfx))) ; Non-backquote definition.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(ilcbar-tag (:alt ilcsgl-tag
|
|
|
|
|
(:seq ilcsgl-tag
|
|
|
|
|
ilcbar-prt ilcrep-hlp
|
2012-05-29 20:14:18 +00:00
|
|
|
|
ilcbar-sfx))) ; Non-vertical-bar content.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(ilcbardef-tag (:alt ilcsgl-tag
|
|
|
|
|
(:seq ilcsgl-tag
|
|
|
|
|
ilcbardef-prt ilcrep-hlp
|
2012-05-29 20:14:18 +00:00
|
|
|
|
ilcbar-sfx))) ; Non-vertical-bar definition.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Fields (`fld')
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(fldnam-prt (:alt "[^:\n]" "\\\\:")) ; Part of a field name.
|
|
|
|
|
(fldnam-tag fldnam-prt "+") ; A field name.
|
|
|
|
|
(fld-tag ":" fldnam-tag ":") ; A field marker.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Options (`opt')
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(optsta-tag (:alt "[-+/]" "--")) ; Start of an option.
|
|
|
|
|
(optnam-tag "\\sw" (:alt "-" "\\sw") "*") ; Name of an option.
|
|
|
|
|
(optarg-tag (:shy "[ =]\\S +")) ; Option argument.
|
|
|
|
|
(optsep-tag (:shy "," hws-prt)) ; Separator between options.
|
|
|
|
|
(opt-tag (:shy optsta-tag optnam-tag optarg-tag "?")) ; A complete option.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Footnotes and citations (`fnc')
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(fncnam-prt "[^\]\n]") ; Part of a footnote or citation name.
|
|
|
|
|
(fncnam-tag fncnam-prt "+") ; A footnote or citation name.
|
|
|
|
|
(fnc-tag "\\[" fncnam-tag "]") ; A complete footnote or citation tag.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(fncdef-tag-2 (:grp exm-sta)
|
|
|
|
|
(:grp fnc-tag)) ; A complete footnote or citation definition
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; tag. First group is the explicit markup
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
; start, second group is the footnote /
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; citation tag.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(fnc-sta-2 fncdef-tag-2 bli-sfx) ; Start of a footnote or citation
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; definition. First group is the explicit
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
; markup start, second group is the
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; footnote / citation tag.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Substitutions (`sub')
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(sub-tag "|" ilcbar-tag "|") ; A complete substitution tag.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(subdef-tag "|" ilcbardef-tag "|") ; A complete substitution definition
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; tag.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Symbol (`sym')
|
|
|
|
|
(sym-tag (:shy "\\sw+" (:shy "\\s_\\sw+") "*"))
|
|
|
|
|
|
|
|
|
|
;; URIs (`uri')
|
|
|
|
|
(uri-tag (:alt ,@rst-uri-schemes))
|
|
|
|
|
|
|
|
|
|
;; Adornment (`ado')
|
|
|
|
|
(ado-prt "[" ,(concat rst-adornment-chars) "]")
|
|
|
|
|
(adorep3-hlp "\\{3,\\}") ; There must be at least 3 characters because
|
|
|
|
|
; otherwise explicit markup start would be
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; recognized.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(adorep2-hlp "\\{2,\\}") ; As `adorep3-hlp' but when the first of three
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; characters is matched differently.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(ado-tag-1-1 (:grp ado-prt)
|
|
|
|
|
"\\1" adorep2-hlp) ; A complete adornment, group is the first
|
|
|
|
|
; adornment character and MUST be the FIRST
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; group in the whole expression.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(ado-tag-1-2 (:grp ado-prt)
|
|
|
|
|
"\\2" adorep2-hlp) ; A complete adornment, group is the first
|
|
|
|
|
; adornment character and MUST be the
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; SECOND group in the whole expression.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(ado-beg-2-1 "^" (:grp ado-tag-1-2)
|
|
|
|
|
lin-end) ; A complete adornment line; first group is the whole
|
|
|
|
|
; adornment and MUST be the FIRST group in the whole
|
|
|
|
|
; expression; second group is the first adornment
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; character.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Titles (`ttl')
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(ttl-tag "\\S *\\w\\S *") ; A title text.
|
|
|
|
|
(ttl-beg lin-beg ttl-tag) ; A title text at the beginning of a line.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Directives and substitution definitions (`dir')
|
|
|
|
|
(dir-tag-3 (:grp exm-sta)
|
|
|
|
|
(:grp (:shy subdef-tag hws-sta) "?")
|
|
|
|
|
(:grp sym-tag dcl-tag)) ; A directive or substitution definition
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; tag. First group is explicit markup
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
; start, second group is a possibly
|
|
|
|
|
; empty substitution tag, third group is
|
|
|
|
|
; the directive tag including the double
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; colon.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(dir-sta-3 dir-tag-3 bli-sfx) ; Start of a directive or substitution
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; definition. Groups are as in dir-tag-3.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Literal block (`lit')
|
|
|
|
|
(lit-sta-2 (:grp (:alt "[^.\n]" "\\.[^.\n]") ".*") "?"
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(:grp dcl-tag) "$") ; Start of a literal block. First group is
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
; any text before the double colon tag which
|
|
|
|
|
; may not exist, second group is the double
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; colon tag.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Comments (`cmt')
|
|
|
|
|
(cmt-sta-1 (:grp exm-sta) "[^\[|_\n]"
|
|
|
|
|
(:alt "[^:\n]" (:seq ":" (:alt "[^:\n]" "$")))
|
|
|
|
|
"*$") ; Start of a comment block; first group is explicit markup
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; start.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Paragraphs (`par')
|
|
|
|
|
(par-tag- (:alt itmany-tag fld-tag opt-tag fncdef-tag-2 dir-tag-3 exm-tag)
|
|
|
|
|
) ; Tag at the beginning of a paragraph; there may be groups in
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; certain cases.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
)
|
|
|
|
|
"Definition alist of relevant regexes.
|
|
|
|
|
Each entry consists of the symbol naming the regex and an
|
|
|
|
|
argument list for `rst-re'.")
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: Use `sregex` or `rx` instead of re-inventing the wheel.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-re (&rest args)
|
|
|
|
|
"Interpret ARGS as regular expressions and return a regex string.
|
|
|
|
|
Each element of ARGS may be one of the following:
|
|
|
|
|
|
|
|
|
|
A string which is inserted unchanged.
|
|
|
|
|
|
|
|
|
|
A character which is resolved to a quoted regex.
|
|
|
|
|
|
|
|
|
|
A symbol which is resolved to a string using `rst-re-alist-def'.
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
A list with a keyword in the car. Each element of the cdr of such
|
|
|
|
|
a list is recursively interpreted as ARGS. The results of this
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
interpretation are concatenated according to the keyword.
|
|
|
|
|
|
|
|
|
|
For the keyword `:seq' the results are simply concatenated.
|
|
|
|
|
|
|
|
|
|
For the keyword `:shy' the results are concatenated and
|
|
|
|
|
surrounded by a shy-group (\"\\(?:...\\)\").
|
|
|
|
|
|
|
|
|
|
For the keyword `:alt' the results form an alternative (\"\\|\")
|
|
|
|
|
which is shy-grouped (\"\\(?:...\\)\").
|
|
|
|
|
|
|
|
|
|
For the keyword `:grp' the results are concatenated and form a
|
2012-05-29 20:14:18 +00:00
|
|
|
|
referenceable group (\"\\(...\\)\").
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
After interpretation of ARGS the results are concatenated as for
|
2012-05-29 20:14:18 +00:00
|
|
|
|
`:seq'."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(apply 'concat
|
|
|
|
|
(mapcar
|
|
|
|
|
(lambda (re)
|
|
|
|
|
(cond
|
|
|
|
|
((stringp re)
|
|
|
|
|
re)
|
|
|
|
|
((symbolp re)
|
|
|
|
|
(cadr (assoc re rst-re-alist)))
|
2012-05-09 00:57:18 +00:00
|
|
|
|
((characterp re)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(regexp-quote (char-to-string re)))
|
|
|
|
|
((listp re)
|
|
|
|
|
(let ((nested
|
|
|
|
|
(mapcar (lambda (elt)
|
|
|
|
|
(rst-re elt))
|
|
|
|
|
(cdr re))))
|
|
|
|
|
(cond
|
|
|
|
|
((eq (car re) :seq)
|
|
|
|
|
(mapconcat 'identity nested ""))
|
|
|
|
|
((eq (car re) :shy)
|
|
|
|
|
(concat "\\(?:" (mapconcat 'identity nested "") "\\)"))
|
|
|
|
|
((eq (car re) :grp)
|
|
|
|
|
(concat "\\(" (mapconcat 'identity nested "") "\\)"))
|
|
|
|
|
((eq (car re) :alt)
|
|
|
|
|
(concat "\\(?:" (mapconcat 'identity nested "\\|") "\\)"))
|
|
|
|
|
(t
|
|
|
|
|
(error "Unknown list car: %s" (car re))))))
|
|
|
|
|
(t
|
|
|
|
|
(error "Unknown object type for building regex: %s" re))))
|
|
|
|
|
args)))
|
|
|
|
|
|
2012-05-14 09:31:08 +00:00
|
|
|
|
;; FIXME: Remove circular dependency between `rst-re' and `rst-re-alist'.
|
|
|
|
|
(defconst rst-re-alist
|
|
|
|
|
;; Shadow global value we are just defining so we can construct it step by
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; step.
|
2012-05-14 09:31:08 +00:00
|
|
|
|
(let (rst-re-alist)
|
|
|
|
|
(dolist (re rst-re-alist-def)
|
|
|
|
|
(setq rst-re-alist
|
|
|
|
|
(nconc rst-re-alist
|
|
|
|
|
(list (list (car re) (apply 'rst-re (cdr re)))))))
|
|
|
|
|
rst-re-alist)
|
|
|
|
|
"Alist mapping symbols from `rst-re-alist-def' to regex strings.")
|
|
|
|
|
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Mode definition
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
(defun rst-define-key (keymap key def &rest deprecated)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Bind like `define-key' but add deprecated key definitions.
|
|
|
|
|
KEYMAP, KEY, and DEF are as in `define-key'. DEPRECATED key
|
|
|
|
|
definitions should be in vector notation. These are defined as
|
|
|
|
|
well but give an additional message."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(define-key keymap key def)
|
|
|
|
|
(dolist (dep-key deprecated)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(define-key keymap dep-key
|
|
|
|
|
`(lambda ()
|
|
|
|
|
,(format "Deprecated binding for %s, use \\[%s] instead." def def)
|
|
|
|
|
(interactive)
|
|
|
|
|
(call-interactively ',def)
|
|
|
|
|
(message "[Deprecated use of key %s; use key %s instead]"
|
|
|
|
|
(key-description (this-command-keys))
|
|
|
|
|
(key-description ,key))))))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Key bindings.
|
|
|
|
|
(defvar rst-mode-map
|
|
|
|
|
(let ((map (make-sparse-keymap)))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; \C-c is the general keymap.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-h] 'describe-prefix-bindings)
|
|
|
|
|
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Section Adornments
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; The adjustment function that adorns or rotates a section title.
|
|
|
|
|
(rst-define-key map [?\C-c ?\C-=] 'rst-adjust [?\C-c ?\C-a t])
|
|
|
|
|
(rst-define-key map [?\C-=] 'rst-adjust) ; (Does not work on the Mac OSX.)
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; \C-c \C-a is the keymap for adornments.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-a ?\C-h] 'describe-prefix-bindings)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Display the hierarchy of adornments implied by the current document
|
|
|
|
|
;; contents.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-a ?\C-d] 'rst-display-adornments-hierarchy)
|
|
|
|
|
;; Homogenize the adornments in the document.
|
|
|
|
|
(rst-define-key map [?\C-c ?\C-a ?\C-s] 'rst-straighten-adornments
|
|
|
|
|
[?\C-c ?\C-s])
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;;
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Section Movement and Selection
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
|
|
|
|
;; Mark the subsection where the cursor is.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-\M-h] 'rst-mark-section
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Same as mark-defun sgml-mark-current-element.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
[?\C-c ?\C-m])
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Move forward/backward between section titles.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-\M-a] 'rst-forward-section
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Same as beginning-of-defun.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
[?\C-c ?\C-n])
|
|
|
|
|
(rst-define-key map [?\C-\M-e] 'rst-backward-section
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Same as end-of-defun.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
[?\C-c ?\C-p])
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;;
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Operating on regions
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; \C-c \C-r is the keymap for regions.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-r ?\C-h] 'describe-prefix-bindings)
|
|
|
|
|
;; Makes region a line-block.
|
|
|
|
|
(rst-define-key map [?\C-c ?\C-r ?\C-l] 'rst-line-block-region
|
|
|
|
|
[?\C-c ?\C-d])
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Shift region left or right according to tabs.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-r tab] 'rst-shift-region
|
|
|
|
|
[?\C-c ?\C-r t] [?\C-c ?\C-l t])
|
|
|
|
|
|
|
|
|
|
;;
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Operating on lists
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;;
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; \C-c \C-l is the keymap for lists.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-l ?\C-h] 'describe-prefix-bindings)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Makes paragraphs in region as a bullet list.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-l ?\C-b] 'rst-bullet-list-region
|
|
|
|
|
[?\C-c ?\C-b])
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Makes paragraphs in region as a enumeration.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-l ?\C-e] 'rst-enumerate-region
|
|
|
|
|
[?\C-c ?\C-e])
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Converts bullets to an enumeration.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-l ?\C-c] 'rst-convert-bullets-to-enumeration
|
|
|
|
|
[?\C-c ?\C-v])
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Make sure that all the bullets in the region are consistent.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-l ?\C-s] 'rst-straighten-bullets-region
|
|
|
|
|
[?\C-c ?\C-w])
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Insert a list item.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-l ?\C-i] 'rst-insert-list)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;;
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Table-of-Contents Features
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; \C-c \C-t is the keymap for table of contents.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-t ?\C-h] 'describe-prefix-bindings)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Enter a TOC buffer to view and move to a specific section.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-t ?\C-t] 'rst-toc)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Insert a TOC here.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-t ?\C-i] 'rst-toc-insert
|
|
|
|
|
[?\C-c ?\C-i])
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Update the document's TOC (without changing the cursor position).
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-t ?\C-u] 'rst-toc-update
|
|
|
|
|
[?\C-c ?\C-u])
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Go to the section under the cursor (cursor must be in TOC).
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-t ?\C-j] 'rst-goto-section
|
|
|
|
|
[?\C-c ?\C-f])
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;;
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Converting Documents from Emacs
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; \C-c \C-c is the keymap for compilation.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-c ?\C-h] 'describe-prefix-bindings)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Run one of two pre-configured toolset commands on the document.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-c ?\C-c] 'rst-compile
|
|
|
|
|
[?\C-c ?1])
|
|
|
|
|
(rst-define-key map [?\C-c ?\C-c ?\C-a] 'rst-compile-alt-toolset
|
|
|
|
|
[?\C-c ?2])
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Convert the active region to pseudo-xml using the docutils tools.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-c ?\C-x] 'rst-compile-pseudo-region
|
|
|
|
|
[?\C-c ?3])
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Convert the current document to PDF and launch a viewer on the results.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-c ?\C-p] 'rst-compile-pdf-preview
|
|
|
|
|
[?\C-c ?4])
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Convert the current document to S5 slides and view in a web browser.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-define-key map [?\C-c ?\C-c ?\C-s] 'rst-compile-slides-preview
|
|
|
|
|
[?\C-c ?5])
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
map)
|
2008-12-18 16:19:12 +00:00
|
|
|
|
"Keymap for reStructuredText mode commands.
|
2008-06-20 17:53:42 +00:00
|
|
|
|
This inherits from Text mode.")
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Abbrevs.
|
|
|
|
|
(define-abbrev-table 'rst-mode-abbrev-table
|
2009-02-19 22:14:12 +00:00
|
|
|
|
(mapcar (lambda (x) (append x '(nil 0 system)))
|
|
|
|
|
'(("contents" ".. contents::\n..\n ")
|
|
|
|
|
("con" ".. contents::\n..\n ")
|
|
|
|
|
("cont" "[...]")
|
|
|
|
|
("skip" "\n\n[...]\n\n ")
|
|
|
|
|
("seq" "\n\n[...]\n\n ")
|
|
|
|
|
;; FIXME: Add footnotes, links, and more.
|
2012-05-29 20:14:18 +00:00
|
|
|
|
))
|
|
|
|
|
"Abbrev table used while in `rst-mode'.")
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Syntax table.
|
|
|
|
|
(defvar rst-mode-syntax-table
|
|
|
|
|
(let ((st (copy-syntax-table text-mode-syntax-table)))
|
|
|
|
|
|
|
|
|
|
(modify-syntax-entry ?$ "." st)
|
|
|
|
|
(modify-syntax-entry ?% "." st)
|
|
|
|
|
(modify-syntax-entry ?& "." st)
|
|
|
|
|
(modify-syntax-entry ?' "." st)
|
|
|
|
|
(modify-syntax-entry ?* "." st)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(modify-syntax-entry ?+ "_" st)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(modify-syntax-entry ?. "_" st)
|
|
|
|
|
(modify-syntax-entry ?/ "." st)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(modify-syntax-entry ?: "_" st)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(modify-syntax-entry ?< "." st)
|
|
|
|
|
(modify-syntax-entry ?= "." st)
|
|
|
|
|
(modify-syntax-entry ?> "." st)
|
|
|
|
|
(modify-syntax-entry ?\\ "\\" st)
|
|
|
|
|
(modify-syntax-entry ?| "." st)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(modify-syntax-entry ?_ "_" st)
|
|
|
|
|
(modify-syntax-entry ?\u00ab "." st)
|
|
|
|
|
(modify-syntax-entry ?\u00bb "." st)
|
|
|
|
|
(modify-syntax-entry ?\u2018 "." st)
|
|
|
|
|
(modify-syntax-entry ?\u2019 "." st)
|
|
|
|
|
(modify-syntax-entry ?\u201c "." st)
|
|
|
|
|
(modify-syntax-entry ?\u201d "." st)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
st)
|
|
|
|
|
"Syntax table used while in `rst-mode'.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defcustom rst-mode-hook nil
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
"Hook run when `rst-mode' is turned on.
|
|
|
|
|
The hook for `text-mode' is run before this one."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst
|
|
|
|
|
:type '(hook))
|
|
|
|
|
|
|
|
|
|
|
2008-06-20 17:57:55 +00:00
|
|
|
|
;; Use rst-mode for *.rst and *.rest files. Many ReStructured-Text files
|
|
|
|
|
;; use *.txt, but this is too generic to be set as a default.
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
;;;###autoload (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(define-derived-mode rst-mode text-mode "ReST"
|
|
|
|
|
"Major mode for editing reStructuredText documents.
|
2008-12-18 16:19:12 +00:00
|
|
|
|
\\<rst-mode-map>
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2008-12-18 16:19:12 +00:00
|
|
|
|
Turning on `rst-mode' calls the normal hooks `text-mode-hook'
|
|
|
|
|
and `rst-mode-hook'. This mode also supports font-lock
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
highlighting.
|
2008-12-18 16:19:12 +00:00
|
|
|
|
|
|
|
|
|
\\{rst-mode-map}"
|
2008-06-21 19:53:46 +00:00
|
|
|
|
:abbrev-table rst-mode-abbrev-table
|
|
|
|
|
:syntax-table rst-mode-syntax-table
|
|
|
|
|
:group 'rst
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Paragraph recognition.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(set (make-local-variable 'paragraph-separate)
|
|
|
|
|
(rst-re '(:alt
|
|
|
|
|
"\f"
|
|
|
|
|
lin-end)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(set (make-local-variable 'paragraph-start)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-re '(:alt
|
|
|
|
|
"\f"
|
|
|
|
|
lin-end
|
|
|
|
|
(:seq hws-tag par-tag- bli-sfx))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Indenting and filling.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(set (make-local-variable 'indent-line-function) 'rst-indent-line)
|
|
|
|
|
(set (make-local-variable 'adaptive-fill-mode) t)
|
|
|
|
|
(set (make-local-variable 'adaptive-fill-regexp)
|
|
|
|
|
(rst-re 'hws-tag 'par-tag- "?" 'hws-tag))
|
|
|
|
|
(set (make-local-variable 'adaptive-fill-function) 'rst-adaptive-fill)
|
|
|
|
|
(set (make-local-variable 'fill-paragraph-handle-comment) nil)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Comments.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(set (make-local-variable 'comment-start) ".. ")
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(set (make-local-variable 'comment-start-skip)
|
|
|
|
|
(rst-re 'lin-beg 'exm-tag 'bli-sfx))
|
|
|
|
|
(set (make-local-variable 'comment-continue) " ")
|
|
|
|
|
(set (make-local-variable 'comment-multi-line) t)
|
|
|
|
|
(set (make-local-variable 'comment-use-syntax) nil)
|
|
|
|
|
;; reStructuredText has not really a comment ender but nil is not really a
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; permissible value.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(set (make-local-variable 'comment-end) "")
|
|
|
|
|
(set (make-local-variable 'comment-end-skip) nil)
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Commenting in reStructuredText is very special so use our own set of
|
|
|
|
|
;; functions.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(set (make-local-variable 'comment-line-break-function)
|
|
|
|
|
'rst-comment-line-break)
|
|
|
|
|
(set (make-local-variable 'comment-indent-function)
|
|
|
|
|
'rst-comment-indent)
|
|
|
|
|
(set (make-local-variable 'comment-insert-comment-function)
|
|
|
|
|
'rst-comment-insert-comment)
|
|
|
|
|
(set (make-local-variable 'comment-region-function)
|
|
|
|
|
'rst-comment-region)
|
|
|
|
|
(set (make-local-variable 'uncomment-region-function)
|
|
|
|
|
'rst-uncomment-region)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Font lock.
|
|
|
|
|
(set (make-local-variable 'font-lock-defaults)
|
|
|
|
|
'(rst-font-lock-keywords
|
|
|
|
|
t nil nil nil
|
|
|
|
|
(font-lock-multiline . t)
|
|
|
|
|
(font-lock-mark-block-function . mark-paragraph)))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(add-hook 'font-lock-extend-region-functions 'rst-font-lock-extend-region t)
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Text after a changed line may need new fontification.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(set (make-local-variable 'jit-lock-contextually) t))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(define-minor-mode rst-minor-mode
|
2011-10-20 00:26:14 +00:00
|
|
|
|
"Toggle ReST minor mode.
|
|
|
|
|
With a prefix argument ARG, enable ReST minor mode if ARG is
|
|
|
|
|
positive, and disable it otherwise. If called from Lisp, enable
|
|
|
|
|
the mode if ARG is omitted or nil.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
When ReST minor mode is enabled, the ReST mode keybindings
|
|
|
|
|
are installed on top of the major mode bindings. Use this
|
|
|
|
|
for modes derived from Text mode, like Mail mode."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; The initial value.
|
|
|
|
|
nil
|
|
|
|
|
;; The indicator for the mode line.
|
|
|
|
|
" ReST"
|
|
|
|
|
;; The minor mode bindings.
|
|
|
|
|
rst-mode-map
|
|
|
|
|
:group 'rst)
|
|
|
|
|
|
|
|
|
|
;; FIXME: can I somehow install these too?
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; :abbrev-table rst-mode-abbrev-table
|
|
|
|
|
;; :syntax-table rst-mode-syntax-table
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Section Adornment Adjustment
|
|
|
|
|
;; ============================
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
|
|
|
|
;; The following functions implement a smart automatic title sectioning feature.
|
|
|
|
|
;; The idea is that with the cursor sitting on a section title, we try to get as
|
|
|
|
|
;; much information from context and try to do the best thing automatically.
|
|
|
|
|
;; This function can be invoked many times and/or with prefix argument to rotate
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; between the various sectioning adornments.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
|
|
|
|
;; Definitions: the two forms of sectioning define semantically separate section
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; levels. A sectioning ADORNMENT consists in:
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
|
|
|
|
;; - a CHARACTER
|
|
|
|
|
;;
|
|
|
|
|
;; - a STYLE which can be either of 'simple' or 'over-and-under'.
|
|
|
|
|
;;
|
|
|
|
|
;; - an INDENT (meaningful for the over-and-under style only) which determines
|
|
|
|
|
;; how many characters and over-and-under style is hanging outside of the
|
|
|
|
|
;; title at the beginning and ending.
|
|
|
|
|
;;
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Here are two examples of adornments (| represents the window border, column
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; 0):
|
|
|
|
|
;;
|
|
|
|
|
;; |
|
|
|
|
|
;; 1. char: '-' e |Some Title
|
|
|
|
|
;; style: simple |----------
|
|
|
|
|
;; |
|
|
|
|
|
;; 2. char: '=' |==============
|
|
|
|
|
;; style: over-and-under | Some Title
|
|
|
|
|
;; indent: 2 |==============
|
|
|
|
|
;; |
|
|
|
|
|
;;
|
|
|
|
|
;; Some notes:
|
|
|
|
|
;;
|
|
|
|
|
;; - The underlining character that is used depends on context. The file is
|
|
|
|
|
;; scanned to find other sections and an appropriate character is selected.
|
|
|
|
|
;; If the function is invoked on a section that is complete, the character is
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; rotated among the existing section adornments.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;;
|
|
|
|
|
;; Note that when rotating the characters, if we come to the end of the
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; hierarchy of adornments, the variable rst-preferred-adornments is
|
|
|
|
|
;; consulted to propose a new underline adornment, and if continued, we cycle
|
|
|
|
|
;; the adornments all over again. Set this variable to nil if you want to
|
|
|
|
|
;; limit the underlining character propositions to the existing adornments in
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; the file.
|
|
|
|
|
;;
|
|
|
|
|
;; - An underline/overline that is not extended to the column at which it should
|
|
|
|
|
;; be hanging is dubbed INCOMPLETE. For example::
|
|
|
|
|
;;
|
|
|
|
|
;; |Some Title
|
|
|
|
|
;; |-------
|
|
|
|
|
;;
|
|
|
|
|
;; Examples of default invocation:
|
|
|
|
|
;;
|
|
|
|
|
;; |Some Title ---> |Some Title
|
|
|
|
|
;; | |----------
|
|
|
|
|
;;
|
|
|
|
|
;; |Some Title ---> |Some Title
|
|
|
|
|
;; |----- |----------
|
|
|
|
|
;;
|
|
|
|
|
;; | |------------
|
|
|
|
|
;; | Some Title ---> | Some Title
|
|
|
|
|
;; | |------------
|
|
|
|
|
;;
|
|
|
|
|
;; In over-and-under style, when alternating the style, a variable is
|
|
|
|
|
;; available to select how much default indent to use (it can be zero). Note
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; that if the current section adornment already has an indent, we don't
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; adjust it to the default, we rather use the current indent that is already
|
|
|
|
|
;; there for adjustment (unless we cycle, in which case we use the indent
|
|
|
|
|
;; that has been found previously).
|
|
|
|
|
|
|
|
|
|
(defgroup rst-adjust nil
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
"Settings for adjustment and cycling of section title adornments."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst
|
|
|
|
|
:version "21.1")
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(define-obsolete-variable-alias
|
|
|
|
|
'rst-preferred-decorations 'rst-preferred-adornments "r6506")
|
|
|
|
|
(defcustom rst-preferred-adornments '((?= over-and-under 1)
|
|
|
|
|
(?= simple 0)
|
|
|
|
|
(?- simple 0)
|
|
|
|
|
(?~ simple 0)
|
|
|
|
|
(?+ simple 0)
|
|
|
|
|
(?` simple 0)
|
|
|
|
|
(?# simple 0)
|
|
|
|
|
(?@ simple 0))
|
|
|
|
|
"Preferred hierarchy of section title adornments.
|
|
|
|
|
|
|
|
|
|
A list consisting of lists of the form (CHARACTER STYLE INDENT).
|
2012-05-29 20:14:18 +00:00
|
|
|
|
CHARACTER is the character used. STYLE is one of the symbols
|
|
|
|
|
OVER-AND-UNDER or SIMPLE. INDENT is an integer giving the wanted
|
|
|
|
|
indentation for STYLE OVER-AND-UNDER. CHARACTER and STYLE are
|
|
|
|
|
always used when a section adornment is described. In other
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
places t instead of a list stands for a transition.
|
|
|
|
|
|
|
|
|
|
This sequence is consulted to offer a new adornment suggestion
|
2008-06-20 16:00:33 +00:00
|
|
|
|
when we rotate the underlines at the end of the existing
|
|
|
|
|
hierarchy of characters, or when there is no existing section
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
title in the file.
|
|
|
|
|
|
|
|
|
|
Set this to an empty list to use only the adornment found in the
|
|
|
|
|
file."
|
|
|
|
|
:group 'rst-adjust
|
|
|
|
|
:type `(repeat
|
|
|
|
|
(group :tag "Adornment specification"
|
|
|
|
|
(choice :tag "Adornment character"
|
|
|
|
|
,@(mapcar (lambda (char)
|
|
|
|
|
(list 'const
|
|
|
|
|
:tag (char-to-string char) char))
|
|
|
|
|
rst-adornment-chars))
|
|
|
|
|
(radio :tag "Adornment type"
|
|
|
|
|
(const :tag "Overline and underline" over-and-under)
|
|
|
|
|
(const :tag "Underline only" simple))
|
|
|
|
|
(integer :tag "Indentation for overline and underline type"
|
|
|
|
|
:value 0))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(defcustom rst-default-indent 1
|
|
|
|
|
"Number of characters to indent the section title.
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
This is used for when toggling adornment styles, when switching
|
|
|
|
|
from a simple adornment style to a over-and-under adornment
|
2008-06-20 16:00:33 +00:00
|
|
|
|
style."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
:group 'rst-adjust
|
|
|
|
|
:type '(integer))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-compare-adornments (ado1 ado2)
|
|
|
|
|
"Compare adornments.
|
|
|
|
|
Return true if both ADO1 and ADO2 adornments are equal,
|
2008-06-20 16:00:33 +00:00
|
|
|
|
according to restructured text semantics (only the character and
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
the style are compared, the indentation does not matter)."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(and (eq (car ado1) (car ado2))
|
|
|
|
|
(eq (cadr ado1) (cadr ado2))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-get-adornment-match (hier ado)
|
|
|
|
|
"Return the index (level) in hierarchy HIER of adornment ADO.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
This basically just searches for the item using the appropriate
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
comparison and returns the index. Return nil if the item is
|
2008-06-20 16:00:33 +00:00
|
|
|
|
not found."
|
|
|
|
|
(let ((cur hier))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(while (and cur (not (rst-compare-adornments (car cur) ado)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(setq cur (cdr cur)))
|
|
|
|
|
cur))
|
|
|
|
|
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-suggest-new-adornment (allados &optional prev)
|
|
|
|
|
"Suggest a new, different adornment from all that have been seen.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
ALLADOS is the set of all adornments, including the line numbers.
|
|
|
|
|
PREV is the optional previous adornment, in order to suggest a
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
better match."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; For all the preferred adornments...
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(let* (
|
|
|
|
|
;; If 'prev' is given, reorder the list to start searching after the
|
|
|
|
|
;; match.
|
|
|
|
|
(fplist
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(cdr (rst-get-adornment-match rst-preferred-adornments prev)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;; List of candidates to search.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(curpotential (append fplist rst-preferred-adornments)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(while
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; For all the adornments...
|
|
|
|
|
(let ((cur allados)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
found)
|
|
|
|
|
(while (and cur (not found))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (rst-compare-adornments (car cur) (car curpotential))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Found it!
|
|
|
|
|
(setq found (car curpotential))
|
|
|
|
|
(setq cur (cdr cur))))
|
|
|
|
|
found)
|
|
|
|
|
|
|
|
|
|
(setq curpotential (cdr curpotential)))
|
|
|
|
|
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(copy-sequence (car curpotential))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(defun rst-delete-entire-line ()
|
|
|
|
|
"Delete the entire current line without using the `kill-ring'."
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(delete-region (line-beginning-position)
|
|
|
|
|
(line-beginning-position 2)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(defun rst-update-section (char style &optional indent)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
"Unconditionally update the style of a section adornment.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
Do this using the given character CHAR, with STYLE 'simple
|
|
|
|
|
or 'over-and-under, and with indent INDENT. If the STYLE
|
|
|
|
|
is 'simple, whitespace before the title is removed (indent
|
|
|
|
|
is always assumed to be 0).
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
If there are existing overline and/or underline from the
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
existing adornment, they are removed before adding the
|
|
|
|
|
requested adornment."
|
|
|
|
|
(end-of-line)
|
2010-11-18 03:02:15 +00:00
|
|
|
|
(let ((marker (point-marker))
|
|
|
|
|
len)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Fixup whitespace at the beginning and end of the line.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(if (or (null indent) (eq style 'simple))
|
|
|
|
|
(setq indent 0))
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(delete-horizontal-space)
|
|
|
|
|
(insert (make-string indent ? ))
|
|
|
|
|
|
|
|
|
|
(end-of-line)
|
|
|
|
|
(delete-horizontal-space)
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Set the current column, we're at the end of the title line.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(setq len (+ (current-column) indent))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Remove previous line if it is an adornment.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(forward-line -1)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (and (looking-at (rst-re 'ado-beg-2-1))
|
|
|
|
|
;; Avoid removing the underline of a title right above us.
|
|
|
|
|
(save-excursion (forward-line -1)
|
|
|
|
|
(not (looking-at (rst-re 'ttl-beg)))))
|
|
|
|
|
(rst-delete-entire-line)))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Remove following line if it is an adornment.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(forward-line +1)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (looking-at (rst-re 'ado-beg-2-1))
|
|
|
|
|
(rst-delete-entire-line))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Add a newline if we're at the end of the buffer, for the subsequence
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; inserting of the underline.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(if (= (point) (buffer-end 1))
|
|
|
|
|
(newline 1)))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Insert overline.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(if (eq style 'over-and-under)
|
|
|
|
|
(save-excursion
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(open-line 1)
|
|
|
|
|
(insert (make-string len char))))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Insert underline.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(forward-line +1)
|
|
|
|
|
(open-line 1)
|
|
|
|
|
(insert (make-string len char))
|
|
|
|
|
|
|
|
|
|
(forward-line +1)
|
|
|
|
|
(goto-char marker)
|
|
|
|
|
))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-classify-adornment (adornment end)
|
|
|
|
|
"Classify adornment for section titles and transitions.
|
|
|
|
|
ADORNMENT is the complete adornment string as found in the buffer
|
2012-05-29 20:14:18 +00:00
|
|
|
|
with optional trailing whitespace. END is the point after the
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
last character of ADORNMENT.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
Return a list. The first entry is t for a transition or a
|
|
|
|
|
cons (CHARACTER . STYLE). Check `rst-preferred-adornments' for
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
the meaning of CHARACTER and STYLE.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
The remaining list forms four match groups as returned by
|
2012-05-29 20:14:18 +00:00
|
|
|
|
`match-data'. Match group 0 matches the whole construct. Match
|
|
|
|
|
group 1 matches the overline adornment if present. Match group 2
|
|
|
|
|
matches the section title text or the transition. Match group 3
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
matches the underline adornment.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
Return nil if no syntactically valid adornment is found."
|
|
|
|
|
(save-excursion
|
|
|
|
|
(save-match-data
|
|
|
|
|
(when (string-match (rst-re 'ado-beg-2-1) adornment)
|
|
|
|
|
(goto-char end)
|
|
|
|
|
(let* ((ado-ch (string-to-char (match-string 2 adornment)))
|
|
|
|
|
(ado-re (rst-re ado-ch 'adorep3-hlp))
|
|
|
|
|
(end-pnt (point))
|
|
|
|
|
(beg-pnt (progn
|
|
|
|
|
(forward-line 0)
|
|
|
|
|
(point)))
|
2012-05-29 06:16:49 +00:00
|
|
|
|
(nxt-emp ; Next line nonexistent or empty
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(or (not (zerop (forward-line 1)))
|
|
|
|
|
(looking-at (rst-re 'lin-end)))))
|
2012-05-29 06:16:49 +00:00
|
|
|
|
(prv-emp ; Previous line nonexistent or empty
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(or (not (zerop (forward-line -1)))
|
|
|
|
|
(looking-at (rst-re 'lin-end)))))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(ttl-blw ; Title found below starting here.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(and
|
|
|
|
|
(zerop (forward-line 1))
|
|
|
|
|
(looking-at (rst-re 'ttl-beg))
|
|
|
|
|
(point))))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(ttl-abv ; Title found above starting here.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(and
|
|
|
|
|
(zerop (forward-line -1))
|
|
|
|
|
(looking-at (rst-re 'ttl-beg))
|
|
|
|
|
(point))))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(und-fnd ; Matching underline found starting here.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(and ttl-blw
|
|
|
|
|
(zerop (forward-line 2))
|
|
|
|
|
(looking-at (rst-re ado-re 'lin-end))
|
|
|
|
|
(point))))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(ovr-fnd ; Matching overline found starting here.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(and ttl-abv
|
|
|
|
|
(zerop (forward-line -2))
|
|
|
|
|
(looking-at (rst-re ado-re 'lin-end))
|
|
|
|
|
(point))))
|
|
|
|
|
key beg-ovr end-ovr beg-txt end-txt beg-und end-und)
|
|
|
|
|
(cond
|
|
|
|
|
((and nxt-emp prv-emp)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; A transition.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setq key t
|
|
|
|
|
beg-txt beg-pnt
|
|
|
|
|
end-txt end-pnt))
|
|
|
|
|
((or und-fnd ovr-fnd)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; An overline with an underline.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setq key (cons ado-ch 'over-and-under))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(let (;; Prefer overline match over underline match.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(und-pnt (if ovr-fnd beg-pnt und-fnd))
|
|
|
|
|
(ovr-pnt (if ovr-fnd ovr-fnd beg-pnt))
|
|
|
|
|
(txt-pnt (if ovr-fnd ttl-abv ttl-blw)))
|
|
|
|
|
(goto-char ovr-pnt)
|
|
|
|
|
(setq beg-ovr (point)
|
|
|
|
|
end-ovr (line-end-position))
|
|
|
|
|
(goto-char txt-pnt)
|
|
|
|
|
(setq beg-txt (point)
|
|
|
|
|
end-txt (line-end-position))
|
|
|
|
|
(goto-char und-pnt)
|
|
|
|
|
(setq beg-und (point)
|
|
|
|
|
end-und (line-end-position))))
|
|
|
|
|
(ttl-abv
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; An underline.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setq key (cons ado-ch 'simple)
|
|
|
|
|
beg-und beg-pnt
|
|
|
|
|
end-und end-pnt)
|
|
|
|
|
(goto-char ttl-abv)
|
|
|
|
|
(setq beg-txt (point)
|
|
|
|
|
end-txt (line-end-position)))
|
|
|
|
|
(t
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Invalid adornment.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setq key nil)))
|
|
|
|
|
(if key
|
|
|
|
|
(list key
|
|
|
|
|
(or beg-ovr beg-txt beg-und)
|
|
|
|
|
(or end-und end-txt end-ovr)
|
|
|
|
|
beg-ovr end-ovr beg-txt end-txt beg-und end-und)))))))
|
|
|
|
|
|
|
|
|
|
(defun rst-find-title-line ()
|
|
|
|
|
"Find a section title line around point and return its characteristics.
|
|
|
|
|
If the point is on an adornment line find the respective title
|
2012-05-29 20:14:18 +00:00
|
|
|
|
line. If the point is on an empty line check previous or next
|
|
|
|
|
line whether it is a suitable title line and use it if so. If
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
point is on a suitable title line use it.
|
|
|
|
|
|
|
|
|
|
If no title line is found return nil.
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
Otherwise return as `rst-classify-adornment' does. However, if
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
the title line has no syntactically valid adornment STYLE is nil
|
2012-05-29 20:14:18 +00:00
|
|
|
|
in the first element. If there is no adornment around the title
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
CHARACTER is also nil and match groups for overline and underline
|
|
|
|
|
are nil."
|
|
|
|
|
(save-excursion
|
|
|
|
|
(forward-line 0)
|
|
|
|
|
(let ((orig-pnt (point))
|
|
|
|
|
(orig-end (line-end-position)))
|
|
|
|
|
(cond
|
|
|
|
|
((looking-at (rst-re 'ado-beg-2-1))
|
|
|
|
|
(let ((char (string-to-char (match-string-no-properties 2)))
|
|
|
|
|
(r (rst-classify-adornment (match-string-no-properties 0)
|
|
|
|
|
(match-end 0))))
|
|
|
|
|
(cond
|
|
|
|
|
((not r)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Invalid adornment - check whether this is an incomplete overline.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (and
|
|
|
|
|
(zerop (forward-line 1))
|
|
|
|
|
(looking-at (rst-re 'ttl-beg)))
|
|
|
|
|
(list (cons char nil) orig-pnt (line-end-position)
|
|
|
|
|
orig-pnt orig-end (point) (line-end-position) nil nil)))
|
|
|
|
|
((consp (car r))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; A section title - not a transition.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
r))))
|
|
|
|
|
((looking-at (rst-re 'lin-end))
|
|
|
|
|
(or
|
|
|
|
|
(save-excursion
|
|
|
|
|
(if (and (zerop (forward-line -1))
|
|
|
|
|
(looking-at (rst-re 'ttl-beg)))
|
|
|
|
|
(list (cons nil nil) (point) (line-end-position)
|
|
|
|
|
nil nil (point) (line-end-position) nil nil)))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(if (and (zerop (forward-line 1))
|
|
|
|
|
(looking-at (rst-re 'ttl-beg)))
|
|
|
|
|
(list (cons nil nil) (point) (line-end-position)
|
|
|
|
|
nil nil (point) (line-end-position) nil nil)))))
|
|
|
|
|
((looking-at (rst-re 'ttl-beg))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Try to use the underline.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let ((r (rst-classify-adornment
|
2012-05-09 00:57:18 +00:00
|
|
|
|
(buffer-substring-no-properties
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(line-beginning-position 2) (line-end-position 2))
|
|
|
|
|
(line-end-position 2))))
|
|
|
|
|
(if r
|
|
|
|
|
r
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; No valid adornment found.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(list (cons nil nil) (point) (line-end-position)
|
|
|
|
|
nil nil (point) (line-end-position) nil nil))))))))
|
|
|
|
|
|
|
|
|
|
;; The following function and variables are used to maintain information about
|
|
|
|
|
;; current section adornment in a buffer local cache. Thus they can be used for
|
|
|
|
|
;; font-locking and manipulation commands.
|
|
|
|
|
|
|
|
|
|
(defvar rst-all-sections nil
|
|
|
|
|
"All section adornments in the buffer as found by `rst-find-all-adornments'.
|
|
|
|
|
t when no section adornments were found.")
|
|
|
|
|
(make-variable-buffer-local 'rst-all-sections)
|
|
|
|
|
|
|
|
|
|
;; FIXME: If this variable is set to a different value font-locking of section
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; headers is wrong.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defvar rst-section-hierarchy nil
|
|
|
|
|
"Section hierarchy in the buffer as determined by `rst-get-hierarchy'.
|
2012-05-29 20:14:18 +00:00
|
|
|
|
t when no section adornments were found. Value depends on
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
`rst-all-sections'.")
|
|
|
|
|
(make-variable-buffer-local 'rst-section-hierarchy)
|
|
|
|
|
|
2012-05-09 00:57:18 +00:00
|
|
|
|
(defun rst-reset-section-caches ()
|
|
|
|
|
"Reset all section cache variables.
|
|
|
|
|
Should be called by interactive functions which deal with sections."
|
|
|
|
|
(setq rst-all-sections nil
|
|
|
|
|
rst-section-hierarchy nil))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-find-all-adornments ()
|
|
|
|
|
"Return all the section adornments in the current buffer.
|
|
|
|
|
Return a list of (LINE . ADORNMENT) with ascending LINE where
|
2012-05-29 20:14:18 +00:00
|
|
|
|
LINE is the line containing the section title. ADORNMENT consists
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
of a (CHARACTER STYLE INDENT) triple as described for
|
|
|
|
|
`rst-preferred-adornments'.
|
|
|
|
|
|
|
|
|
|
Uses and sets `rst-all-sections'."
|
|
|
|
|
(unless rst-all-sections
|
|
|
|
|
(let (positions)
|
|
|
|
|
;; Iterate over all the section titles/adornments in the file.
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward (rst-re 'ado-beg-2-1) nil t)
|
|
|
|
|
(let ((ado-data (rst-classify-adornment
|
|
|
|
|
(match-string-no-properties 0) (point))))
|
|
|
|
|
(when (and ado-data
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(consp (car ado-data))) ; Ignore transitions.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(set-match-data (cdr ado-data))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(goto-char (match-beginning 2)) ; Goto the title start.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(push (cons (1+ (count-lines (point-min) (point)))
|
|
|
|
|
(list (caar ado-data)
|
|
|
|
|
(cdar ado-data)
|
|
|
|
|
(current-indentation)))
|
|
|
|
|
positions)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(goto-char (match-end 0))))) ; Go beyond the whole thing.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setq positions (nreverse positions))
|
|
|
|
|
(setq rst-all-sections (or positions t)))))
|
|
|
|
|
(if (eq rst-all-sections t)
|
|
|
|
|
nil
|
|
|
|
|
rst-all-sections))
|
|
|
|
|
|
|
|
|
|
(defun rst-infer-hierarchy (adornments)
|
|
|
|
|
"Build a hierarchy of adornments using the list of given ADORNMENTS.
|
|
|
|
|
|
|
|
|
|
ADORNMENTS is a list of (CHARACTER STYLE INDENT) adornment
|
2008-06-20 16:00:33 +00:00
|
|
|
|
specifications, in order that they appear in a file, and will
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
infer a hierarchy of section levels by removing adornments that
|
|
|
|
|
have already been seen in a forward traversal of the adornments,
|
|
|
|
|
comparing just CHARACTER and STYLE.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
Similarly returns a list of (CHARACTER STYLE INDENT), where each
|
2008-06-20 16:00:33 +00:00
|
|
|
|
list element should be unique."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let (hierarchy-alist)
|
|
|
|
|
(dolist (x adornments)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(let ((char (car x))
|
|
|
|
|
(style (cadr x)))
|
|
|
|
|
(unless (assoc (cons char style) hierarchy-alist)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(push (cons (cons char style) x) hierarchy-alist))))
|
|
|
|
|
(mapcar 'cdr (nreverse hierarchy-alist))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-get-hierarchy (&optional ignore)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
"Return the hierarchy of section titles in the file.
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
Return a list of adornments that represents the hierarchy of
|
2012-05-29 20:14:18 +00:00
|
|
|
|
section titles in the file. Each element consists of (CHARACTER
|
|
|
|
|
STYLE INDENT) as described for `rst-find-all-adornments'. If the
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
line number in IGNORE is specified, a possibly adornment found on
|
|
|
|
|
that line is not taken into account when building the hierarchy.
|
|
|
|
|
|
|
|
|
|
Uses and sets `rst-section-hierarchy' unless IGNORE is given."
|
|
|
|
|
(if (and (not ignore) rst-section-hierarchy)
|
|
|
|
|
(if (eq rst-section-hierarchy t)
|
|
|
|
|
nil
|
|
|
|
|
rst-section-hierarchy)
|
|
|
|
|
(let ((r (rst-infer-hierarchy
|
|
|
|
|
(mapcar 'cdr
|
|
|
|
|
(assq-delete-all
|
|
|
|
|
ignore
|
|
|
|
|
(rst-find-all-adornments))))))
|
|
|
|
|
(setq rst-section-hierarchy
|
|
|
|
|
(if ignore
|
|
|
|
|
;; Clear cache reflecting that a possible update is not
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; reflected.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
nil
|
|
|
|
|
(or r t)))
|
|
|
|
|
r)))
|
|
|
|
|
|
|
|
|
|
(defun rst-get-adornments-around ()
|
|
|
|
|
"Return the adornments around point.
|
|
|
|
|
Return a list of the previous and next adornments."
|
|
|
|
|
(let* ((all (rst-find-all-adornments))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(curline (line-number-at-pos))
|
|
|
|
|
prev next
|
|
|
|
|
(cur all))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Search for the adornments around the current line.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(while (and cur (< (caar cur) curline))
|
|
|
|
|
(setq prev cur
|
|
|
|
|
cur (cdr cur)))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; 'cur' is the following adornment.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(if (and cur (caar cur))
|
|
|
|
|
(setq next (if (= curline (caar cur)) (cdr cur) cur)))
|
|
|
|
|
|
|
|
|
|
(mapcar 'cdar (list prev next))
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-adornment-complete-p (ado)
|
|
|
|
|
"Return true if the adornment ADO around point is complete."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Note: we assume that the detection of the overline as being the underline
|
|
|
|
|
;; of a preceding title has already been detected, and has been eliminated
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; from the adornment that is given to us.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;; There is some sectioning already present, so check if the current
|
|
|
|
|
;; sectioning is complete and correct.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let* ((char (car ado))
|
|
|
|
|
(style (cadr ado))
|
|
|
|
|
(indent (caddr ado))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(endcol (save-excursion (end-of-line) (current-column)))
|
|
|
|
|
)
|
|
|
|
|
(if char
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let ((exps (rst-re "^" char (format "\\{%d\\}" (+ endcol indent)) "$")))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(and
|
|
|
|
|
(save-excursion (forward-line +1)
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(looking-at exps))
|
|
|
|
|
(or (not (eq style 'over-and-under))
|
|
|
|
|
(save-excursion (forward-line -1)
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(looking-at exps))))
|
|
|
|
|
))
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-get-next-adornment
|
|
|
|
|
(curado hier &optional suggestion reverse-direction)
|
|
|
|
|
"Get the next adornment for CURADO, in given hierarchy HIER.
|
|
|
|
|
If suggesting, suggest for new adornment SUGGESTION.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
REVERSE-DIRECTION is used to reverse the cycling order."
|
|
|
|
|
|
|
|
|
|
(let* (
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(char (car curado))
|
|
|
|
|
(style (cadr curado))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Build a new list of adornments for the rotation.
|
|
|
|
|
(rotados
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(append hier
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Suggest a new adornment.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(list suggestion
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; If nothing to suggest, use first adornment.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(car hier)))) )
|
|
|
|
|
(or
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Search for next adornment.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(cadr
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let ((cur (if reverse-direction rotados
|
|
|
|
|
(reverse rotados))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(while (and cur
|
|
|
|
|
(not (and (eq char (caar cur))
|
|
|
|
|
(eq style (cadar cur)))))
|
|
|
|
|
(setq cur (cdr cur)))
|
|
|
|
|
cur))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; If not found, take the first of all adornments.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
suggestion
|
|
|
|
|
)))
|
|
|
|
|
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: A line "``/`` full" is not accepted as a section title.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-adjust (pfxarg)
|
|
|
|
|
"Auto-adjust the adornment around point.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
Adjust/rotate the section adornment for the section title around
|
|
|
|
|
point or promote/demote the adornments inside the region,
|
2008-06-20 16:00:33 +00:00
|
|
|
|
depending on if the region is active. This function is meant to
|
2008-06-27 07:34:53 +00:00
|
|
|
|
be invoked possibly multiple times, and can vary its behavior
|
2012-05-29 20:14:18 +00:00
|
|
|
|
with a positive PFXARG (toggle style), or with a negative
|
|
|
|
|
PFXARG (alternate behavior).
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
This function is a bit of a swiss knife. It is meant to adjust
|
|
|
|
|
the adornments of a section title in reStructuredText. It tries
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
to deal with all the possible cases gracefully and to do `the
|
|
|
|
|
right thing' in all cases.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
See the documentations of `rst-adjust-adornment-work' and
|
2008-06-20 16:00:33 +00:00
|
|
|
|
`rst-promote-region' for full details.
|
|
|
|
|
|
|
|
|
|
Prefix Arguments
|
|
|
|
|
================
|
|
|
|
|
|
|
|
|
|
The method can take either (but not both) of
|
|
|
|
|
|
|
|
|
|
a. a (non-negative) prefix argument, which means to toggle the
|
2012-05-29 20:14:18 +00:00
|
|
|
|
adornment style. Invoke with a prefix argument for example;
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
b. a negative numerical argument, which generally inverts the
|
|
|
|
|
direction of search in the file or hierarchy. Invoke with C--
|
|
|
|
|
prefix for example."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(interactive "P")
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(let* (;; Save our original position on the current line.
|
2010-11-18 03:02:15 +00:00
|
|
|
|
(origpt (point-marker))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(reverse-direction (and pfxarg (< (prefix-numeric-value pfxarg) 0)))
|
|
|
|
|
(toggle-style (and pfxarg (not reverse-direction))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(if (rst-portable-mark-active-p)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Adjust adornments within region.
|
|
|
|
|
(rst-promote-region (and pfxarg t))
|
|
|
|
|
;; Adjust adornment around point.
|
|
|
|
|
(rst-adjust-adornment-work toggle-style reverse-direction))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;; Run the hooks to run after adjusting.
|
|
|
|
|
(run-hooks 'rst-adjust-hook)
|
|
|
|
|
|
|
|
|
|
;; Make sure to reset the cursor position properly after we're done.
|
|
|
|
|
(goto-char origpt)
|
|
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defcustom rst-adjust-hook nil
|
|
|
|
|
"Hooks to be run after running `rst-adjust'."
|
|
|
|
|
:group 'rst-adjust
|
|
|
|
|
:type '(hook)
|
|
|
|
|
:package-version '(rst . "1.1.0"))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defcustom rst-new-adornment-down nil
|
|
|
|
|
"Controls level of new adornment for section headers."
|
|
|
|
|
:group 'rst-adjust
|
|
|
|
|
:type '(choice
|
|
|
|
|
(const :tag "Same level as previous one" nil)
|
|
|
|
|
(const :tag "One level down relative to the previous one" t))
|
|
|
|
|
:package-version '(rst . "1.1.0"))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-adjust-adornment (pfxarg)
|
|
|
|
|
"Call `rst-adjust-adornment-work' interactively.
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
Keep this for compatibility for older bindings (are there any?).
|
|
|
|
|
Argument PFXARG has the same meaning as for `rst-adjust'."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(interactive "P")
|
|
|
|
|
|
|
|
|
|
(let* ((reverse-direction (and pfxarg (< (prefix-numeric-value pfxarg) 0)))
|
|
|
|
|
(toggle-style (and pfxarg (not reverse-direction))))
|
|
|
|
|
(rst-adjust-adornment-work toggle-style reverse-direction)))
|
|
|
|
|
|
|
|
|
|
(defun rst-adjust-adornment-work (toggle-style reverse-direction)
|
|
|
|
|
"Adjust/rotate the section adornment for the section title around point.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
This function is meant to be invoked possibly multiple times, and
|
2008-06-27 07:34:53 +00:00
|
|
|
|
can vary its behavior with a true TOGGLE-STYLE argument, or with
|
2008-06-20 16:00:33 +00:00
|
|
|
|
a REVERSE-DIRECTION argument.
|
|
|
|
|
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
General Behavior
|
|
|
|
|
================
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
The next action it takes depends on context around the point, and
|
|
|
|
|
it is meant to be invoked possibly more than once to rotate among
|
|
|
|
|
the various possibilities. Basically, this function deals with:
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
- adding a adornment if the title does not have one;
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
- adjusting the length of the underline characters to fit a
|
|
|
|
|
modified title;
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
- rotating the adornment in the set of already existing
|
|
|
|
|
sectioning adornments used in the file;
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
- switching between simple and over-and-under styles.
|
|
|
|
|
|
|
|
|
|
You should normally not have to read all the following, just
|
|
|
|
|
invoke the method and it will do the most obvious thing that you
|
|
|
|
|
would expect.
|
|
|
|
|
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
Adornment Definitions
|
|
|
|
|
=====================
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
The adornments consist in
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
1. a CHARACTER
|
|
|
|
|
|
|
|
|
|
2. a STYLE which can be either of 'simple' or 'over-and-under'.
|
|
|
|
|
|
|
|
|
|
3. an INDENT (meaningful for the over-and-under style only)
|
|
|
|
|
which determines how many characters and over-and-under
|
|
|
|
|
style is hanging outside of the title at the beginning and
|
|
|
|
|
ending.
|
|
|
|
|
|
|
|
|
|
See source code for mode details.
|
|
|
|
|
|
|
|
|
|
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
Detailed Behavior Description
|
|
|
|
|
=============================
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
Here are the gory details of the algorithm (it seems quite
|
|
|
|
|
complicated, but really, it does the most obvious thing in all
|
|
|
|
|
the particular cases):
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
Before applying the adornment change, the cursor is placed on
|
2008-06-20 16:00:33 +00:00
|
|
|
|
the closest line that could contain a section title.
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
Case 1: No Adornment
|
|
|
|
|
--------------------
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
If the current line has no adornment around it,
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
- search backwards for the last previous adornment, and apply
|
|
|
|
|
the adornment one level lower to the current line. If there
|
|
|
|
|
is no defined level below this previous adornment, we suggest
|
|
|
|
|
the most appropriate of the `rst-preferred-adornments'.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
If REVERSE-DIRECTION is true, we simply use the previous
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
adornment found directly.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
- if there is no adornment found in the given direction, we use
|
|
|
|
|
the first of `rst-preferred-adornments'.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
TOGGLE-STYLE forces a toggle of the prescribed adornment style.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
Case 2: Incomplete Adornment
|
|
|
|
|
----------------------------
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
If the current line does have an existing adornment, but the
|
|
|
|
|
adornment is incomplete, that is, the underline/overline does
|
2008-06-20 16:00:33 +00:00
|
|
|
|
not extend to exactly the end of the title line (it is either too
|
|
|
|
|
short or too long), we simply extend the length of the
|
|
|
|
|
underlines/overlines to fit exactly the section title.
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
If TOGGLE-STYLE we toggle the style of the adornment as well.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
REVERSE-DIRECTION has no effect in this case.
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
Case 3: Complete Existing Adornment
|
|
|
|
|
-----------------------------------
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
If the adornment is complete (i.e. the underline (overline)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
length is already adjusted to the end of the title line), we
|
|
|
|
|
search/parse the file to establish the hierarchy of all the
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
adornments (making sure not to include the adornment around
|
|
|
|
|
point), and we rotate the current title's adornment from within
|
2008-06-20 16:00:33 +00:00
|
|
|
|
that list (by default, going *down* the hierarchy that is present
|
|
|
|
|
in the file, i.e. to a lower section level). This is meant to be
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
used potentially multiple times, until the desired adornment is
|
2008-06-20 16:00:33 +00:00
|
|
|
|
found around the title.
|
|
|
|
|
|
|
|
|
|
If we hit the boundary of the hierarchy, exactly one choice from
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
the list of preferred adornments is suggested/chosen, the first
|
|
|
|
|
of those adornment that has not been seen in the file yet (and
|
|
|
|
|
not including the adornment around point), and the next
|
2008-06-20 16:00:33 +00:00
|
|
|
|
invocation rolls over to the other end of the hierarchy (i.e. it
|
|
|
|
|
cycles). This allows you to avoid having to set which character
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
to use.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
If REVERSE-DIRECTION is true, the effect is to change the
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
direction of rotation in the hierarchy of adornments, thus
|
2008-06-20 16:00:33 +00:00
|
|
|
|
instead going *up* the hierarchy.
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
However, if TOGGLE-STYLE, we do not rotate the adornment, but
|
|
|
|
|
instead simply toggle the style of the current adornment (this
|
|
|
|
|
should be the most common way to toggle the style of an existing
|
|
|
|
|
complete adornment).
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Point Location
|
|
|
|
|
==============
|
|
|
|
|
|
|
|
|
|
The invocation of this function can be carried out anywhere
|
|
|
|
|
within the section title line, on an existing underline or
|
|
|
|
|
overline, as well as on an empty line following a section title.
|
|
|
|
|
This is meant to be as convenient as possible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Indented Sections
|
|
|
|
|
=================
|
|
|
|
|
|
|
|
|
|
Indented section titles such as ::
|
|
|
|
|
|
|
|
|
|
My Title
|
|
|
|
|
--------
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
are invalid in reStructuredText and thus not recognized by the
|
2008-06-20 16:00:33 +00:00
|
|
|
|
parser. This code will thus not work in a way that would support
|
|
|
|
|
indented sections (it would be ambiguous anyway).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Joint Sections
|
|
|
|
|
==============
|
|
|
|
|
|
|
|
|
|
Section titles that are right next to each other may not be
|
|
|
|
|
treated well. More work might be needed to support those, and
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
special conditions on the completeness of existing adornments
|
2008-06-20 16:00:33 +00:00
|
|
|
|
might be required to make it non-ambiguous.
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
For now we assume that the adornments are disjoint, that is,
|
|
|
|
|
there is at least a single line between the titles/adornment
|
|
|
|
|
lines."
|
|
|
|
|
(rst-reset-section-caches)
|
|
|
|
|
(let ((ttl-fnd (rst-find-title-line))
|
|
|
|
|
(orig-pnt (point)))
|
|
|
|
|
(when ttl-fnd
|
|
|
|
|
(set-match-data (cdr ttl-fnd))
|
|
|
|
|
(goto-char (match-beginning 2))
|
|
|
|
|
(let* ((moved (- (line-number-at-pos) (line-number-at-pos orig-pnt)))
|
|
|
|
|
(char (caar ttl-fnd))
|
|
|
|
|
(style (cdar ttl-fnd))
|
|
|
|
|
(indent (current-indentation))
|
|
|
|
|
(curado (list char style indent))
|
|
|
|
|
char-new style-new indent-new)
|
|
|
|
|
(cond
|
|
|
|
|
;;-------------------------------------------------------------------
|
|
|
|
|
;; Case 1: No valid adornment
|
|
|
|
|
((not style)
|
|
|
|
|
(let ((prev (car (rst-get-adornments-around)))
|
|
|
|
|
cur
|
|
|
|
|
(hier (rst-get-hierarchy)))
|
|
|
|
|
;; Advance one level down.
|
|
|
|
|
(setq cur
|
|
|
|
|
(if prev
|
|
|
|
|
(if (or (and rst-new-adornment-down reverse-direction)
|
|
|
|
|
(and (not rst-new-adornment-down)
|
|
|
|
|
(not reverse-direction)))
|
|
|
|
|
prev
|
|
|
|
|
(or (cadr (rst-get-adornment-match hier prev))
|
|
|
|
|
(rst-suggest-new-adornment hier prev)))
|
|
|
|
|
(copy-sequence (car rst-preferred-adornments))))
|
|
|
|
|
;; Invert the style if requested.
|
|
|
|
|
(if toggle-style
|
|
|
|
|
(setcar (cdr cur) (if (eq (cadr cur) 'simple)
|
|
|
|
|
'over-and-under 'simple)) )
|
|
|
|
|
(setq char-new (car cur)
|
|
|
|
|
style-new (cadr cur)
|
|
|
|
|
indent-new (caddr cur))))
|
|
|
|
|
;;-------------------------------------------------------------------
|
|
|
|
|
;; Case 2: Incomplete Adornment
|
|
|
|
|
((not (rst-adornment-complete-p curado))
|
|
|
|
|
;; Invert the style if requested.
|
|
|
|
|
(if toggle-style
|
|
|
|
|
(setq style (if (eq style 'simple) 'over-and-under 'simple)))
|
|
|
|
|
(setq char-new char
|
|
|
|
|
style-new style
|
|
|
|
|
indent-new indent))
|
|
|
|
|
;;-------------------------------------------------------------------
|
|
|
|
|
;; Case 3: Complete Existing Adornment
|
|
|
|
|
(t
|
|
|
|
|
(if toggle-style
|
|
|
|
|
;; Simply switch the style of the current adornment.
|
|
|
|
|
(setq char-new char
|
|
|
|
|
style-new (if (eq style 'simple) 'over-and-under 'simple)
|
|
|
|
|
indent-new rst-default-indent)
|
|
|
|
|
;; Else, we rotate, ignoring the adornment around the current
|
|
|
|
|
;; line...
|
|
|
|
|
(let* ((hier (rst-get-hierarchy (line-number-at-pos)))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Suggestion, in case we need to come up with something new.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(suggestion (rst-suggest-new-adornment
|
|
|
|
|
hier
|
|
|
|
|
(car (rst-get-adornments-around))))
|
|
|
|
|
(nextado (rst-get-next-adornment
|
|
|
|
|
curado hier suggestion reverse-direction)))
|
|
|
|
|
;; Indent, if present, always overrides the prescribed indent.
|
|
|
|
|
(setq char-new (car nextado)
|
|
|
|
|
style-new (cadr nextado)
|
|
|
|
|
indent-new (caddr nextado))))))
|
|
|
|
|
;; Override indent with present indent!
|
|
|
|
|
(setq indent-new (if (> indent 0) indent indent-new))
|
|
|
|
|
(if (and char-new style-new)
|
|
|
|
|
(rst-update-section char-new style-new indent-new))
|
|
|
|
|
;; Correct the position of the cursor to more accurately reflect where
|
|
|
|
|
;; it was located when the function was invoked.
|
|
|
|
|
(unless (zerop moved)
|
|
|
|
|
(forward-line (- moved))
|
|
|
|
|
(end-of-line))))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;; Maintain an alias for compatibility.
|
|
|
|
|
(defalias 'rst-adjust-section-title 'rst-adjust)
|
|
|
|
|
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-promote-region (demote)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
"Promote the section titles within the region.
|
|
|
|
|
|
2008-12-18 16:19:12 +00:00
|
|
|
|
With argument DEMOTE or a prefix argument, demote the section
|
|
|
|
|
titles instead. The algorithm used at the boundaries of the
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
hierarchy is similar to that used by `rst-adjust-adornment-work'."
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(rst-reset-section-caches)
|
|
|
|
|
(let* ((cur (rst-find-all-adornments))
|
|
|
|
|
(hier (rst-get-hierarchy))
|
|
|
|
|
(suggestion (rst-suggest-new-adornment hier))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(region-begin-line (line-number-at-pos (region-beginning)))
|
|
|
|
|
(region-end-line (line-number-at-pos (region-end)))
|
|
|
|
|
|
|
|
|
|
marker-list
|
|
|
|
|
)
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Skip the markers that come before the region beginning.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(while (and cur (< (caar cur) region-begin-line))
|
|
|
|
|
(setq cur (cdr cur)))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Create a list of markers for all the adornments which are found within
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; the region.
|
|
|
|
|
(save-excursion
|
2010-11-18 03:02:15 +00:00
|
|
|
|
(let (line)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(while (and cur (< (setq line (caar cur)) region-end-line))
|
2009-08-22 19:29:18 +00:00
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(forward-line (1- line))
|
2010-11-18 03:02:15 +00:00
|
|
|
|
(push (list (point-marker) (cdar cur)) marker-list)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(setq cur (cdr cur)) ))
|
|
|
|
|
|
|
|
|
|
;; Apply modifications.
|
2010-11-18 03:02:15 +00:00
|
|
|
|
(dolist (p marker-list)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Go to the adornment to promote.
|
|
|
|
|
(goto-char (car p))
|
2010-11-18 03:02:15 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Update the adornment.
|
|
|
|
|
(apply 'rst-update-section
|
|
|
|
|
;; Rotate the next adornment.
|
|
|
|
|
(rst-get-next-adornment
|
|
|
|
|
(cadr p) hier suggestion demote))
|
2010-11-18 03:02:15 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Clear marker to avoid slowing down the editing after we're done.
|
|
|
|
|
(set-marker (car p) nil))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(setq deactivate-mark nil)
|
2010-11-18 03:02:15 +00:00
|
|
|
|
)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-display-adornments-hierarchy (&optional adornments)
|
|
|
|
|
"Display the current file's section title adornments hierarchy.
|
|
|
|
|
This function expects a list of (CHARACTER STYLE INDENT) triples
|
|
|
|
|
in ADORNMENTS."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(interactive)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-reset-section-caches)
|
|
|
|
|
(if (not adornments)
|
|
|
|
|
(setq adornments (rst-get-hierarchy)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(with-output-to-temp-buffer "*rest section hierarchy*"
|
|
|
|
|
(let ((level 1))
|
|
|
|
|
(with-current-buffer standard-output
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(dolist (x adornments)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(insert (format "\nSection Level %d" level))
|
|
|
|
|
(apply 'rst-update-section x)
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(insert "\n")
|
|
|
|
|
(incf level)
|
|
|
|
|
))
|
|
|
|
|
)))
|
|
|
|
|
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(defun rst-position (elem list)
|
|
|
|
|
"Return position of ELEM in LIST or nil."
|
|
|
|
|
(let ((tail (member elem list)))
|
|
|
|
|
(if tail (- (length list) (length tail)))))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-straighten-adornments ()
|
|
|
|
|
"Redo all the adornments in the current buffer.
|
|
|
|
|
This is done using our preferred set of adornments. This can be
|
2008-06-20 16:00:33 +00:00
|
|
|
|
used, for example, when using somebody else's copy of a document,
|
|
|
|
|
in order to adapt it to our preferred style."
|
|
|
|
|
(interactive)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-reset-section-caches)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(save-excursion
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(let (;; Get a list of pairs of (level . marker).
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(levels-and-markers (mapcar
|
|
|
|
|
(lambda (ado)
|
|
|
|
|
(cons (rst-position (cdr ado)
|
|
|
|
|
(rst-get-hierarchy))
|
|
|
|
|
(progn
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(forward-line (1- (car ado)))
|
|
|
|
|
(point-marker))))
|
|
|
|
|
(rst-find-all-adornments))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(dolist (lm levels-and-markers)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Go to the appropriate position.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(goto-char (cdr lm))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Apply the new style.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(apply 'rst-update-section (nth (car lm) rst-preferred-adornments))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Reset the market to avoid slowing down editing until it gets GC'ed.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(set-marker (cdr lm) nil)
|
|
|
|
|
)
|
|
|
|
|
)))
|
|
|
|
|
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; Insert list items
|
|
|
|
|
;; =================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;=================================================
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; Borrowed from a2r.el (version 1.3), by Lawrence Mitchell <wence@gmx.li>.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
; I needed to make some tiny changes to the functions, so I put it here.
|
|
|
|
|
; -- Wei-Wei Guo
|
|
|
|
|
|
|
|
|
|
(defconst rst-arabic-to-roman
|
|
|
|
|
'((1000 . "M") (900 . "CM") (500 . "D") (400 . "CD")
|
|
|
|
|
(100 . "C") (90 . "XC") (50 . "L") (40 . "XL")
|
|
|
|
|
(10 . "X") (9 . "IX") (5 . "V") (4 . "IV")
|
|
|
|
|
(1 . "I"))
|
|
|
|
|
"List of maps between Arabic numbers and their Roman numeral equivalents.")
|
|
|
|
|
|
|
|
|
|
(defun rst-arabic-to-roman (num &optional arg)
|
|
|
|
|
"Convert Arabic number NUM to its Roman numeral representation.
|
|
|
|
|
|
|
|
|
|
Obviously, NUM must be greater than zero. Don't blame me, blame the
|
|
|
|
|
Romans, I mean \"what have the Romans ever _done_ for /us/?\" (with
|
|
|
|
|
apologies to Monty Python).
|
|
|
|
|
If optional prefix ARG is non-nil, insert in current buffer."
|
|
|
|
|
(let ((map rst-arabic-to-roman)
|
|
|
|
|
res)
|
|
|
|
|
(while (and map (> num 0))
|
|
|
|
|
(if (or (= num (caar map))
|
|
|
|
|
(> num (caar map)))
|
|
|
|
|
(setq res (concat res (cdar map))
|
|
|
|
|
num (- num (caar map)))
|
|
|
|
|
(setq map (cdr map))))
|
|
|
|
|
res))
|
|
|
|
|
|
|
|
|
|
(defun rst-roman-to-arabic (string &optional arg)
|
|
|
|
|
"Convert STRING of Roman numerals to an Arabic number.
|
|
|
|
|
|
|
|
|
|
If STRING contains a letter which isn't a valid Roman numeral, the rest
|
|
|
|
|
of the string from that point onwards is ignored.
|
|
|
|
|
|
|
|
|
|
Hence:
|
|
|
|
|
MMD == 2500
|
|
|
|
|
and
|
|
|
|
|
MMDFLXXVI == 2500.
|
|
|
|
|
If optional ARG is non-nil, insert in current buffer."
|
|
|
|
|
(let ((res 0)
|
|
|
|
|
(map rst-arabic-to-roman))
|
|
|
|
|
(while map
|
|
|
|
|
(if (string-match (concat "^" (cdar map)) string)
|
|
|
|
|
(setq res (+ res (caar map))
|
|
|
|
|
string (replace-match "" nil t string))
|
|
|
|
|
(setq map (cdr map))))
|
|
|
|
|
res))
|
|
|
|
|
;=================================================
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(defun rst-find-pfx-in-region (beg end pfx-re)
|
|
|
|
|
"Find all the positions of prefixes in region between BEG and END.
|
2012-05-29 20:14:18 +00:00
|
|
|
|
This is used to find bullets and enumerated list items. PFX-RE is
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
a regular expression for matching the lines after indentation
|
2012-05-29 20:14:18 +00:00
|
|
|
|
with items. Returns a list of cons cells consisting of the point
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
and the column of the point."
|
2010-11-18 03:02:15 +00:00
|
|
|
|
(let ((pfx ()))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char beg)
|
|
|
|
|
(while (< (point) end)
|
|
|
|
|
(back-to-indentation)
|
|
|
|
|
(when (and
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(looking-at pfx-re) ; pfx found and...
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(let ((pfx-col (current-column)))
|
|
|
|
|
(save-excursion
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(forward-line -1) ; ...previous line is...
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(back-to-indentation)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(or (looking-at (rst-re 'lin-end)) ; ...empty,
|
|
|
|
|
(> (current-column) pfx-col) ; ...deeper level, or
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(and (= (current-column) pfx-col)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(looking-at pfx-re)))))) ; ...pfx at same level.
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(push (cons (point) (current-column))
|
|
|
|
|
pfx))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(forward-line 1)) )
|
|
|
|
|
(nreverse pfx)))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-insert-list-pos (newitem)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Arrange relative position of a newly inserted list item of style NEWITEM.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
Adding a new list might consider three situations:
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(a) Current line is a blank line.
|
|
|
|
|
(b) Previous line is a blank line.
|
|
|
|
|
(c) Following line is a blank line.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
When (a) and (b), just add the new list at current line.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
when (a) and not (b), a blank line is added before adding the new list.
|
|
|
|
|
|
|
|
|
|
When not (a), first forward point to the end of the line, and add two
|
|
|
|
|
blank lines, then add the new list.
|
|
|
|
|
|
|
|
|
|
Other situations are just ignored and left to users themselves."
|
|
|
|
|
(if (save-excursion
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(looking-at (rst-re 'lin-end)))
|
|
|
|
|
(if (save-excursion
|
|
|
|
|
(forward-line -1)
|
|
|
|
|
(looking-at (rst-re 'lin-end)))
|
|
|
|
|
(insert newitem " ")
|
|
|
|
|
(insert "\n" newitem " "))
|
|
|
|
|
(end-of-line)
|
|
|
|
|
(insert "\n\n" newitem " ")))
|
|
|
|
|
|
|
|
|
|
(defvar rst-initial-enums
|
|
|
|
|
(let (vals)
|
|
|
|
|
(dolist (fmt '("%s." "(%s)" "%s)"))
|
|
|
|
|
(dolist (c '("1" "a" "A" "I" "i"))
|
|
|
|
|
(push (format fmt c) vals)))
|
|
|
|
|
(cons "#." (nreverse vals)))
|
|
|
|
|
"List of initial enumerations.")
|
|
|
|
|
|
|
|
|
|
(defvar rst-initial-items
|
|
|
|
|
(append (mapcar 'char-to-string rst-bullets) rst-initial-enums)
|
|
|
|
|
"List of initial items. It's collection of bullets and enumerations.")
|
|
|
|
|
|
|
|
|
|
(defun rst-insert-list-new-item ()
|
|
|
|
|
"Insert a new list item.
|
|
|
|
|
|
|
|
|
|
User is asked to select the item style first, for example (a), i), +. Use TAB
|
2012-05-29 06:16:49 +00:00
|
|
|
|
for completion and choices.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
If user selects bullets or #, it's just added with position arranged by
|
|
|
|
|
`rst-insert-list-pos'.
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
If user selects enumerations, a further prompt is given. User need to input a
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
starting item, for example 'e' for 'A)' style. The position is also arranged by
|
|
|
|
|
`rst-insert-list-pos'."
|
|
|
|
|
(interactive)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: Make this comply to `interactive' standards.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let* ((itemstyle (completing-read
|
|
|
|
|
"Select preferred item style [#.]: "
|
|
|
|
|
rst-initial-items nil t nil nil "#."))
|
|
|
|
|
(cnt (if (string-match (rst-re 'cntexp-tag) itemstyle)
|
|
|
|
|
(match-string 0 itemstyle)))
|
|
|
|
|
(no
|
|
|
|
|
(save-match-data
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: Make this comply to `interactive' standards.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(cond
|
|
|
|
|
((equal cnt "a")
|
|
|
|
|
(let ((itemno (read-string "Give starting value [a]: "
|
|
|
|
|
nil nil "a")))
|
|
|
|
|
(downcase (substring itemno 0 1))))
|
|
|
|
|
((equal cnt "A")
|
|
|
|
|
(let ((itemno (read-string "Give starting value [A]: "
|
|
|
|
|
nil nil "A")))
|
|
|
|
|
(upcase (substring itemno 0 1))))
|
|
|
|
|
((equal cnt "I")
|
|
|
|
|
(let ((itemno (read-number "Give starting value [1]: " 1)))
|
|
|
|
|
(rst-arabic-to-roman itemno)))
|
|
|
|
|
((equal cnt "i")
|
|
|
|
|
(let ((itemno (read-number "Give starting value [1]: " 1)))
|
|
|
|
|
(downcase (rst-arabic-to-roman itemno))))
|
|
|
|
|
((equal cnt "1")
|
|
|
|
|
(let ((itemno (read-number "Give starting value [1]: " 1)))
|
|
|
|
|
(number-to-string itemno)))))))
|
|
|
|
|
(if no
|
|
|
|
|
(setq itemstyle (replace-match no t t itemstyle)))
|
|
|
|
|
(rst-insert-list-pos itemstyle)))
|
|
|
|
|
|
|
|
|
|
(defcustom rst-preferred-bullets
|
|
|
|
|
'(?* ?- ?+)
|
|
|
|
|
"List of favorite bullets."
|
|
|
|
|
:group 'rst
|
|
|
|
|
:type `(repeat
|
|
|
|
|
(choice ,@(mapcar (lambda (char)
|
|
|
|
|
(list 'const
|
|
|
|
|
:tag (char-to-string char) char))
|
|
|
|
|
rst-bullets)))
|
|
|
|
|
:package-version '(rst . "1.1.0"))
|
|
|
|
|
|
|
|
|
|
(defun rst-insert-list-continue (curitem prefer-roman)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Insert a list item with list start CURITEM including its indentation level.
|
|
|
|
|
If PREFER-ROMAN roman numbering is preferred over using letters."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(end-of-line)
|
|
|
|
|
(insert
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"\n" ; FIXME: Separating lines must be possible.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(cond
|
|
|
|
|
((string-match (rst-re '(:alt enmaut-tag
|
|
|
|
|
bul-tag)) curitem)
|
|
|
|
|
curitem)
|
|
|
|
|
((string-match (rst-re 'num-tag) curitem)
|
|
|
|
|
(replace-match (number-to-string
|
|
|
|
|
(1+ (string-to-number (match-string 0 curitem))))
|
|
|
|
|
nil nil curitem))
|
|
|
|
|
((and (string-match (rst-re 'rom-tag) curitem)
|
|
|
|
|
(save-match-data
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(if (string-match (rst-re 'ltr-tag) curitem) ; Also a letter tag.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
;; FIXME: Assumes one line list items without separating
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; empty lines.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (and (zerop (forward-line -1))
|
|
|
|
|
(looking-at (rst-re 'enmexp-beg)))
|
|
|
|
|
(string-match
|
|
|
|
|
(rst-re 'rom-tag)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(match-string 0)) ; Previous was a roman tag.
|
|
|
|
|
prefer-roman)) ; Don't know - use flag.
|
|
|
|
|
t))) ; Not a letter tag.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(replace-match
|
|
|
|
|
(let* ((old (match-string 0 curitem))
|
|
|
|
|
(new (save-match-data
|
|
|
|
|
(rst-arabic-to-roman
|
|
|
|
|
(1+ (rst-roman-to-arabic
|
|
|
|
|
(upcase old)))))))
|
|
|
|
|
(if (equal old (upcase old))
|
|
|
|
|
(upcase new)
|
|
|
|
|
(downcase new)))
|
|
|
|
|
t nil curitem))
|
|
|
|
|
((string-match (rst-re 'ltr-tag) curitem)
|
|
|
|
|
(replace-match (char-to-string
|
|
|
|
|
(1+ (string-to-char (match-string 0 curitem))))
|
|
|
|
|
nil nil curitem)))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun rst-insert-list (&optional prefer-roman)
|
|
|
|
|
"Insert a list item at the current point.
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
The command can insert a new list or a continuing list. When it is called at a
|
|
|
|
|
non-list line, it will promote to insert new list. When it is called at a list
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
line, it will insert a list with the same list style.
|
|
|
|
|
|
|
|
|
|
1. When inserting a new list:
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
User is asked to select the item style first, for example (a), i), +. Use TAB
|
2012-05-29 06:16:49 +00:00
|
|
|
|
for completion and choices.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
(a) If user selects bullets or #, it's just added.
|
|
|
|
|
(b) If user selects enumerations, a further prompt is given. User needs to
|
|
|
|
|
input a starting item, for example 'e' for 'A)' style.
|
|
|
|
|
|
|
|
|
|
The position of the new list is arranged according to whether or not the
|
|
|
|
|
current line and the previous line are blank lines.
|
|
|
|
|
|
|
|
|
|
2. When continuing a list, one thing need to be noticed:
|
|
|
|
|
|
|
|
|
|
List style alphabetical list, such as 'a.', and roman numerical list, such as
|
|
|
|
|
'i.', have some overlapping items, for example 'v.' The function can deal with
|
|
|
|
|
the problem elegantly in most situations. But when those overlapped list are
|
|
|
|
|
preceded by a blank line, it is hard to determine which type to use
|
|
|
|
|
automatically. The function uses alphabetical list by default. If you want
|
2012-05-29 20:14:18 +00:00
|
|
|
|
roman numerical list, just use a prefix to set PREFER-ROMAN."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(interactive "P")
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(if (looking-at (rst-re 'itmany-beg-1))
|
|
|
|
|
(rst-insert-list-continue (match-string 0) prefer-roman)
|
|
|
|
|
(rst-insert-list-new-item)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(defun rst-straighten-bullets-region (beg end)
|
|
|
|
|
"Make all the bulleted list items in the region consistent.
|
|
|
|
|
The region is specified between BEG and END. You can use this
|
|
|
|
|
after you have merged multiple bulleted lists to make them use
|
|
|
|
|
the same/correct/consistent bullet characters.
|
|
|
|
|
|
|
|
|
|
See variable `rst-preferred-bullets' for the list of bullets to
|
|
|
|
|
adjust. If bullets are found on levels beyond the
|
|
|
|
|
`rst-preferred-bullets' list, they are not modified."
|
|
|
|
|
(interactive "r")
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let ((bullets (rst-find-pfx-in-region beg end (rst-re 'bul-sta)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(levtable (make-hash-table :size 4)))
|
|
|
|
|
|
|
|
|
|
;; Create a map of levels to list of positions.
|
|
|
|
|
(dolist (x bullets)
|
|
|
|
|
(let ((key (cdr x)))
|
|
|
|
|
(puthash key
|
|
|
|
|
(append (gethash key levtable (list))
|
|
|
|
|
(list (car x)))
|
|
|
|
|
levtable)))
|
|
|
|
|
|
|
|
|
|
;; Sort this map and create a new map of prefix char and list of positions.
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(let ((poslist ())) ; List of (indent . positions).
|
|
|
|
|
(maphash (lambda (x y) (push (cons x y) poslist)) levtable)
|
|
|
|
|
|
|
|
|
|
(let ((bullets rst-preferred-bullets))
|
|
|
|
|
(dolist (x (sort poslist 'car-less-than-car))
|
|
|
|
|
(when bullets
|
|
|
|
|
;; Apply the characters.
|
|
|
|
|
(dolist (pos (cdr x))
|
|
|
|
|
(goto-char pos)
|
|
|
|
|
(delete-char 1)
|
|
|
|
|
(insert (string (car bullets))))
|
|
|
|
|
(setq bullets (cdr bullets))))))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; Table of contents
|
|
|
|
|
;; =================
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(defun rst-get-stripped-line ()
|
|
|
|
|
"Return the line at cursor, stripped from whitespace."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(re-search-forward (rst-re "\\S .*\\S ") (line-end-position))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(buffer-substring-no-properties (match-beginning 0)
|
|
|
|
|
(match-end 0)) )
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-section-tree ()
|
2008-06-20 16:00:33 +00:00
|
|
|
|
"Get the hierarchical tree of section titles.
|
|
|
|
|
|
|
|
|
|
Returns a hierarchical tree of the sections titles in the
|
2012-05-29 20:14:18 +00:00
|
|
|
|
document. This can be used to generate a table of contents for
|
|
|
|
|
the document. The top node will always be a nil node, with the
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
top level titles as children (there may potentially be more than
|
|
|
|
|
one).
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
Each section title consists in a cons of the stripped title
|
|
|
|
|
string and a marker to the section in the original text document.
|
|
|
|
|
|
|
|
|
|
If there are missing section levels, the section titles are
|
|
|
|
|
inserted automatically, and the title string is set to nil, and
|
|
|
|
|
the marker set to the first non-nil child of itself.
|
2012-05-29 20:14:18 +00:00
|
|
|
|
Conceptually, the nil nodes--i.e.\ those which have no title--are
|
2008-06-20 16:00:33 +00:00
|
|
|
|
to be considered as being the same line as their first non-nil
|
|
|
|
|
child. This has advantages later in processing the graph."
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let ((hier (rst-get-hierarchy))
|
|
|
|
|
(levels (make-hash-table :test 'equal :size 10))
|
|
|
|
|
lines)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(let ((lev 0))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(dolist (ado hier)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Compare just the character and indent in the hash table.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(puthash (cons (car ado) (cadr ado)) lev levels)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(incf lev)))
|
|
|
|
|
|
|
|
|
|
;; Create a list of lines that contains (text, level, marker) for each
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; adornment.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(setq lines
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(mapcar (lambda (ado)
|
2009-08-22 19:29:18 +00:00
|
|
|
|
(goto-char (point-min))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(forward-line (1- (car ado)))
|
|
|
|
|
(list (gethash (cons (cadr ado) (caddr ado)) levels)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(rst-get-stripped-line)
|
2010-11-18 03:02:15 +00:00
|
|
|
|
(progn
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(beginning-of-line 1)
|
2010-11-18 03:02:15 +00:00
|
|
|
|
(point-marker))))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-find-all-adornments))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(let ((lcontnr (cons nil lines)))
|
|
|
|
|
(rst-section-tree-rec lcontnr -1))))
|
|
|
|
|
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-section-tree-rec (ados lev)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
"Recursive guts of the section tree construction.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
ADOS is a cons cell whose cdr is the remaining list of
|
|
|
|
|
adornments, and we change it as we consume them. LEV is
|
2008-12-18 16:19:12 +00:00
|
|
|
|
the current level of that node. This function returns a
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
pair of the subtree that was built. This treats the ADOS
|
2008-12-18 16:19:12 +00:00
|
|
|
|
list destructively."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let ((nado (cadr ados))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
node
|
|
|
|
|
children)
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; If the next adornment matches our level.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(when (and nado (= (car nado) lev))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Pop the next adornment and create the current node with it.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setcdr ados (cddr ados))
|
|
|
|
|
(setq node (cdr nado)) )
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Else we let the node title/marker be unset.
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Build the child nodes.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(while (and (cdr ados) (> (caadr ados) lev))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(setq children
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(cons (rst-section-tree-rec ados (1+ lev))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
children)))
|
|
|
|
|
(setq children (reverse children))
|
|
|
|
|
|
|
|
|
|
;; If node is still unset, we use the marker of the first child.
|
|
|
|
|
(when (eq node nil)
|
|
|
|
|
(setq node (cons nil (cdaar children))))
|
|
|
|
|
|
|
|
|
|
;; Return this node with its children.
|
|
|
|
|
(cons node children)
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun rst-section-tree-point (node &optional point)
|
|
|
|
|
"Find tree node at point.
|
|
|
|
|
Given a computed and valid section tree in NODE and a point
|
|
|
|
|
POINT (default being the current point in the current buffer),
|
2012-05-29 20:14:18 +00:00
|
|
|
|
find and return the node within the section tree where the cursor
|
2008-06-20 16:00:33 +00:00
|
|
|
|
lives.
|
|
|
|
|
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
Return values: a pair of (parent path, container subtree).
|
|
|
|
|
The parent path is simply a list of the nodes above the
|
|
|
|
|
container subtree node that we're returning."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(let (path outtree)
|
|
|
|
|
|
|
|
|
|
(let* ((curpoint (or point (point))))
|
|
|
|
|
|
|
|
|
|
;; Check if we are before the current node.
|
|
|
|
|
(if (and (cadar node) (>= curpoint (cadar node)))
|
|
|
|
|
|
|
|
|
|
;; Iterate all the children, looking for one that might contain the
|
|
|
|
|
;; current section.
|
|
|
|
|
(let ((curnode (cdr node))
|
|
|
|
|
last)
|
|
|
|
|
|
|
|
|
|
(while (and curnode (>= curpoint (cadaar curnode)))
|
|
|
|
|
(setq last curnode
|
|
|
|
|
curnode (cdr curnode)))
|
|
|
|
|
|
|
|
|
|
(if last
|
|
|
|
|
(let ((sub (rst-section-tree-point (car last) curpoint)))
|
|
|
|
|
(setq path (car sub)
|
|
|
|
|
outtree (cdr sub)))
|
|
|
|
|
(setq outtree node))
|
|
|
|
|
|
|
|
|
|
)))
|
|
|
|
|
(cons (cons (car node) path) outtree)
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(defgroup rst-toc nil
|
|
|
|
|
"Settings for reStructuredText table of contents."
|
|
|
|
|
:group 'rst
|
|
|
|
|
:version "21.1")
|
|
|
|
|
|
|
|
|
|
(defcustom rst-toc-indent 2
|
|
|
|
|
"Indentation for table-of-contents display.
|
|
|
|
|
Also used for formatting insertion, when numbering is disabled."
|
|
|
|
|
:group 'rst-toc)
|
|
|
|
|
|
|
|
|
|
(defcustom rst-toc-insert-style 'fixed
|
|
|
|
|
"Insertion style for table-of-contents.
|
|
|
|
|
Set this to one of the following values to determine numbering and
|
|
|
|
|
indentation style:
|
|
|
|
|
- plain: no numbering (fixed indentation)
|
|
|
|
|
- fixed: numbering, but fixed indentation
|
|
|
|
|
- aligned: numbering, titles aligned under each other
|
|
|
|
|
- listed: numbering, with dashes like list items (EXPERIMENTAL)"
|
|
|
|
|
:group 'rst-toc)
|
|
|
|
|
|
|
|
|
|
(defcustom rst-toc-insert-number-separator " "
|
|
|
|
|
"Separator that goes between the TOC number and the title."
|
|
|
|
|
:group 'rst-toc)
|
|
|
|
|
|
|
|
|
|
;; This is used to avoid having to change the user's mode.
|
|
|
|
|
(defvar rst-toc-insert-click-keymap
|
|
|
|
|
(let ((map (make-sparse-keymap)))
|
|
|
|
|
(define-key map [mouse-1] 'rst-toc-mode-mouse-goto)
|
|
|
|
|
map)
|
|
|
|
|
"(Internal) What happens when you click on propertized text in the TOC.")
|
|
|
|
|
|
|
|
|
|
(defcustom rst-toc-insert-max-level nil
|
|
|
|
|
"If non-nil, maximum depth of the inserted TOC."
|
|
|
|
|
:group 'rst-toc)
|
|
|
|
|
|
|
|
|
|
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(defun rst-toc-insert (&optional pfxarg)
|
|
|
|
|
"Insert a simple text rendering of the table of contents.
|
|
|
|
|
By default the top level is ignored if there is only one, because
|
|
|
|
|
we assume that the document will have a single title.
|
|
|
|
|
|
|
|
|
|
If a numeric prefix argument PFXARG is given, insert the TOC up
|
|
|
|
|
to the specified level.
|
|
|
|
|
|
|
|
|
|
The TOC is inserted indented at the current column."
|
|
|
|
|
(interactive "P")
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-reset-section-caches)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(let* (;; Check maximum level override.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(rst-toc-insert-max-level
|
|
|
|
|
(if (and (integerp pfxarg) (> (prefix-numeric-value pfxarg) 0))
|
|
|
|
|
(prefix-numeric-value pfxarg) rst-toc-insert-max-level))
|
|
|
|
|
|
|
|
|
|
;; Get the section tree for the current cursor point.
|
|
|
|
|
(sectree-pair
|
|
|
|
|
(rst-section-tree-point
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-section-tree)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;; Figure out initial indent.
|
|
|
|
|
(initial-indent (make-string (current-column) ? ))
|
|
|
|
|
(init-point (point)))
|
|
|
|
|
|
|
|
|
|
(when (cddr sectree-pair)
|
|
|
|
|
(rst-toc-insert-node (cdr sectree-pair) 0 initial-indent "")
|
|
|
|
|
|
|
|
|
|
;; Fixup for the first line.
|
|
|
|
|
(delete-region init-point (+ init-point (length initial-indent)))
|
|
|
|
|
|
|
|
|
|
;; Delete the last newline added.
|
Replace Lisp calls to delete-backward-char by delete-char.
* bs.el, expand.el, ido.el, image-dired.el, lpr.el, pcomplete.el,
skeleton.el, term.el, time.el, wid-edit.el, woman.el,
calc/calc-graph.el, calc/calc-help.el, calc/calc-incom.el,
calc/calc.el, emacs-cl-extra.el, emacs-cl-loaddefs.el,
emulation/cua-rect.el, emulation/viper-ex.el, eshell/esh-test.el,
eshell/eshell.el, gnus/gnus-uu.el, gnus/nndoc.el, gnus/nnrss.el,
gnus/rfc2047.el, gnus/utf7.el, international/utf-7.el,
language/ethio-util.el, mh-e/mh-alias.el, mh-e/mh-search.el,
net/imap.el, net/rcirc.el, obsolete/complete.el, play/decipher.el,
progmodes/ada-mode.el, progmodes/cc-awk.el, progmodes/dcl-mode.el,
progmodes/ps-mode.el, progmodes/verilog-mode.el,
progmodes/vhdl-mode.el, textmodes/bibtex.el, textmodes/fill.el,
textmodes/reftex-auc.el, textmodes/rst.el, textmodes/sgml-mode.el,
textmodes/table.el, textmodes/texinfmt.el: Replace Lisp calls to
delete-backward-char by calls to delete-char.
2010-05-25 02:11:08 +00:00
|
|
|
|
(delete-char -1)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
)))
|
|
|
|
|
|
|
|
|
|
(defun rst-toc-insert-node (node level indent pfx)
|
|
|
|
|
"Insert tree node NODE in table-of-contents.
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
Recursive function that does printing of the inserted toc.
|
|
|
|
|
LEVEL is the depth level of the sections in the tree.
|
|
|
|
|
INDENT is the indentation string. PFX is the prefix numbering,
|
|
|
|
|
that includes the alignment necessary for all the children of
|
|
|
|
|
level to align."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;; Note: we do child numbering from the parent, so we start number the
|
|
|
|
|
;; children one level before we print them.
|
|
|
|
|
(let ((do-print (> level 0))
|
|
|
|
|
(count 1))
|
|
|
|
|
(when do-print
|
|
|
|
|
(insert indent)
|
|
|
|
|
(let ((b (point)))
|
|
|
|
|
(unless (equal rst-toc-insert-style 'plain)
|
|
|
|
|
(insert pfx rst-toc-insert-number-separator))
|
|
|
|
|
(insert (or (caar node) "[missing node]"))
|
|
|
|
|
;; Add properties to the text, even though in normal text mode it
|
|
|
|
|
;; won't be doing anything for now. Not sure that I want to change
|
|
|
|
|
;; mode stuff. At least the highlighting gives the idea that this
|
|
|
|
|
;; is generated automatically.
|
|
|
|
|
(put-text-property b (point) 'mouse-face 'highlight)
|
|
|
|
|
(put-text-property b (point) 'rst-toc-target (cadar node))
|
|
|
|
|
(put-text-property b (point) 'keymap rst-toc-insert-click-keymap)
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
(insert "\n")
|
|
|
|
|
|
|
|
|
|
;; Prepare indent for children.
|
|
|
|
|
(setq indent
|
|
|
|
|
(cond
|
|
|
|
|
((eq rst-toc-insert-style 'plain)
|
|
|
|
|
(concat indent (make-string rst-toc-indent ? )))
|
|
|
|
|
|
|
|
|
|
((eq rst-toc-insert-style 'fixed)
|
|
|
|
|
(concat indent (make-string rst-toc-indent ? )))
|
|
|
|
|
|
|
|
|
|
((eq rst-toc-insert-style 'aligned)
|
|
|
|
|
(concat indent (make-string (+ (length pfx) 2) ? )))
|
|
|
|
|
|
|
|
|
|
((eq rst-toc-insert-style 'listed)
|
|
|
|
|
(concat (substring indent 0 -3)
|
|
|
|
|
(concat (make-string (+ (length pfx) 2) ? ) " - ")))
|
|
|
|
|
))
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
(if (or (eq rst-toc-insert-max-level nil)
|
|
|
|
|
(< level rst-toc-insert-max-level))
|
|
|
|
|
(let ((do-child-numbering (>= level 0))
|
|
|
|
|
fmt)
|
|
|
|
|
(if do-child-numbering
|
|
|
|
|
(progn
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Add a separating dot if there is already a prefix.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(when (> (length pfx) 0)
|
|
|
|
|
(string-match (rst-re "[ \t\n]*\\'") pfx)
|
|
|
|
|
(setq pfx (concat (replace-match "" t t pfx) ".")))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;; Calculate the amount of space that the prefix will require
|
|
|
|
|
;; for the numbers.
|
|
|
|
|
(if (cdr node)
|
|
|
|
|
(setq fmt (format "%%-%dd"
|
|
|
|
|
(1+ (floor (log10 (length
|
|
|
|
|
(cdr node))))))))
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
(dolist (child (cdr node))
|
|
|
|
|
(rst-toc-insert-node child
|
|
|
|
|
(1+ level)
|
|
|
|
|
indent
|
|
|
|
|
(if do-child-numbering
|
|
|
|
|
(concat pfx (format fmt count)) pfx))
|
|
|
|
|
(incf count)))
|
|
|
|
|
|
|
|
|
|
)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun rst-toc-update ()
|
|
|
|
|
"Automatically find the contents section of a document and update.
|
|
|
|
|
Updates the inserted TOC if present. You can use this in your
|
|
|
|
|
file-write hook to always make it up-to-date automatically."
|
|
|
|
|
(interactive)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
;; Find and delete an existing comment after the first contents directive.
|
|
|
|
|
;; Delete that region.
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
;; We look for the following and the following only (in other words, if your
|
|
|
|
|
;; syntax differs, this won't work.).
|
|
|
|
|
;;
|
|
|
|
|
;; .. contents:: [...anything here...]
|
|
|
|
|
;; [:field: value]...
|
|
|
|
|
;; ..
|
|
|
|
|
;; XXXXXXXX
|
|
|
|
|
;; XXXXXXXX
|
|
|
|
|
;; [more lines]
|
|
|
|
|
(let ((beg (re-search-forward
|
|
|
|
|
(rst-re "^" 'exm-sta "contents" 'dcl-tag ".*\n"
|
|
|
|
|
"\\(?:" 'hws-sta 'fld-tag ".*\n\\)*" 'exm-tag) nil t))
|
|
|
|
|
last-real)
|
|
|
|
|
(when beg
|
|
|
|
|
;; Look for the first line that starts at the first column.
|
|
|
|
|
(forward-line 1)
|
|
|
|
|
(while (and
|
|
|
|
|
(< (point) (point-max))
|
|
|
|
|
(or (if (looking-at
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(rst-re 'hws-sta "\\S ")) ; indented content.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setq last-real (point)))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(looking-at (rst-re 'lin-end)))) ; empty line.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(forward-line 1))
|
|
|
|
|
(if last-real
|
|
|
|
|
(progn
|
|
|
|
|
(goto-char last-real)
|
|
|
|
|
(end-of-line)
|
|
|
|
|
(delete-region beg (point)))
|
|
|
|
|
(goto-char beg))
|
|
|
|
|
(insert "\n ")
|
|
|
|
|
(rst-toc-insert))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Note: always return nil, because this may be used as a hook.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
nil)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;; Note: we cannot bind the TOC update on file write because it messes with
|
|
|
|
|
;; undo. If we disable undo, since it adds and removes characters, the
|
|
|
|
|
;; positions in the undo list are not making sense anymore. Dunno what to do
|
|
|
|
|
;; with this, it would be nice to update when saving.
|
|
|
|
|
;;
|
|
|
|
|
;; (add-hook 'write-contents-hooks 'rst-toc-update-fun)
|
|
|
|
|
;; (defun rst-toc-update-fun ()
|
|
|
|
|
;; ;; Disable undo for the write file hook.
|
|
|
|
|
;; (let ((buffer-undo-list t)) (rst-toc-update) ))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defalias 'rst-toc-insert-update 'rst-toc-update) ; backwards compat.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;;------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
(defun rst-toc-node (node level)
|
|
|
|
|
"Recursive function that does insert NODE at LEVEL in the table-of-contents."
|
|
|
|
|
|
|
|
|
|
(if (> level 0)
|
|
|
|
|
(let ((b (point)))
|
|
|
|
|
;; Insert line text.
|
|
|
|
|
(insert (make-string (* rst-toc-indent (1- level)) ? ))
|
|
|
|
|
(insert (or (caar node) "[missing node]"))
|
|
|
|
|
|
|
|
|
|
;; Highlight lines.
|
|
|
|
|
(put-text-property b (point) 'mouse-face 'highlight)
|
|
|
|
|
|
|
|
|
|
;; Add link on lines.
|
|
|
|
|
(put-text-property b (point) 'rst-toc-target (cadar node))
|
|
|
|
|
|
|
|
|
|
(insert "\n")
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
(dolist (child (cdr node))
|
|
|
|
|
(rst-toc-node child (1+ level))))
|
|
|
|
|
|
|
|
|
|
(defun rst-toc-count-lines (node target-node)
|
|
|
|
|
"Count the number of lines from NODE to the TARGET-NODE node.
|
|
|
|
|
This recursive function returns a cons of the number of
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
additional lines that have been counted for its node and
|
|
|
|
|
children, and t if the node has been found."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(let ((count 1)
|
|
|
|
|
found)
|
|
|
|
|
(if (eq node target-node)
|
|
|
|
|
(setq found t)
|
|
|
|
|
(let ((child (cdr node)))
|
|
|
|
|
(while (and child (not found))
|
|
|
|
|
(let ((cl (rst-toc-count-lines (car child) target-node)))
|
|
|
|
|
(setq count (+ count (car cl))
|
|
|
|
|
found (cdr cl)
|
|
|
|
|
child (cdr child))))))
|
|
|
|
|
(cons count found)))
|
|
|
|
|
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(defvar rst-toc-buffer-name "*Table of Contents*"
|
|
|
|
|
"Name of the Table of Contents buffer.")
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defvar rst-toc-return-wincfg nil
|
|
|
|
|
"Window configuration to which to return when leaving the TOC.")
|
2008-06-20 17:53:42 +00:00
|
|
|
|
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(defun rst-toc ()
|
|
|
|
|
"Display a table-of-contents.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
Finds all the section titles and their adornments in the
|
2008-06-20 16:00:33 +00:00
|
|
|
|
file, and displays a hierarchically-organized list of the
|
|
|
|
|
titles, which is essentially a table-of-contents of the
|
|
|
|
|
document.
|
|
|
|
|
|
|
|
|
|
The Emacs buffer can be navigated, and selecting a section
|
|
|
|
|
brings the cursor in that section."
|
|
|
|
|
(interactive)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-reset-section-caches)
|
|
|
|
|
(let* ((curbuf (list (current-window-configuration) (point-marker)))
|
|
|
|
|
(sectree (rst-section-tree))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(our-node (cdr (rst-section-tree-point sectree)))
|
|
|
|
|
line
|
|
|
|
|
|
|
|
|
|
;; Create a temporary buffer.
|
|
|
|
|
(buf (get-buffer-create rst-toc-buffer-name))
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
(with-current-buffer buf
|
|
|
|
|
(let ((inhibit-read-only t))
|
|
|
|
|
(rst-toc-mode)
|
|
|
|
|
(delete-region (point-min) (point-max))
|
|
|
|
|
(insert (format "Table of Contents: %s\n" (or (caar sectree) "")))
|
|
|
|
|
(put-text-property (point-min) (point)
|
|
|
|
|
'face (list '(background-color . "gray")))
|
|
|
|
|
(rst-toc-node sectree 0)
|
|
|
|
|
|
|
|
|
|
;; Count the lines to our found node.
|
|
|
|
|
(let ((linefound (rst-toc-count-lines sectree our-node)))
|
|
|
|
|
(setq line (if (cdr linefound) (car linefound) 0)))
|
|
|
|
|
))
|
|
|
|
|
(display-buffer buf)
|
|
|
|
|
(pop-to-buffer buf)
|
|
|
|
|
|
|
|
|
|
;; Save the buffer to return to.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(set (make-local-variable 'rst-toc-return-wincfg) curbuf)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;; Move the cursor near the right section in the TOC.
|
2009-08-22 19:29:18 +00:00
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(forward-line (1- line))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun rst-toc-mode-find-section ()
|
|
|
|
|
"Get the section from text property at point."
|
|
|
|
|
(let ((pos (get-text-property (point) 'rst-toc-target)))
|
|
|
|
|
(unless pos
|
|
|
|
|
(error "No section on this line"))
|
|
|
|
|
(unless (buffer-live-p (marker-buffer pos))
|
|
|
|
|
(error "Buffer for this section was killed"))
|
|
|
|
|
pos))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; FIXME: Cursor before or behind the list must be handled properly; before the
|
|
|
|
|
;; list should jump to the top and behind the list to the last normal
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; paragraph.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(defun rst-goto-section (&optional kill)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Go to the section the current line describes.
|
|
|
|
|
If KILL a toc buffer is destroyed."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(interactive)
|
|
|
|
|
(let ((pos (rst-toc-mode-find-section)))
|
|
|
|
|
(when kill
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: This should rather go to `rst-toc-mode-goto-section'.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(set-window-configuration (car rst-toc-return-wincfg))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(kill-buffer (get-buffer rst-toc-buffer-name)))
|
|
|
|
|
(pop-to-buffer (marker-buffer pos))
|
|
|
|
|
(goto-char pos)
|
|
|
|
|
;; FIXME: make the recentering conditional on scroll.
|
|
|
|
|
(recenter 5)))
|
|
|
|
|
|
|
|
|
|
(defun rst-toc-mode-goto-section ()
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
"Go to the section the current line describes and kill the TOC buffer."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(interactive)
|
|
|
|
|
(rst-goto-section t))
|
|
|
|
|
|
|
|
|
|
(defun rst-toc-mode-mouse-goto (event)
|
|
|
|
|
"In `rst-toc' mode, go to the occurrence whose line you click on.
|
|
|
|
|
EVENT is the input event."
|
|
|
|
|
(interactive "e")
|
2010-11-18 03:02:15 +00:00
|
|
|
|
(let ((pos
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(with-current-buffer (window-buffer (posn-window (event-end event)))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (posn-point (event-end event)))
|
2010-11-18 03:02:15 +00:00
|
|
|
|
(rst-toc-mode-find-section)))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(pop-to-buffer (marker-buffer pos))
|
|
|
|
|
(goto-char pos)
|
|
|
|
|
(recenter 5)))
|
|
|
|
|
|
|
|
|
|
(defun rst-toc-mode-mouse-goto-kill (event)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Same as `rst-toc-mode-mouse-goto', but kill TOC buffer as well.
|
|
|
|
|
EVENT is the input event."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(interactive "e")
|
|
|
|
|
(call-interactively 'rst-toc-mode-mouse-goto event)
|
|
|
|
|
(kill-buffer (get-buffer rst-toc-buffer-name)))
|
|
|
|
|
|
|
|
|
|
(defun rst-toc-quit-window ()
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"Leave the current TOC buffer."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(interactive)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let ((retbuf rst-toc-return-wincfg))
|
|
|
|
|
(set-window-configuration (car retbuf))
|
|
|
|
|
(goto-char (cadr retbuf))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(defvar rst-toc-mode-map
|
|
|
|
|
(let ((map (make-sparse-keymap)))
|
|
|
|
|
(define-key map [mouse-1] 'rst-toc-mode-mouse-goto-kill)
|
|
|
|
|
(define-key map [mouse-2] 'rst-toc-mode-mouse-goto)
|
|
|
|
|
(define-key map "\C-m" 'rst-toc-mode-goto-section)
|
|
|
|
|
(define-key map "f" 'rst-toc-mode-goto-section)
|
|
|
|
|
(define-key map "q" 'rst-toc-quit-window)
|
|
|
|
|
(define-key map "z" 'kill-this-buffer)
|
|
|
|
|
map)
|
|
|
|
|
"Keymap for `rst-toc-mode'.")
|
|
|
|
|
|
|
|
|
|
(put 'rst-toc-mode 'mode-class 'special)
|
|
|
|
|
|
2008-06-20 17:53:42 +00:00
|
|
|
|
;; Could inherit from the new `special-mode'.
|
|
|
|
|
(define-derived-mode rst-toc-mode nil "ReST-TOC"
|
2008-06-20 16:00:33 +00:00
|
|
|
|
"Major mode for output from \\[rst-toc], the table-of-contents for the document."
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(setq buffer-read-only t))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;; Note: use occur-mode (replace.el) as a good example to complete missing
|
|
|
|
|
;; features.
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Section movement commands
|
|
|
|
|
;; =========================
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(defun rst-forward-section (&optional offset)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
"Skip to the next reStructuredText section title.
|
2008-06-20 17:53:42 +00:00
|
|
|
|
OFFSET specifies how many titles to skip. Use a negative OFFSET to move
|
|
|
|
|
backwards in the file (default is to use 1)."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(interactive)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-reset-section-caches)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(let* (;; Default value for offset.
|
|
|
|
|
(offset (or offset 1))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Get all the adornments in the file, with their line numbers.
|
|
|
|
|
(allados (rst-find-all-adornments))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;; Get the current line.
|
|
|
|
|
(curline (line-number-at-pos))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(cur allados)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(idx 0)
|
|
|
|
|
)
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Find the index of the "next" adornment w.r.t. to the current line.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(while (and cur (< (caar cur) curline))
|
|
|
|
|
(setq cur (cdr cur))
|
|
|
|
|
(incf idx))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; 'cur' is the adornment on or following the current line.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(if (and (> offset 0) cur (= (caar cur) curline))
|
|
|
|
|
(incf idx))
|
|
|
|
|
|
|
|
|
|
;; Find the final index.
|
|
|
|
|
(setq idx (+ idx (if (> offset 0) (- offset 1) offset)))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setq cur (nth idx allados))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;; If the index is positive, goto the line, otherwise go to the buffer
|
|
|
|
|
;; boundaries.
|
|
|
|
|
(if (and cur (>= idx 0))
|
2009-08-22 19:29:18 +00:00
|
|
|
|
(progn
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(forward-line (1- (car cur))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(if (> offset 0) (goto-char (point-max)) (goto-char (point-min))))
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
(defun rst-backward-section ()
|
2008-12-18 16:19:12 +00:00
|
|
|
|
"Like `rst-forward-section', except move back one title."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(interactive)
|
|
|
|
|
(rst-forward-section -1))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: What is `allow-extend' for?
|
|
|
|
|
(defun rst-mark-section (&optional count allow-extend)
|
|
|
|
|
"Select COUNT sections around point.
|
|
|
|
|
Mark following sections for positive COUNT or preceding sections
|
|
|
|
|
for negative COUNT."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Cloned from mark-paragraph.
|
|
|
|
|
(interactive "p\np")
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(unless count (setq count 1))
|
|
|
|
|
(when (zerop count)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(error "Cannot mark zero sections"))
|
|
|
|
|
(cond ((and allow-extend
|
|
|
|
|
(or (and (eq last-command this-command) (mark t))
|
|
|
|
|
(rst-portable-mark-active-p)))
|
|
|
|
|
(set-mark
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (mark))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(rst-forward-section count)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(point))))
|
|
|
|
|
(t
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(rst-forward-section count)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(push-mark nil t t)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(rst-forward-section (- count)))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; Functions to work on item lists (e.g. indent/dedent, enumerate), which are
|
|
|
|
|
;; always 2 or 3 characters apart horizontally with rest.
|
|
|
|
|
|
|
|
|
|
(defun rst-find-leftmost-column (beg end)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
"Return the leftmost column in region BEG to END."
|
|
|
|
|
(let (mincol)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char beg)
|
|
|
|
|
(while (< (point) end)
|
|
|
|
|
(back-to-indentation)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(unless (looking-at (rst-re 'lin-end))
|
|
|
|
|
(setq mincol (if mincol
|
|
|
|
|
(min mincol (current-column))
|
|
|
|
|
(current-column))))
|
|
|
|
|
(forward-line 1)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
mincol))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: This definition is old and deprecated. We need to move to the newer
|
|
|
|
|
;; version below.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(defmacro rst-iterate-leftmost-paragraphs
|
|
|
|
|
(beg end first-only body-consequent body-alternative)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: The following comment is pretty useless.
|
|
|
|
|
"Call FUN at the beginning of each line, with an argument that
|
2008-06-20 16:00:33 +00:00
|
|
|
|
specifies whether we are at the first line of a paragraph that
|
|
|
|
|
starts at the leftmost column of the given region BEG and END.
|
|
|
|
|
Set FIRST-ONLY to true if you want to callback on the first line
|
|
|
|
|
of each paragraph only."
|
|
|
|
|
`(save-excursion
|
|
|
|
|
(let ((leftcol (rst-find-leftmost-column ,beg ,end))
|
2010-11-18 03:02:15 +00:00
|
|
|
|
(endm (copy-marker ,end)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(do* (;; Iterate lines.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(l (progn (goto-char ,beg) (back-to-indentation))
|
|
|
|
|
(progn (forward-line 1) (back-to-indentation)))
|
|
|
|
|
|
|
|
|
|
(previous nil valid)
|
|
|
|
|
|
|
|
|
|
(curcol (current-column)
|
|
|
|
|
(current-column))
|
|
|
|
|
|
|
|
|
|
(valid (and (= curcol leftcol)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(not (looking-at (rst-re 'lin-end))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(and (= curcol leftcol)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(not (looking-at (rst-re 'lin-end)))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
)
|
2008-06-20 17:53:42 +00:00
|
|
|
|
((>= (point) endm))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(if (if ,first-only
|
|
|
|
|
(and valid (not previous))
|
|
|
|
|
valid)
|
|
|
|
|
,body-consequent
|
|
|
|
|
,body-alternative)
|
|
|
|
|
|
|
|
|
|
))))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: This needs to be refactored. Probably this is simply a function
|
|
|
|
|
;; applying BODY rather than a macro.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(defmacro rst-iterate-leftmost-paragraphs-2 (spec &rest body)
|
|
|
|
|
"Evaluate BODY for each line in region defined by BEG END.
|
|
|
|
|
LEFTMOST is set to true if the line is one of the leftmost of the
|
2008-06-20 17:53:42 +00:00
|
|
|
|
entire paragraph. PARABEGIN is set to true if the line is the
|
2008-06-20 16:00:33 +00:00
|
|
|
|
first of a paragraph."
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(declare (indent 1) (debug (sexp body)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(destructuring-bind
|
|
|
|
|
(beg end parabegin leftmost isleftmost isempty) spec
|
|
|
|
|
|
|
|
|
|
`(save-excursion
|
|
|
|
|
(let ((,leftmost (rst-find-leftmost-column ,beg ,end))
|
2010-11-18 03:02:15 +00:00
|
|
|
|
(endm (copy-marker ,end)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(do* (;; Iterate lines.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(l (progn (goto-char ,beg) (back-to-indentation))
|
|
|
|
|
(progn (forward-line 1) (back-to-indentation)))
|
|
|
|
|
|
|
|
|
|
(empty-line-previous nil ,isempty)
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(,isempty (looking-at (rst-re 'lin-end))
|
|
|
|
|
(looking-at (rst-re 'lin-end)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(,parabegin (not ,isempty)
|
|
|
|
|
(and empty-line-previous
|
|
|
|
|
(not ,isempty)))
|
|
|
|
|
|
|
|
|
|
(,isleftmost (and (not ,isempty)
|
|
|
|
|
(= (current-column) ,leftmost))
|
|
|
|
|
(and (not ,isempty)
|
|
|
|
|
(= (current-column) ,leftmost)))
|
|
|
|
|
)
|
2008-06-20 17:53:42 +00:00
|
|
|
|
((>= (point) endm))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(progn ,@body)
|
|
|
|
|
|
|
|
|
|
)))))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; Indentation
|
|
|
|
|
|
|
|
|
|
;; FIXME: At the moment only block comments with leading empty comment line are
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; supported. Comment lines with leading comment markup should be also
|
|
|
|
|
;; supported. May be a customizable option could control which style to
|
|
|
|
|
;; prefer.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
2012-05-29 06:16:49 +00:00
|
|
|
|
(defgroup rst-indent nil "Settings for indentation in reStructuredText.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
2012-05-29 06:16:49 +00:00
|
|
|
|
In reStructuredText indentation points are usually determined by
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
preceding lines. Sometimes the syntax allows arbitrary
|
2012-05-29 06:16:49 +00:00
|
|
|
|
indentation points such as where to start the first line
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
following a directive. These indentation widths can be customized
|
|
|
|
|
here."
|
|
|
|
|
:group 'rst
|
|
|
|
|
:package-version '(rst . "1.1.0"))
|
|
|
|
|
|
|
|
|
|
(define-obsolete-variable-alias
|
|
|
|
|
'rst-shift-basic-offset 'rst-indent-width "r6713")
|
|
|
|
|
(defcustom rst-indent-width 2
|
|
|
|
|
"Indentation when there is no more indentation point given."
|
|
|
|
|
:group 'rst-indent
|
|
|
|
|
:type '(integer))
|
|
|
|
|
|
|
|
|
|
(defcustom rst-indent-field 3
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Indentation for first line after a field or 0 to always indent for content."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
:group 'rst-indent
|
|
|
|
|
:type '(integer))
|
|
|
|
|
|
|
|
|
|
(defcustom rst-indent-literal-normal 3
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Default indentation for literal block after a markup on an own line."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
:group 'rst-indent
|
|
|
|
|
:type '(integer))
|
|
|
|
|
|
|
|
|
|
(defcustom rst-indent-literal-minimized 2
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Default indentation for literal block after a minimized markup."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
:group 'rst-indent
|
|
|
|
|
:type '(integer))
|
|
|
|
|
|
|
|
|
|
(defcustom rst-indent-comment 3
|
2012-05-29 06:16:49 +00:00
|
|
|
|
"Default indentation for first line of a comment."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
:group 'rst-indent
|
|
|
|
|
:type '(integer))
|
|
|
|
|
|
|
|
|
|
;; FIXME: Must consider other tabs:
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; * Line blocks
|
|
|
|
|
;; * Definition lists
|
|
|
|
|
;; * Option lists
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-line-tabs ()
|
|
|
|
|
"Return tabs of the current line or nil for no tab.
|
|
|
|
|
The list is sorted so the tab where writing continues most likely
|
2012-05-29 20:14:18 +00:00
|
|
|
|
is the first one. Each tab is of the form (COLUMN . INNER).
|
|
|
|
|
COLUMN is the column of the tab. INNER is non-nil if this is an
|
|
|
|
|
inner tab. I.e. a tab which does come from the basic indentation
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
and not from inner alignment points."
|
|
|
|
|
(save-excursion
|
|
|
|
|
(forward-line 0)
|
|
|
|
|
(save-match-data
|
|
|
|
|
(unless (looking-at (rst-re 'lin-end))
|
|
|
|
|
(back-to-indentation)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Current indendation is always the least likely tab.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let ((tabs (list (list (point) 0 nil)))) ; (POINT OFFSET INNER)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Push inner tabs more likely to continue writing.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(cond
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Item.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
((looking-at (rst-re '(:grp itmany-tag hws-sta) '(:grp "\\S ") "?"))
|
|
|
|
|
(when (match-string 2)
|
|
|
|
|
(push (list (match-beginning 2) 0 t) tabs)))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Field.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
((looking-at (rst-re '(:grp fld-tag) '(:grp hws-tag)
|
|
|
|
|
'(:grp "\\S ") "?"))
|
|
|
|
|
(unless (zerop rst-indent-field)
|
|
|
|
|
(push (list (match-beginning 1) rst-indent-field t) tabs))
|
|
|
|
|
(if (match-string 3)
|
|
|
|
|
(push (list (match-beginning 3) 0 t) tabs)
|
|
|
|
|
(if (zerop rst-indent-field)
|
|
|
|
|
(push (list (match-end 2)
|
|
|
|
|
(if (string= (match-string 2) "") 1 0)
|
|
|
|
|
t) tabs))))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Directive.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
((looking-at (rst-re 'dir-sta-3 '(:grp "\\S ") "?"))
|
|
|
|
|
(push (list (match-end 1) 0 t) tabs)
|
|
|
|
|
(unless (string= (match-string 2) "")
|
|
|
|
|
(push (list (match-end 2) 0 t) tabs))
|
|
|
|
|
(when (match-string 4)
|
|
|
|
|
(push (list (match-beginning 4) 0 t) tabs)))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Footnote or citation definition.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
((looking-at (rst-re 'fnc-sta-2 '(:grp "\\S ") "?"))
|
|
|
|
|
(push (list (match-end 1) 0 t) tabs)
|
|
|
|
|
(when (match-string 3)
|
|
|
|
|
(push (list (match-beginning 3) 0 t) tabs)))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Comment.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
((looking-at (rst-re 'cmt-sta-1))
|
|
|
|
|
(push (list (point) rst-indent-comment t) tabs)))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Start of literal block.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(when (looking-at (rst-re 'lit-sta-2))
|
|
|
|
|
(let ((tab0 (first tabs)))
|
|
|
|
|
(push (list (first tab0)
|
|
|
|
|
(+ (second tab0)
|
|
|
|
|
(if (match-string 1)
|
|
|
|
|
rst-indent-literal-minimized
|
|
|
|
|
rst-indent-literal-normal))
|
|
|
|
|
t) tabs)))
|
|
|
|
|
(mapcar (lambda (tab)
|
|
|
|
|
(goto-char (first tab))
|
|
|
|
|
(cons (+ (current-column) (second tab)) (third tab)))
|
|
|
|
|
tabs))))))
|
|
|
|
|
|
|
|
|
|
(defun rst-compute-tabs (pt)
|
|
|
|
|
"Build the list of possible tabs for all lines above.
|
|
|
|
|
Search backwards from point PT to build the list of possible
|
2012-05-29 20:14:18 +00:00
|
|
|
|
tabs. Return a list of tabs sorted by likeliness to continue
|
|
|
|
|
writing like `rst-line-tabs'. Nearer lines have generally a
|
|
|
|
|
higher likeliness than farther lines. Return nil if no tab is found
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
in the text above."
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char pt)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(let (leftmost ; Leftmost column found so far.
|
|
|
|
|
innermost ; Leftmost column for inner tab.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
tablist)
|
|
|
|
|
(while (and (zerop (forward-line -1))
|
|
|
|
|
(or (not leftmost)
|
|
|
|
|
(> leftmost 0)))
|
|
|
|
|
(let* ((tabs (rst-line-tabs))
|
|
|
|
|
(leftcol (if tabs (apply 'min (mapcar 'car tabs)))))
|
|
|
|
|
(when tabs
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Consider only lines indented less or same if not INNERMOST.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(when (or (not leftmost)
|
|
|
|
|
(< leftcol leftmost)
|
|
|
|
|
(and (not innermost) (= leftcol leftmost)))
|
|
|
|
|
(dolist (tab tabs)
|
|
|
|
|
(let ((inner (cdr tab))
|
|
|
|
|
(newcol (car tab)))
|
|
|
|
|
(when (and
|
|
|
|
|
(or
|
|
|
|
|
(and (not inner)
|
|
|
|
|
(or (not leftmost)
|
|
|
|
|
(< newcol leftmost)))
|
|
|
|
|
(and inner
|
|
|
|
|
(or (not innermost)
|
|
|
|
|
(< newcol innermost))))
|
|
|
|
|
(not (memq newcol tablist)))
|
|
|
|
|
(push newcol tablist))))
|
|
|
|
|
(setq innermost (if (some 'identity
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(mapcar 'cdr tabs)) ; Has inner.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
leftcol
|
|
|
|
|
innermost))
|
|
|
|
|
(setq leftmost leftcol)))))
|
|
|
|
|
(nreverse tablist))))
|
|
|
|
|
|
|
|
|
|
(defun rst-indent-line (&optional dflt)
|
|
|
|
|
"Indent current line to next best reStructuredText tab.
|
|
|
|
|
The next best tab is taken from the tab list returned by
|
2012-05-29 20:14:18 +00:00
|
|
|
|
`rst-compute-tabs' which is used in a cyclic manner. If the
|
|
|
|
|
current indentation does not end on a tab use the first one. If
|
|
|
|
|
the current indentation is on a tab use the next tab. This allows
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
a repeated use of \\[indent-for-tab-command] to cycle through all
|
2012-05-29 20:14:18 +00:00
|
|
|
|
possible tabs. If no indentation is possible return `noindent' or
|
|
|
|
|
use DFLT. Return the indentation indented to. When point is in
|
|
|
|
|
indentation it ends up at its end. Otherwise the point is kept
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
relative to the content."
|
|
|
|
|
(let* ((pt (point-marker))
|
|
|
|
|
(cur (current-indentation))
|
|
|
|
|
(clm (current-column))
|
|
|
|
|
(tabs (rst-compute-tabs (point)))
|
|
|
|
|
(fnd (position cur tabs))
|
|
|
|
|
ind)
|
|
|
|
|
(if (and (not tabs) (not dflt))
|
|
|
|
|
'noindent
|
|
|
|
|
(if (not tabs)
|
|
|
|
|
(setq ind dflt)
|
|
|
|
|
(if (not fnd)
|
|
|
|
|
(setq fnd 0)
|
|
|
|
|
(setq fnd (1+ fnd))
|
|
|
|
|
(if (>= fnd (length tabs))
|
|
|
|
|
(setq fnd 0)))
|
|
|
|
|
(setq ind (nth fnd tabs)))
|
|
|
|
|
(indent-line-to ind)
|
|
|
|
|
(if (> clm cur)
|
|
|
|
|
(goto-char pt))
|
|
|
|
|
(set-marker pt nil)
|
|
|
|
|
ind)))
|
|
|
|
|
|
|
|
|
|
(defun rst-shift-region (beg end cnt)
|
|
|
|
|
"Shift region BEG to END by CNT tabs.
|
|
|
|
|
Shift by one tab to the right (CNT > 0) or left (CNT < 0) or
|
2012-05-29 20:14:18 +00:00
|
|
|
|
remove all indentation (CNT = 0). A tab is taken from the text
|
|
|
|
|
above. If no suitable tab is found `rst-indent-width' is used."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(interactive "r\np")
|
|
|
|
|
(let ((tabs (sort (rst-compute-tabs beg) (lambda (x y) (<= x y))))
|
|
|
|
|
(leftmostcol (rst-find-leftmost-column beg end)))
|
|
|
|
|
(when (or (> leftmostcol 0) (> cnt 0))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Apply the indent.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(indent-rigidly
|
|
|
|
|
beg end
|
|
|
|
|
(if (zerop cnt)
|
|
|
|
|
(- leftmostcol)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Find the next tab after the leftmost column.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let* ((cmp (if (> cnt 0) '> '<))
|
|
|
|
|
(tabs (if (> cnt 0) tabs (reverse tabs)))
|
|
|
|
|
(len (length tabs))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(dir (signum cnt)) ; Direction to take.
|
|
|
|
|
(abs (abs cnt)) ; Absolute number of steps to take.
|
|
|
|
|
;; Get the position of the first tab beyond leftmostcol.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(fnd (position-if (lambda (elt)
|
|
|
|
|
(funcall cmp elt leftmostcol))
|
|
|
|
|
tabs))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Virtual position of tab.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(pos (+ (or fnd len) (1- abs)))
|
|
|
|
|
(tab (if (< pos len)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Tab exists - use it.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(nth pos tabs)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Column needs to be computed.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let ((col (+ (or (car (last tabs)) leftmostcol)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Base on last known column.
|
|
|
|
|
(* (- pos (1- len)) ; Distance left.
|
|
|
|
|
dir ; Direction to take.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
rst-indent-width))))
|
|
|
|
|
(if (< col 0) 0 col)))))
|
|
|
|
|
(- tab leftmostcol)))))))
|
|
|
|
|
|
|
|
|
|
;; FIXME: A paragraph with an (incorrectly) indented second line is not filled
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; correctly::
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;;
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Some start
|
|
|
|
|
;; continued wrong
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-adaptive-fill ()
|
|
|
|
|
"Return fill prefix found at point.
|
|
|
|
|
Value for `adaptive-fill-function'."
|
|
|
|
|
(let ((fnd (if (looking-at adaptive-fill-regexp)
|
|
|
|
|
(match-string-no-properties 0))))
|
|
|
|
|
(if (save-match-data
|
|
|
|
|
(not (string-match comment-start-skip fnd)))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; An non-comment prefix is fine.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
fnd
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Matches a comment - return whitespace instead.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(make-string (-
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (match-end 0))
|
|
|
|
|
(current-column))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (match-beginning 0))
|
|
|
|
|
(current-column))) ? ))))
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; Comments
|
|
|
|
|
|
|
|
|
|
(defun rst-comment-line-break (&optional soft)
|
|
|
|
|
"Break line and indent, continuing reStructuredText comment if within one.
|
2012-05-29 20:14:18 +00:00
|
|
|
|
Value for `comment-line-break-function'. If SOFT use soft
|
|
|
|
|
newlines as mandated by `comment-line-break-function'."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if soft
|
|
|
|
|
(insert-and-inherit ?\n)
|
|
|
|
|
(newline 1))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(forward-char -1)
|
|
|
|
|
(delete-horizontal-space))
|
|
|
|
|
(delete-horizontal-space)
|
|
|
|
|
(let ((tabs (rst-compute-tabs (point))))
|
|
|
|
|
(when tabs
|
|
|
|
|
(indent-line-to (car tabs)))))
|
|
|
|
|
|
|
|
|
|
(defun rst-comment-indent ()
|
|
|
|
|
"Return indentation for current comment line."
|
|
|
|
|
(car (rst-compute-tabs (point))))
|
|
|
|
|
|
|
|
|
|
(defun rst-comment-insert-comment ()
|
|
|
|
|
"Insert a comment in the current line."
|
|
|
|
|
(rst-indent-line 0)
|
|
|
|
|
(insert comment-start))
|
|
|
|
|
|
|
|
|
|
(defun rst-comment-region (beg end &optional arg)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Comment or uncomment the current region.
|
|
|
|
|
Region is from from BEG to END. Uncomment if ARG."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(if (consp arg)
|
|
|
|
|
(rst-uncomment-region beg end arg)
|
|
|
|
|
(goto-char beg)
|
|
|
|
|
(let ((ind (current-indentation))
|
|
|
|
|
bol)
|
|
|
|
|
(forward-line 0)
|
|
|
|
|
(setq bol (point))
|
|
|
|
|
(indent-rigidly bol end rst-indent-comment)
|
|
|
|
|
(goto-char bol)
|
|
|
|
|
(open-line 1)
|
|
|
|
|
(indent-line-to ind)
|
|
|
|
|
(insert (comment-string-strip comment-start t t))))))
|
|
|
|
|
|
|
|
|
|
(defun rst-uncomment-region (beg end &optional arg)
|
|
|
|
|
"Uncomment the current region.
|
2012-05-29 20:14:18 +00:00
|
|
|
|
Region is from BEG to END. ARG is ignored"
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(let (bol eol)
|
|
|
|
|
(goto-char beg)
|
|
|
|
|
(forward-line 0)
|
|
|
|
|
(setq bol (point))
|
|
|
|
|
(forward-line 1)
|
|
|
|
|
(setq eol (point))
|
|
|
|
|
(indent-rigidly eol end (- rst-indent-comment))
|
|
|
|
|
(delete-region bol eol))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2008-06-20 17:53:42 +00:00
|
|
|
|
;;------------------------------------------------------------------------------
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: These next functions should become part of a larger effort to redo
|
|
|
|
|
;; the bullets in bulleted lists. The enumerate would just be one of
|
|
|
|
|
;; the possible outputs.
|
2008-06-20 17:53:42 +00:00
|
|
|
|
;;
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; FIXME: We need to do the enumeration removal as well.
|
2008-06-20 17:53:42 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-enumerate-region (beg end all)
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"Add enumeration to all the leftmost paragraphs in the given region.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
The region is specified between BEG and END. With ALL,
|
2008-06-20 17:53:42 +00:00
|
|
|
|
do all lines instead of just paragraphs."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(interactive "r\nP")
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(let ((count 0)
|
|
|
|
|
(last-insert-len nil))
|
|
|
|
|
(rst-iterate-leftmost-paragraphs
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
beg end (not all)
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(let ((ins-string (format "%d. " (incf count))))
|
|
|
|
|
(setq last-insert-len (length ins-string))
|
|
|
|
|
(insert ins-string))
|
|
|
|
|
(insert (make-string last-insert-len ?\ ))
|
|
|
|
|
)))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-bullet-list-region (beg end all)
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"Add bullets to all the leftmost paragraphs in the given region.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
The region is specified between BEG and END. With ALL,
|
2008-06-20 17:53:42 +00:00
|
|
|
|
do all lines instead of just paragraphs."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(interactive "r\nP")
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(rst-iterate-leftmost-paragraphs
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
beg end (not all)
|
|
|
|
|
(insert (car rst-preferred-bullets) " ")
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(insert " ")
|
|
|
|
|
))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: Does not deal with a varying number of digits appropriately.
|
|
|
|
|
;; FIXME: Does not deal with multiple levels independently.
|
|
|
|
|
;; FIXME: Does not indent a multiline item correctly.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(defun rst-convert-bullets-to-enumeration (beg end)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
"Convert the bulleted and enumerated items in the region to enumerated lists.
|
2012-05-29 20:14:18 +00:00
|
|
|
|
Renumber as necessary. Region is from BEG to END."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(interactive "r")
|
|
|
|
|
(let* (;; Find items and convert the positions to markers.
|
|
|
|
|
(items (mapcar
|
|
|
|
|
(lambda (x)
|
2010-11-18 03:02:15 +00:00
|
|
|
|
(cons (copy-marker (car x))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(cdr x)))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-find-pfx-in-region beg end (rst-re 'itmany-sta-1))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(count 1)
|
|
|
|
|
)
|
|
|
|
|
(save-excursion
|
|
|
|
|
(dolist (x items)
|
|
|
|
|
(goto-char (car x))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(looking-at (rst-re 'itmany-beg-1))
|
|
|
|
|
(replace-match (format "%d." count) nil nil nil 1)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(incf count)
|
|
|
|
|
))
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
(defun rst-line-block-region (rbeg rend &optional pfxarg)
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"Toggle line block prefixes for a region.
|
2012-05-29 20:14:18 +00:00
|
|
|
|
Region is from RBEG to REND. With PFXARG set the empty lines too."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(interactive "r\nP")
|
|
|
|
|
(let ((comment-start "| ")
|
|
|
|
|
(comment-end "")
|
|
|
|
|
(comment-start-skip "| ")
|
|
|
|
|
(comment-style 'indent)
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(force (not (not pfxarg))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(rst-iterate-leftmost-paragraphs-2
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(rbeg rend parbegin leftmost isleft isempty)
|
|
|
|
|
(when (or force (not isempty))
|
|
|
|
|
(move-to-column leftmost force)
|
|
|
|
|
(delete-region (point) (+ (point) (- (current-indentation) leftmost)))
|
|
|
|
|
(insert "| ")))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Font lock
|
|
|
|
|
;; =========
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(require 'font-lock)
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: The obsolete variables need to disappear.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
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.
2008-07-03 15:18:32 +00:00
|
|
|
|
(defgroup rst-faces nil "Faces used in Rst Mode."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst
|
|
|
|
|
:group 'faces
|
|
|
|
|
:version "21.1")
|
|
|
|
|
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(defface rst-block '((t :inherit font-lock-keyword-face))
|
|
|
|
|
"Face used for all syntax marking up a special block."
|
|
|
|
|
:version "24.1"
|
|
|
|
|
:group 'rst-faces)
|
|
|
|
|
|
|
|
|
|
(defcustom rst-block-face 'rst-block
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"All syntax marking up a special block."
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
:version "24.1"
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst-faces
|
|
|
|
|
:type '(face))
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(make-obsolete-variable 'rst-block-face
|
|
|
|
|
"customize the face `rst-block' instead."
|
|
|
|
|
"24.1")
|
|
|
|
|
|
|
|
|
|
(defface rst-external '((t :inherit font-lock-type-face))
|
|
|
|
|
"Face used for field names and interpreted text."
|
|
|
|
|
:version "24.1"
|
|
|
|
|
:group 'rst-faces)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(defcustom rst-external-face 'rst-external
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"Field names and interpreted text."
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
:version "24.1"
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst-faces
|
|
|
|
|
:type '(face))
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(make-obsolete-variable 'rst-external-face
|
|
|
|
|
"customize the face `rst-external' instead."
|
|
|
|
|
"24.1")
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(defface rst-definition '((t :inherit font-lock-function-name-face))
|
|
|
|
|
"Face used for all other defining constructs."
|
|
|
|
|
:version "24.1"
|
|
|
|
|
:group 'rst-faces)
|
|
|
|
|
|
|
|
|
|
(defcustom rst-definition-face 'rst-definition
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"All other defining constructs."
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
:version "24.1"
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst-faces
|
|
|
|
|
:type '(face))
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(make-obsolete-variable 'rst-definition-face
|
|
|
|
|
"customize the face `rst-definition' instead."
|
|
|
|
|
"24.1")
|
|
|
|
|
|
|
|
|
|
;; XEmacs compatibility (?).
|
|
|
|
|
(defface rst-directive (if (boundp 'font-lock-builtin-face)
|
|
|
|
|
'((t :inherit font-lock-builtin-face))
|
|
|
|
|
'((t :inherit font-lock-preprocessor-face)))
|
|
|
|
|
"Face used for directives and roles."
|
|
|
|
|
:version "24.1"
|
|
|
|
|
:group 'rst-faces)
|
|
|
|
|
|
|
|
|
|
(defcustom rst-directive-face 'rst-directive
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"Directives and roles."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst-faces
|
|
|
|
|
:type '(face))
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(make-obsolete-variable 'rst-directive-face
|
|
|
|
|
"customize the face `rst-directive' instead."
|
|
|
|
|
"24.1")
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(defface rst-comment '((t :inherit font-lock-comment-face))
|
|
|
|
|
"Face used for comments."
|
|
|
|
|
:version "24.1"
|
|
|
|
|
:group 'rst-faces)
|
|
|
|
|
|
|
|
|
|
(defcustom rst-comment-face 'rst-comment
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"Comments."
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
:version "24.1"
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst-faces
|
|
|
|
|
:type '(face))
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(make-obsolete-variable 'rst-comment-face
|
|
|
|
|
"customize the face `rst-comment' instead."
|
|
|
|
|
"24.1")
|
|
|
|
|
|
|
|
|
|
(defface rst-emphasis1 '((t :inherit italic))
|
|
|
|
|
"Face used for simple emphasis."
|
|
|
|
|
:version "24.1"
|
|
|
|
|
:group 'rst-faces)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(defcustom rst-emphasis1-face 'rst-emphasis1
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"Simple emphasis."
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
:version "24.1"
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst-faces
|
|
|
|
|
:type '(face))
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(make-obsolete-variable 'rst-emphasis1-face
|
|
|
|
|
"customize the face `rst-emphasis1' instead."
|
|
|
|
|
"24.1")
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(defface rst-emphasis2 '((t :inherit bold))
|
|
|
|
|
"Face used for double emphasis."
|
|
|
|
|
:version "24.1"
|
|
|
|
|
:group 'rst-faces)
|
|
|
|
|
|
|
|
|
|
(defcustom rst-emphasis2-face 'rst-emphasis2
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"Double emphasis."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst-faces
|
|
|
|
|
:type '(face))
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(make-obsolete-variable 'rst-emphasis2-face
|
|
|
|
|
"customize the face `rst-emphasis2' instead."
|
|
|
|
|
"24.1")
|
|
|
|
|
|
|
|
|
|
(defface rst-literal '((t :inherit font-lock-string-face))
|
|
|
|
|
"Face used for literal text."
|
|
|
|
|
:version "24.1"
|
|
|
|
|
:group 'rst-faces)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(defcustom rst-literal-face 'rst-literal
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"Literal text."
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
:version "24.1"
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst-faces
|
|
|
|
|
:type '(face))
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(make-obsolete-variable 'rst-literal-face
|
|
|
|
|
"customize the face `rst-literal' instead."
|
|
|
|
|
"24.1")
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(defface rst-reference '((t :inherit font-lock-variable-name-face))
|
|
|
|
|
"Face used for references to a definition."
|
|
|
|
|
:version "24.1"
|
|
|
|
|
:group 'rst-faces)
|
|
|
|
|
|
|
|
|
|
(defcustom rst-reference-face 'rst-reference
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"References to a definition."
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
:version "24.1"
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst-faces
|
|
|
|
|
:type '(face))
|
Use faces not variables for font-lock customization in rst.el.
* textmodes/rst.el: (rst-block, rst-external, rst-definition, rst-directive)
(rst-comment, rst-emphasis1, rst-emphasis2, rst-literal, rst-reference):
New faces.
(rst-block-face, rst-external-face, rst-definition-face)
(rst-directive-face, rst-comment-face, rst-emphasis1-face)
(rst-emphasis2-face, rst-literal-face, rst-reference-face):
Make obsolete.
(rst-font-lock-keywords-function): Update for above changes.
2010-03-20 18:17:59 +00:00
|
|
|
|
(make-obsolete-variable 'rst-reference-face
|
|
|
|
|
"customize the face `rst-reference' instead."
|
|
|
|
|
"24.1")
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
|
|
(defgroup rst-faces-defaults nil
|
|
|
|
|
"Values used to generate default faces for section titles on all levels.
|
|
|
|
|
Tweak these if you are content with how section title faces are built in
|
|
|
|
|
general but you do not like the details."
|
|
|
|
|
:group 'rst-faces
|
|
|
|
|
:version "21.1")
|
|
|
|
|
|
|
|
|
|
(defun rst-set-level-default (sym val)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Set custom variable SYM affecting section title text face.
|
|
|
|
|
Recompute the faces. VAL is the value to set."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(custom-set-default sym val)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Also defines the faces initially when all values are available.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(and (boundp 'rst-level-face-max)
|
|
|
|
|
(boundp 'rst-level-face-format-light)
|
|
|
|
|
(boundp 'rst-level-face-base-color)
|
|
|
|
|
(boundp 'rst-level-face-step-light)
|
|
|
|
|
(boundp 'rst-level-face-base-light)
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(fboundp 'rst-define-level-faces)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(rst-define-level-faces)))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Faces for displaying items on several levels. These definitions define
|
2011-11-27 04:43:11 +00:00
|
|
|
|
;; different shades of gray where the lightest one (i.e. least contrasting) is
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; used for level 1.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(defcustom rst-level-face-max 6
|
|
|
|
|
"Maximum depth of levels for which section title faces are defined."
|
|
|
|
|
:group 'rst-faces-defaults
|
|
|
|
|
:type '(integer)
|
|
|
|
|
:set 'rst-set-level-default)
|
|
|
|
|
(defcustom rst-level-face-base-color "grey"
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
"Base name of the color for creating background colors in section title faces."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst-faces-defaults
|
|
|
|
|
:type '(string)
|
|
|
|
|
:set 'rst-set-level-default)
|
|
|
|
|
(defcustom rst-level-face-base-light
|
|
|
|
|
(if (eq frame-background-mode 'dark)
|
|
|
|
|
15
|
|
|
|
|
85)
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"The lightness factor for the base color. This value is used for level 1.
|
|
|
|
|
The default depends on whether the value of `frame-background-mode' is
|
|
|
|
|
`dark' or not."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
:group 'rst-faces-defaults
|
|
|
|
|
:type '(integer)
|
|
|
|
|
:set 'rst-set-level-default)
|
|
|
|
|
(defcustom rst-level-face-format-light "%2d"
|
|
|
|
|
"The format for the lightness factor appended to the base name of the color.
|
|
|
|
|
This value is expanded by `format' with an integer."
|
|
|
|
|
:group 'rst-faces-defaults
|
|
|
|
|
:type '(string)
|
|
|
|
|
:set 'rst-set-level-default)
|
|
|
|
|
(defcustom rst-level-face-step-light
|
|
|
|
|
(if (eq frame-background-mode 'dark)
|
|
|
|
|
7
|
|
|
|
|
-7)
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"The step width to use for the next color.
|
|
|
|
|
The formula
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
`rst-level-face-base-light'
|
|
|
|
|
+ (`rst-level-face-max' - 1) * `rst-level-face-step-light'
|
|
|
|
|
|
|
|
|
|
must result in a color level which appended to `rst-level-face-base-color'
|
|
|
|
|
using `rst-level-face-format-light' results in a valid color such as `grey50'.
|
|
|
|
|
This color is used as background for section title text on level
|
|
|
|
|
`rst-level-face-max'."
|
|
|
|
|
:group 'rst-faces-defaults
|
|
|
|
|
:type '(integer)
|
|
|
|
|
:set 'rst-set-level-default)
|
|
|
|
|
|
|
|
|
|
(defcustom rst-adornment-faces-alist
|
|
|
|
|
(let ((alist '((t . font-lock-keyword-face)
|
|
|
|
|
(nil . font-lock-keyword-face)))
|
|
|
|
|
(i 1))
|
|
|
|
|
(while (<= i rst-level-face-max)
|
|
|
|
|
(nconc alist (list (cons i (intern (format "rst-level-%d-face" i)))))
|
|
|
|
|
(setq i (1+ i)))
|
|
|
|
|
alist)
|
2008-06-20 17:53:42 +00:00
|
|
|
|
"Faces for the various adornment types.
|
|
|
|
|
Key is a number (for the section title text of that level),
|
|
|
|
|
t (for transitions) or nil (for section title adornment).
|
|
|
|
|
If you generally do not like how section title text faces are
|
|
|
|
|
set up tweak here. If the general idea is ok for you but you do not like the
|
2008-06-20 16:00:33 +00:00
|
|
|
|
details check the Rst Faces Defaults group."
|
|
|
|
|
:group 'rst-faces
|
|
|
|
|
:type '(alist
|
|
|
|
|
:key-type
|
|
|
|
|
(choice
|
|
|
|
|
(integer
|
|
|
|
|
:tag
|
|
|
|
|
"Section level (may not be bigger than `rst-level-face-max')")
|
|
|
|
|
(boolean :tag "transitions (on) / section title adornment (off)"))
|
|
|
|
|
:value-type (face))
|
|
|
|
|
:set-after '(rst-level-face-max))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: It should be possible to give "#RRGGBB" type of color values.
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(defun rst-define-level-faces ()
|
|
|
|
|
"Define the faces for the section title text faces from the values."
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; All variables used here must be checked in `rst-set-level-default'.
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(let ((i 1))
|
|
|
|
|
(while (<= i rst-level-face-max)
|
|
|
|
|
(let ((sym (intern (format "rst-level-%d-face" i)))
|
|
|
|
|
(doc (format "Face for showing section title text at level %d" i))
|
|
|
|
|
(col (format (concat "%s" rst-level-face-format-light)
|
|
|
|
|
rst-level-face-base-color
|
|
|
|
|
(+ (* (1- i) rst-level-face-step-light)
|
|
|
|
|
rst-level-face-base-light))))
|
2011-07-05 10:02:48 +00:00
|
|
|
|
(unless (facep sym)
|
2011-05-25 09:03:59 +00:00
|
|
|
|
(make-empty-face sym)
|
|
|
|
|
(set-face-doc-string sym doc)
|
|
|
|
|
(set-face-background sym col)
|
|
|
|
|
(set sym sym))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setq i (1+ i))))))
|
2008-06-20 17:53:42 +00:00
|
|
|
|
|
2008-06-21 04:10:26 +00:00
|
|
|
|
(rst-define-level-faces)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defvar rst-font-lock-keywords
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; The reST-links in the comments below all relate to sections in
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
`(;; FIXME: Block markup is not recognized in blocks after explicit markup
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; start.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; Simple `Body Elements`_
|
|
|
|
|
;; `Bullet Lists`_
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: A bullet directly after a field name is not recognized.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(,(rst-re 'lin-beg '(:grp bul-sta))
|
|
|
|
|
1 rst-block-face)
|
|
|
|
|
;; `Enumerated Lists`_
|
|
|
|
|
(,(rst-re 'lin-beg '(:grp enmany-sta))
|
|
|
|
|
1 rst-block-face)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; `Definition Lists`_
|
|
|
|
|
;; FIXME: missing.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; `Field Lists`_
|
|
|
|
|
(,(rst-re 'lin-beg '(:grp fld-tag) 'bli-sfx)
|
|
|
|
|
1 rst-external-face)
|
|
|
|
|
;; `Option Lists`_
|
|
|
|
|
(,(rst-re 'lin-beg '(:grp opt-tag (:shy optsep-tag opt-tag) "*")
|
|
|
|
|
'(:alt "$" (:seq hws-prt "\\{2\\}")))
|
|
|
|
|
1 rst-block-face)
|
|
|
|
|
;; `Line Blocks`_
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Only for lines containing no more bar - to distinguish from tables.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(,(rst-re 'lin-beg '(:grp "|" bli-sfx) "[^|\n]*$")
|
|
|
|
|
1 rst-block-face)
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; `Tables`_
|
|
|
|
|
;; FIXME: missing
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; All the `Explicit Markup Blocks`_
|
|
|
|
|
;; `Footnotes`_ / `Citations`_
|
|
|
|
|
(,(rst-re 'lin-beg 'fnc-sta-2)
|
|
|
|
|
(1 rst-definition-face)
|
|
|
|
|
(2 rst-definition-face))
|
|
|
|
|
;; `Directives`_ / `Substitution Definitions`_
|
|
|
|
|
(,(rst-re 'lin-beg 'dir-sta-3)
|
|
|
|
|
(1 rst-directive-face)
|
|
|
|
|
(2 rst-definition-face)
|
|
|
|
|
(3 rst-directive-face))
|
|
|
|
|
;; `Hyperlink Targets`_
|
|
|
|
|
(,(rst-re 'lin-beg
|
|
|
|
|
'(:grp exm-sta "_" (:alt
|
|
|
|
|
(:seq "`" ilcbkqdef-tag "`")
|
|
|
|
|
(:seq (:alt "[^:\\\n]" "\\\\.") "+")) ":")
|
|
|
|
|
'bli-sfx)
|
|
|
|
|
1 rst-definition-face)
|
|
|
|
|
(,(rst-re 'lin-beg '(:grp "__") 'bli-sfx)
|
|
|
|
|
1 rst-definition-face)
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; All `Inline Markup`_
|
|
|
|
|
;; Most of them may be multiline though this is uninteresting.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; FIXME: Condition 5 preventing fontification of e.g. "*" not implemented
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; `Strong Emphasis`_.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(,(rst-re 'ilm-pfx '(:grp "\\*\\*" ilcast-tag "\\*\\*") 'ilm-sfx)
|
|
|
|
|
1 rst-emphasis2-face)
|
|
|
|
|
;; `Emphasis`_
|
|
|
|
|
(,(rst-re 'ilm-pfx '(:grp "\\*" ilcast-tag "\\*") 'ilm-sfx)
|
|
|
|
|
1 rst-emphasis1-face)
|
|
|
|
|
;; `Inline Literals`_
|
|
|
|
|
(,(rst-re 'ilm-pfx '(:grp "``" ilcbkq-tag "``") 'ilm-sfx)
|
|
|
|
|
1 rst-literal-face)
|
|
|
|
|
;; `Inline Internal Targets`_
|
|
|
|
|
(,(rst-re 'ilm-pfx '(:grp "_`" ilcbkq-tag "`") 'ilm-sfx)
|
|
|
|
|
1 rst-definition-face)
|
|
|
|
|
;; `Hyperlink References`_
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: `Embedded URIs`_ not considered.
|
2012-05-29 06:16:49 +00:00
|
|
|
|
;; FIXME: Directly adjacent marked up words are not fontified correctly
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; unless they are not separated by two spaces: foo_ bar_.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(,(rst-re 'ilm-pfx '(:grp (:alt (:seq "`" ilcbkq-tag "`")
|
|
|
|
|
(:seq "\\sw" (:alt "\\sw" "-") "+\\sw"))
|
|
|
|
|
"__?") 'ilm-sfx)
|
|
|
|
|
1 rst-reference-face)
|
|
|
|
|
;; `Interpreted Text`_
|
|
|
|
|
(,(rst-re 'ilm-pfx '(:grp (:shy ":" sym-tag ":") "?")
|
|
|
|
|
'(:grp "`" ilcbkq-tag "`")
|
|
|
|
|
'(:grp (:shy ":" sym-tag ":") "?") 'ilm-sfx)
|
|
|
|
|
(1 rst-directive-face)
|
|
|
|
|
(2 rst-external-face)
|
|
|
|
|
(3 rst-directive-face))
|
|
|
|
|
;; `Footnote References`_ / `Citation References`_
|
|
|
|
|
(,(rst-re 'ilm-pfx '(:grp fnc-tag "_") 'ilm-sfx)
|
|
|
|
|
1 rst-reference-face)
|
|
|
|
|
;; `Substitution References`_
|
|
|
|
|
;; FIXME: References substitutions like |this|_ or |this|__ are not
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; fontified correctly.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(,(rst-re 'ilm-pfx '(:grp sub-tag) 'ilm-sfx)
|
|
|
|
|
1 rst-reference-face)
|
|
|
|
|
;; `Standalone Hyperlinks`_
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: This takes it easy by using a whitespace as delimiter.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(,(rst-re 'ilm-pfx '(:grp uri-tag ":\\S +") 'ilm-sfx)
|
|
|
|
|
1 rst-definition-face)
|
|
|
|
|
(,(rst-re 'ilm-pfx '(:grp sym-tag "@" sym-tag ) 'ilm-sfx)
|
|
|
|
|
1 rst-definition-face)
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Do all block fontification as late as possible so 'append works.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Sections_ / Transitions_
|
|
|
|
|
;; For sections this is multiline.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(,(rst-re 'ado-beg-2-1)
|
|
|
|
|
(rst-font-lock-handle-adornment-matcher
|
|
|
|
|
(rst-font-lock-handle-adornment-pre-match-form
|
|
|
|
|
(match-string-no-properties 1) (match-end 1))
|
|
|
|
|
nil
|
|
|
|
|
(1 (cdr (assoc nil rst-adornment-faces-alist)) append t)
|
|
|
|
|
(2 (cdr (assoc rst-font-lock-adornment-level
|
|
|
|
|
rst-adornment-faces-alist)) append t)
|
|
|
|
|
(3 (cdr (assoc nil rst-adornment-faces-alist)) append t)))
|
|
|
|
|
|
|
|
|
|
;; FIXME: FACESPEC could be used instead of ordinary faces to set
|
|
|
|
|
;; properties on comments and literal blocks so they are *not*
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; inline fontified. See (elisp)Search-based Fontification.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; FIXME: And / or use `syntax-propertize` functions as in `octave-mod.el`
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; and other V24 modes. May make `font-lock-extend-region`
|
|
|
|
|
;; superfluous.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; `Comments`_
|
|
|
|
|
;; This is multiline.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(,(rst-re 'lin-beg 'cmt-sta-1)
|
|
|
|
|
(1 rst-comment-face)
|
|
|
|
|
(rst-font-lock-find-unindented-line-match
|
|
|
|
|
(rst-font-lock-find-unindented-line-limit (match-end 1))
|
|
|
|
|
nil
|
|
|
|
|
(0 rst-comment-face append)))
|
|
|
|
|
(,(rst-re 'lin-beg '(:grp exm-tag) '(:grp hws-tag) "$")
|
|
|
|
|
(1 rst-comment-face)
|
|
|
|
|
(2 rst-comment-face)
|
|
|
|
|
(rst-font-lock-find-unindented-line-match
|
|
|
|
|
(rst-font-lock-find-unindented-line-limit 'next)
|
|
|
|
|
nil
|
|
|
|
|
(0 rst-comment-face append)))
|
|
|
|
|
|
|
|
|
|
;; FIXME: This is not rendered as comment::
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; .. .. list-table::
|
|
|
|
|
;; :stub-columns: 1
|
|
|
|
|
;; :header-rows: 1
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
;; FIXME: This is rendered wrong::
|
|
|
|
|
;;
|
|
|
|
|
;; xxx yyy::
|
|
|
|
|
;;
|
|
|
|
|
;; ----|> KKKKK <|----
|
|
|
|
|
;; / \
|
|
|
|
|
;; -|> AAAAAAAAAAPPPPPP <|- -|> AAAAAAAAAABBBBBBB <|-
|
|
|
|
|
;; | | | |
|
|
|
|
|
;; | | | |
|
|
|
|
|
;; PPPPPP PPPPPPDDDDDDD BBBBBBB PPPPPPBBBBBBB
|
|
|
|
|
;;
|
|
|
|
|
;; Indentation needs to be taken from the line with the ``::`` and not from
|
|
|
|
|
;; the first content line.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; `Indented Literal Blocks`_
|
|
|
|
|
;; This is multiline.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(,(rst-re 'lin-beg 'lit-sta-2)
|
|
|
|
|
(2 rst-block-face)
|
|
|
|
|
(rst-font-lock-find-unindented-line-match
|
|
|
|
|
(rst-font-lock-find-unindented-line-limit t)
|
|
|
|
|
nil
|
|
|
|
|
(0 rst-literal-face append)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: `Quoted Literal Blocks`_ missing.
|
|
|
|
|
;; This is multiline.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; `Doctest Blocks`_
|
|
|
|
|
;; FIXME: This is wrong according to the specification:
|
|
|
|
|
;;
|
|
|
|
|
;; Doctest blocks are text blocks which begin with ">>> ", the Python
|
|
|
|
|
;; interactive interpreter main prompt, and end with a blank line.
|
|
|
|
|
;; Doctest blocks are treated as a special case of literal blocks,
|
|
|
|
|
;; without requiring the literal block syntax. If both are present, the
|
|
|
|
|
;; literal block syntax takes priority over Doctest block syntax:
|
|
|
|
|
;;
|
|
|
|
|
;; This is an ordinary paragraph.
|
|
|
|
|
;;
|
|
|
|
|
;; >>> print 'this is a Doctest block'
|
|
|
|
|
;; this is a Doctest block
|
|
|
|
|
;;
|
|
|
|
|
;; The following is a literal block::
|
|
|
|
|
;;
|
|
|
|
|
;; >>> This is not recognized as a doctest block by
|
|
|
|
|
;; reStructuredText. It *will* be recognized by the doctest
|
|
|
|
|
;; module, though!
|
|
|
|
|
;;
|
|
|
|
|
;; Indentation is not required for doctest blocks.
|
|
|
|
|
(,(rst-re 'lin-beg '(:grp (:alt ">>>" ell-tag)) '(:grp ".+"))
|
|
|
|
|
(1 rst-block-face)
|
|
|
|
|
(2 rst-literal-face))
|
|
|
|
|
)
|
|
|
|
|
"Keywords to highlight in rst mode.")
|
|
|
|
|
|
2012-05-09 00:57:18 +00:00
|
|
|
|
(defvar font-lock-beg)
|
|
|
|
|
(defvar font-lock-end)
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-font-lock-extend-region ()
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Extend the font-lock region if it might be in a multi-line construct.
|
|
|
|
|
Return non-nil if so. Font-lock region is from `font-lock-beg'
|
|
|
|
|
to `font-lock-end'."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let ((r (rst-font-lock-extend-region-internal font-lock-beg font-lock-end)))
|
|
|
|
|
(when r
|
|
|
|
|
(setq font-lock-beg (car r))
|
|
|
|
|
(setq font-lock-end (cdr r))
|
|
|
|
|
t)))
|
|
|
|
|
|
|
|
|
|
(defun rst-font-lock-extend-region-internal (beg end)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Check the region BEG / END for being in the middle of a multi-line construct.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
Return nil if not or a cons with new values for BEG / END"
|
|
|
|
|
(let ((nbeg (rst-font-lock-extend-region-extend beg -1))
|
|
|
|
|
(nend (rst-font-lock-extend-region-extend end 1)))
|
|
|
|
|
(if (or nbeg nend)
|
|
|
|
|
(cons (or nbeg beg) (or nend end)))))
|
|
|
|
|
|
|
|
|
|
(defun rst-forward-line (&optional n)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Like `forward-line' but always end up in column 0 and return accordingly.
|
|
|
|
|
Move N lines forward just as `forward-line'."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let ((moved (forward-line n)))
|
|
|
|
|
(if (bolp)
|
|
|
|
|
moved
|
|
|
|
|
(forward-line 0)
|
|
|
|
|
(- moved (signum n)))))
|
|
|
|
|
|
|
|
|
|
(defun rst-font-lock-extend-region-extend (pt dir)
|
|
|
|
|
"Extend the region starting at point PT and extending in direction DIR.
|
|
|
|
|
Return extended point or nil if not moved."
|
|
|
|
|
;; There are many potential multiline constructs but there are two groups
|
|
|
|
|
;; which are really relevant. The first group consists of
|
|
|
|
|
;;
|
|
|
|
|
;; * comment lines without leading explicit markup tag and
|
|
|
|
|
;;
|
|
|
|
|
;; * literal blocks following "::"
|
|
|
|
|
;;
|
2012-05-29 06:16:49 +00:00
|
|
|
|
;; which are both indented. Thus indentation is the first thing recognized
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; here. The second criteria is an explicit markup tag which may be a comment
|
|
|
|
|
;; or a double colon at the end of a line.
|
|
|
|
|
;;
|
|
|
|
|
;; The second group consists of the adornment cases.
|
|
|
|
|
(if (not (get-text-property pt 'font-lock-multiline))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Move only if we don't start inside a multiline construct already.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(save-excursion
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(let (;; Non-empty non-indented line, explicit markup tag or literal
|
|
|
|
|
;; block tag.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(stop-re (rst-re '(:alt "[^ \t\n]"
|
|
|
|
|
(:seq hws-tag exm-tag)
|
|
|
|
|
(:seq ".*" dcl-tag lin-end)))))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; The comments below are for dir == -1 / dir == 1.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(goto-char pt)
|
|
|
|
|
(forward-line 0)
|
|
|
|
|
(setq pt (point))
|
|
|
|
|
(while (and (not (looking-at stop-re))
|
|
|
|
|
(zerop (rst-forward-line dir)))) ; try previous / next
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; line if it exists.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (looking-at (rst-re 'ado-beg-2-1)) ; may be an underline /
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; overline.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (zerop (rst-forward-line dir))
|
|
|
|
|
(if (looking-at (rst-re 'ttl-beg)) ; title found, i.e.
|
|
|
|
|
; underline / overline
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; found.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (zerop (rst-forward-line dir))
|
|
|
|
|
(if (not
|
|
|
|
|
(looking-at (rst-re 'ado-beg-2-1))) ; no
|
|
|
|
|
; overline /
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; underline.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-forward-line (- dir)))) ; step back to title
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; / adornment.
|
|
|
|
|
(if (< dir 0) ; keep downward adornment.
|
|
|
|
|
(rst-forward-line (- dir))))) ; step back to adornment.
|
|
|
|
|
(if (looking-at (rst-re 'ttl-beg)) ; may be a title.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (zerop (rst-forward-line dir))
|
|
|
|
|
(if (not
|
|
|
|
|
(looking-at (rst-re 'ado-beg-2-1))) ; no overline /
|
2012-05-29 20:14:18 +00:00
|
|
|
|
; underline.
|
|
|
|
|
(rst-forward-line (- dir)))))) ; step back to line.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (not (= (point) pt))
|
|
|
|
|
(point))))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; Indented blocks
|
|
|
|
|
|
|
|
|
|
(defun rst-forward-indented-block (&optional column limit)
|
|
|
|
|
"Move forward across one indented block.
|
|
|
|
|
Find the next non-empty line which is not indented at least to COLUMN (defaults
|
2008-06-20 17:53:42 +00:00
|
|
|
|
to the column of the point). Moves point to first character of this line or the
|
|
|
|
|
first empty line immediately before it and returns that position. If there is
|
2008-06-20 16:00:33 +00:00
|
|
|
|
no such line before LIMIT (defaults to the end of the buffer) returns nil and
|
|
|
|
|
point is not moved."
|
|
|
|
|
(interactive)
|
|
|
|
|
(let ((clm (or column (current-column)))
|
|
|
|
|
(start (point))
|
|
|
|
|
fnd beg cand)
|
|
|
|
|
(if (not limit)
|
|
|
|
|
(setq limit (point-max)))
|
|
|
|
|
(save-match-data
|
|
|
|
|
(while (and (not fnd) (< (point) limit))
|
|
|
|
|
(forward-line 1)
|
|
|
|
|
(when (< (point) limit)
|
|
|
|
|
(setq beg (point))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (looking-at (rst-re 'lin-end))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(setq cand (or cand beg)) ; An empty line is a candidate.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(move-to-column clm)
|
|
|
|
|
;; FIXME: No indentation [(zerop clm)] must be handled in some
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; useful way - though it is not clear what this should mean
|
|
|
|
|
;; at all.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(if (string-match
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-re 'linemp-tag)
|
|
|
|
|
(buffer-substring-no-properties beg (point)))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(setq cand nil) ; An indented line resets a candidate.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(setq fnd (or cand beg)))))))
|
|
|
|
|
(goto-char (or fnd start))
|
|
|
|
|
fnd))
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defvar rst-font-lock-find-unindented-line-begin nil
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Beginning of the match if `rst-font-lock-find-unindented-line-end'.")
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
(defvar rst-font-lock-find-unindented-line-end nil
|
|
|
|
|
"End of the match as determined by `rst-font-lock-find-unindented-line-limit'.
|
|
|
|
|
Also used as a trigger for
|
|
|
|
|
`rst-font-lock-find-unindented-line-match'.")
|
|
|
|
|
|
|
|
|
|
(defun rst-font-lock-find-unindented-line-limit (ind-pnt)
|
2012-05-29 06:16:49 +00:00
|
|
|
|
"Find the next unindented line relative to indentation at IND-PNT.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
Return this point, the end of the buffer or nil if nothing found.
|
|
|
|
|
If IND-PNT is `next' take the indentation from the next line if
|
2012-05-29 20:14:18 +00:00
|
|
|
|
this is not empty and indented more than the current one. If
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
IND-PNT is non-nil but not a number take the indentation from the
|
|
|
|
|
next non-empty line if this is indented more than the current
|
|
|
|
|
one."
|
|
|
|
|
(setq rst-font-lock-find-unindented-line-begin ind-pnt)
|
|
|
|
|
(setq rst-font-lock-find-unindented-line-end
|
|
|
|
|
(save-excursion
|
|
|
|
|
(when (not (numberp ind-pnt))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Find indentation point in next line if any.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setq ind-pnt
|
|
|
|
|
;; FIXME: Should be refactored to two different functions
|
|
|
|
|
;; giving their result to this function, may be
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; integrated in caller.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(save-match-data
|
|
|
|
|
(let ((cur-ind (current-indentation)))
|
|
|
|
|
(if (eq ind-pnt 'next)
|
|
|
|
|
(when (and (zerop (forward-line 1))
|
|
|
|
|
(< (point) (point-max)))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Not at EOF.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setq rst-font-lock-find-unindented-line-begin
|
|
|
|
|
(point))
|
|
|
|
|
(when (and (not (looking-at (rst-re 'lin-end)))
|
|
|
|
|
(> (current-indentation) cur-ind))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Use end of indentation if non-empty line.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(looking-at (rst-re 'hws-tag))
|
|
|
|
|
(match-end 0)))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Skip until non-empty line or EOF.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(while (and (zerop (forward-line 1))
|
|
|
|
|
(< (point) (point-max))
|
|
|
|
|
(looking-at (rst-re 'lin-end))))
|
|
|
|
|
(when (< (point) (point-max))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Not at EOF.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setq rst-font-lock-find-unindented-line-begin
|
|
|
|
|
(point))
|
|
|
|
|
(when (> (current-indentation) cur-ind)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Indentation bigger than line of departure.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(looking-at (rst-re 'hws-tag))
|
|
|
|
|
(match-end 0))))))))
|
|
|
|
|
(when ind-pnt
|
|
|
|
|
(goto-char ind-pnt)
|
|
|
|
|
(or (rst-forward-indented-block nil (point-max))
|
|
|
|
|
(point-max))))))
|
|
|
|
|
|
|
|
|
|
(defun rst-font-lock-find-unindented-line-match (limit)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Set the match found earlier if match were found.
|
|
|
|
|
Match has been found by
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
`rst-font-lock-find-unindented-line-limit' the first time called
|
2012-05-29 20:14:18 +00:00
|
|
|
|
or no match is found. Return non-nil if match was found. LIMIT
|
|
|
|
|
is not used but mandated by the caller."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(when rst-font-lock-find-unindented-line-end
|
|
|
|
|
(set-match-data
|
|
|
|
|
(list rst-font-lock-find-unindented-line-begin
|
|
|
|
|
rst-font-lock-find-unindented-line-end))
|
|
|
|
|
(put-text-property rst-font-lock-find-unindented-line-begin
|
|
|
|
|
rst-font-lock-find-unindented-line-end
|
|
|
|
|
'font-lock-multiline t)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Make sure this is called only once.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setq rst-font-lock-find-unindented-line-end nil)
|
|
|
|
|
t))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; Adornments
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defvar rst-font-lock-adornment-level nil
|
|
|
|
|
"Storage for `rst-font-lock-handle-adornment-matcher'.
|
|
|
|
|
Either section level of the current adornment or t for a transition.")
|
|
|
|
|
|
|
|
|
|
(defun rst-adornment-level (key)
|
|
|
|
|
"Return section level for adornment KEY.
|
|
|
|
|
KEY is the first element of the return list of
|
2012-05-29 20:14:18 +00:00
|
|
|
|
`rst-classify-adornment'. If KEY is not a cons return it. If KEY is found
|
|
|
|
|
in the hierarchy return its level. Otherwise return a level one
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
beyond the existing hierarchy."
|
|
|
|
|
(if (not (consp key))
|
|
|
|
|
key
|
|
|
|
|
(let* ((hier (rst-get-hierarchy))
|
|
|
|
|
(char (car key))
|
|
|
|
|
(style (cdr key)))
|
|
|
|
|
(1+ (or (position-if (lambda (elt)
|
|
|
|
|
(and (equal (car elt) char)
|
|
|
|
|
(equal (cadr elt) style))) hier)
|
|
|
|
|
(length hier))))))
|
|
|
|
|
|
|
|
|
|
(defvar rst-font-lock-adornment-match nil
|
|
|
|
|
"Storage for match for current adornment.
|
2012-05-29 20:14:18 +00:00
|
|
|
|
Set by `rst-font-lock-handle-adornment-pre-match-form'. Also used
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
as a trigger for `rst-font-lock-handle-adornment-matcher'.")
|
|
|
|
|
|
|
|
|
|
(defun rst-font-lock-handle-adornment-pre-match-form (ado ado-end)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Determine limit for adornments.
|
|
|
|
|
Determine all things necessary for font-locking section titles
|
|
|
|
|
and transitions and put the result to
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
`rst-font-lock-adornment-match' and
|
2012-05-29 20:14:18 +00:00
|
|
|
|
`rst-font-lock-adornment-level'. ADO is the complete adornment
|
|
|
|
|
matched. ADO-END is the point where ADO ends. Return the point
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
where the whole adorned construct ends.
|
|
|
|
|
|
|
|
|
|
Called as a PRE-MATCH-FORM in the sense of `font-lock-keywords'."
|
|
|
|
|
(let ((ado-data (rst-classify-adornment ado ado-end)))
|
|
|
|
|
(if (not ado-data)
|
|
|
|
|
(setq rst-font-lock-adornment-level nil
|
|
|
|
|
rst-font-lock-adornment-match nil)
|
|
|
|
|
(setq rst-font-lock-adornment-level
|
|
|
|
|
(rst-adornment-level (car ado-data)))
|
|
|
|
|
(setq rst-font-lock-adornment-match (cdr ado-data))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(goto-char (nth 1 ado-data)) ; Beginning of construct.
|
|
|
|
|
(nth 2 ado-data)))) ; End of construct.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
|
|
|
|
(defun rst-font-lock-handle-adornment-matcher (limit)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Set the match found earlier if match were found.
|
|
|
|
|
Match has been found by
|
|
|
|
|
`rst-font-lock-handle-adornment-pre-match-form' the first time
|
|
|
|
|
called or no match is found. Return non-nil if match was found.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
Called as a MATCHER in the sense of `font-lock-keywords'.
|
|
|
|
|
LIMIT is not used but mandated by the caller."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let ((match rst-font-lock-adornment-match))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; May run only once - enforce this.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(setq rst-font-lock-adornment-match nil)
|
|
|
|
|
(when match
|
|
|
|
|
(set-match-data match)
|
|
|
|
|
(goto-char (match-end 0))
|
|
|
|
|
(put-text-property (match-beginning 0) (match-end 0)
|
|
|
|
|
'font-lock-multiline t)
|
|
|
|
|
t)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; Compilation
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(defgroup rst-compile nil
|
|
|
|
|
"Settings for support of conversion of reStructuredText
|
|
|
|
|
document with \\[rst-compile]."
|
|
|
|
|
:group 'rst
|
|
|
|
|
:version "21.1")
|
|
|
|
|
|
2011-01-04 04:47:39 +00:00
|
|
|
|
(defcustom rst-compile-toolsets
|
|
|
|
|
`((html ,(if (executable-find "rst2html.py") "rst2html.py" "rst2html")
|
|
|
|
|
".html" nil)
|
|
|
|
|
(latex ,(if (executable-find "rst2latex.py") "rst2latex.py" "rst2latex")
|
|
|
|
|
".tex" nil)
|
|
|
|
|
(newlatex ,(if (executable-find "rst2newlatex.py") "rst2newlatex.py"
|
|
|
|
|
"rst2newlatex")
|
|
|
|
|
".tex" nil)
|
|
|
|
|
(pseudoxml ,(if (executable-find "rst2pseudoxml.py") "rst2pseudoxml.py"
|
|
|
|
|
"rst2pseudoxml")
|
|
|
|
|
".xml" nil)
|
|
|
|
|
(xml ,(if (executable-find "rst2xml.py") "rst2xml.py" "rst2xml")
|
|
|
|
|
".xml" nil)
|
|
|
|
|
(pdf ,(if (executable-find "rst2pdf.py") "rst2pdf.py" "rst2pdf")
|
|
|
|
|
".pdf" nil)
|
|
|
|
|
(s5 ,(if (executable-find "rst2s5.py") "rst2s5.py" "rst2s5")
|
|
|
|
|
".html" nil))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Table describing the command to use for each tool-set.
|
|
|
|
|
An association list of the tool-set to a list of the (command to use,
|
2008-06-20 16:00:33 +00:00
|
|
|
|
extension of produced filename, options to the tool (nil or a
|
2011-01-04 04:47:39 +00:00
|
|
|
|
string)) to be used for converting the document."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
;; FIXME: These are not options but symbols which may be referenced by
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; `rst-compile-*-toolset` below.
|
2011-01-04 17:04:10 +00:00
|
|
|
|
:type '(alist :options (html latex newlatex pseudoxml xml pdf s5)
|
2011-01-04 04:47:39 +00:00
|
|
|
|
:key-type symbol
|
|
|
|
|
:value-type (list :tag "Specification"
|
|
|
|
|
(file :tag "Command")
|
|
|
|
|
(string :tag "File extension")
|
|
|
|
|
(choice :tag "Command options"
|
|
|
|
|
(const :tag "No options" nil)
|
|
|
|
|
(string :tag "Options"))))
|
|
|
|
|
:group 'rst
|
|
|
|
|
:version "24.1")
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: Must be `defcustom`.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(defvar rst-compile-primary-toolset 'html
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"The default tool-set for `rst-compile'.")
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: Must be `defcustom`.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(defvar rst-compile-secondary-toolset 'latex
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"The default tool-set for `rst-compile' with a prefix argument.")
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(defun rst-compile-find-conf ()
|
|
|
|
|
"Look for the configuration file in the parents of the current path."
|
|
|
|
|
(interactive)
|
|
|
|
|
(let ((file-name "docutils.conf")
|
|
|
|
|
(buffer-file (buffer-file-name)))
|
|
|
|
|
;; Move up in the dir hierarchy till we find a change log file.
|
|
|
|
|
(let* ((dir (file-name-directory buffer-file))
|
|
|
|
|
(prevdir nil))
|
|
|
|
|
(while (and (or (not (string= dir prevdir))
|
|
|
|
|
(setq dir nil)
|
|
|
|
|
nil)
|
|
|
|
|
(not (file-exists-p (concat dir file-name))))
|
|
|
|
|
;; Move up to the parent dir and try again.
|
|
|
|
|
(setq prevdir dir)
|
|
|
|
|
(setq dir (expand-file-name (file-name-directory
|
|
|
|
|
(directory-file-name
|
|
|
|
|
(file-name-directory dir)))))
|
|
|
|
|
)
|
|
|
|
|
(or (and dir (concat dir file-name)) nil)
|
|
|
|
|
)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(require 'compile)
|
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-compile (&optional use-alt)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
"Compile command to convert reST document into some output file.
|
|
|
|
|
Attempts to find configuration file, if it can, overrides the
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
options. There are two commands to choose from, with USE-ALT,
|
2012-05-29 20:14:18 +00:00
|
|
|
|
select the alternative tool-set."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(interactive "P")
|
|
|
|
|
;; Note: maybe we want to check if there is a Makefile too and not do anything
|
|
|
|
|
;; if that is the case. I dunno.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let* ((toolset (cdr (assq (if use-alt
|
2008-06-20 16:00:33 +00:00
|
|
|
|
rst-compile-secondary-toolset
|
|
|
|
|
rst-compile-primary-toolset)
|
|
|
|
|
rst-compile-toolsets)))
|
|
|
|
|
(command (car toolset))
|
|
|
|
|
(extension (cadr toolset))
|
|
|
|
|
(options (caddr toolset))
|
|
|
|
|
(conffile (rst-compile-find-conf))
|
|
|
|
|
(bufname (file-name-nondirectory buffer-file-name))
|
|
|
|
|
(outname (file-name-sans-extension bufname)))
|
|
|
|
|
|
|
|
|
|
;; Set compile-command before invocation of compile.
|
|
|
|
|
(set (make-local-variable 'compile-command)
|
|
|
|
|
(mapconcat 'identity
|
|
|
|
|
(list command
|
|
|
|
|
(or options "")
|
|
|
|
|
(if conffile
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(concat "--config=" (shell-quote-argument conffile))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
"")
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(shell-quote-argument bufname)
|
|
|
|
|
(shell-quote-argument (concat outname extension)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
" "))
|
|
|
|
|
|
|
|
|
|
;; Invoke the compile command.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (or compilation-read-command use-alt)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(call-interactively 'compile)
|
|
|
|
|
(compile compile-command))
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
(defun rst-compile-alt-toolset ()
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Compile command with the alternative tool-set."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(interactive)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(rst-compile t))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
(defun rst-compile-pseudo-region ()
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Show pseudo-XML rendering.
|
|
|
|
|
Rendering is done of the current active region, or of the entire
|
|
|
|
|
buffer, if the region is not selected."
|
|
|
|
|
;; FIXME: The region should be given interactively.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(interactive)
|
|
|
|
|
(with-output-to-temp-buffer "*pseudoxml*"
|
|
|
|
|
(shell-command-on-region
|
|
|
|
|
(if mark-active (region-beginning) (point-min))
|
|
|
|
|
(if mark-active (region-end) (point-max))
|
2011-01-04 04:47:39 +00:00
|
|
|
|
(cadr (assq 'pseudoxml rst-compile-toolsets))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
standard-output)))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: Should be `defcustom`.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(defvar rst-pdf-program "xpdf"
|
|
|
|
|
"Program used to preview PDF files.")
|
|
|
|
|
|
|
|
|
|
(defun rst-compile-pdf-preview ()
|
|
|
|
|
"Convert the document to a PDF file and launch a preview program."
|
|
|
|
|
(interactive)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let* ((tmp-filename (make-temp-file "rst_el" nil ".pdf"))
|
|
|
|
|
(command (format "%s %s %s && %s %s ; rm %s"
|
2011-01-04 04:47:39 +00:00
|
|
|
|
(cadr (assq 'pdf rst-compile-toolsets))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
buffer-file-name tmp-filename
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
rst-pdf-program tmp-filename tmp-filename)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(start-process-shell-command "rst-pdf-preview" nil command)
|
|
|
|
|
;; Note: you could also use (compile command) to view the compilation
|
|
|
|
|
;; output.
|
|
|
|
|
))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: Should be `defcustom` or use something like `browse-url`.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(defvar rst-slides-program "firefox"
|
|
|
|
|
"Program used to preview S5 slides.")
|
|
|
|
|
|
|
|
|
|
(defun rst-compile-slides-preview ()
|
|
|
|
|
"Convert the document to an S5 slide presentation and launch a preview program."
|
|
|
|
|
(interactive)
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let* ((tmp-filename (make-temp-file "rst_el" nil ".html"))
|
|
|
|
|
(command (format "%s %s %s && %s %s ; rm %s"
|
2011-01-04 04:47:39 +00:00
|
|
|
|
(cadr (assq 's5 rst-compile-toolsets))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
buffer-file-name tmp-filename
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
rst-slides-program tmp-filename tmp-filename)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(start-process-shell-command "rst-slides-preview" nil command)
|
|
|
|
|
;; Note: you could also use (compile command) to view the compilation
|
|
|
|
|
;; output.
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; Generic text functions that are more convenient than the defaults.
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: Unbound command - should be bound or removed.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(defun rst-replace-lines (fromchar tochar)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Replace flush-left lines of FROMCHAR with equal-length lines of TOCHAR."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(interactive "\
|
|
|
|
|
cSearch for flush-left lines of char:
|
|
|
|
|
cand replace with char: ")
|
|
|
|
|
(save-excursion
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(let ((searchre (rst-re "^" fromchar "+\\( *\\)$"))
|
2008-06-20 17:53:42 +00:00
|
|
|
|
(found 0))
|
|
|
|
|
(while (search-forward-regexp searchre nil t)
|
|
|
|
|
(setq found (1+ found))
|
|
|
|
|
(goto-char (match-beginning 1))
|
|
|
|
|
(let ((width (current-column)))
|
|
|
|
|
(rst-delete-entire-line)
|
|
|
|
|
(insert-char tochar width)))
|
|
|
|
|
(message (format "%d lines replaced." found)))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: Unbound command - should be bound or removed.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(defun rst-join-paragraph ()
|
|
|
|
|
"Join lines in current paragraph into one line, removing end-of-lines."
|
|
|
|
|
(interactive)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
(let ((fill-column 65000)) ; some big number.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(call-interactively 'fill-paragraph)))
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: Unbound command - should be bound or removed.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(defun rst-force-fill-paragraph ()
|
|
|
|
|
"Fill paragraph at point, first joining the paragraph's lines into one.
|
|
|
|
|
This is useful for filling list item paragraphs."
|
|
|
|
|
(interactive)
|
|
|
|
|
(rst-join-paragraph)
|
|
|
|
|
(fill-paragraph nil))
|
|
|
|
|
|
|
|
|
|
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; FIXME: Unbound command - should be bound or removed.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
;; Generic character repeater function.
|
|
|
|
|
;; For sections, better to use the specialized function above, but this can
|
|
|
|
|
;; be useful for creating separators.
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(defun rst-repeat-last-character (use-next)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Fill the current line using the last character on the current line.
|
|
|
|
|
Fill up to the length of the preceding line or up to
|
|
|
|
|
`fill-column' if preceding line is empty.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
If USE-NEXT, use the next line rather than the preceding line.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
If the current line is longer than the desired length, shave the characters off
|
|
|
|
|
the current line to fit the desired length.
|
|
|
|
|
|
|
|
|
|
As an added convenience, if the command is repeated immediately, the alternative
|
|
|
|
|
column is used (fill-column vs. end of previous/next line)."
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(interactive "P")
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(let* ((curcol (current-column))
|
|
|
|
|
(curline (+ (count-lines (point-min) (point))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (zerop curcol) 1 0)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(lbp (line-beginning-position 0))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(prevcol (if (and (= curline 1) (not use-next))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
fill-column
|
|
|
|
|
(save-excursion
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(forward-line (if use-next 1 -1))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(end-of-line)
|
|
|
|
|
(skip-chars-backward " \t" lbp)
|
|
|
|
|
(let ((cc (current-column)))
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (zerop cc) fill-column cc)))))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(rightmost-column
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(cond ((equal last-command 'rst-repeat-last-character)
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(if (= curcol fill-column) prevcol fill-column))
|
|
|
|
|
(t (save-excursion
|
2012-05-05 Stefan Merten <smerten@oekonux.de>
* rst.el: Major merge with upstream development up to Docutils
SVN r7399 / rst.el V1.2.1.
Clarified maintainership and authors.
(rst-extract-version, rst-cvs-header, rst-cvs-rev)
(rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev, rst-version)
(rst-package-emacs-version-alist): New functions and variables
for version information.
(rst-bullets, rst-uri-schemes, rst-adornment-chars)
(rst-max-inline-length, rst-re-alist-def, rst-re-alist)
(rst-mode-syntax-table, rst-mode): New and corrected functions
and variables representing reStructuredText features.
(rst-re): New function for reStructuredText regexes. Used in
many places.
(rst-deprecated-keys, rst-call-deprecated, rst-define-key)
(rst-mode-map): Rebound keys.
(rst-mode-lazy, rst-font-lock-keywords)
(rst-font-lock-extend-region)
(rst-font-lock-extend-region-internal)
(rst-font-lock-extend-region-extend)
(rst-font-lock-find-unindented-line-limit)
(rst-font-lock-find-unindented-line-match)
(rst-adornment-level, rst-font-lock-adornment-level)
(rst-font-lock-adornment-match)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-font-lock-handle-adornment-matcher): Major revision of
font-locking. Integrated with other code. `jit-lock-mode' is
used now.
(rst-preferred-adornments, rst-adjust-hook)
(rst-new-adornment-down, rst-preferred-bullets)
(rst-preferred-bullets, rst-indent, rst-indent-width)
(rst-indent-field, rst-indent-literal-normal)
(rst-indent-literal-minimized, rst-indent-comment): Changed,
extended and improved customization.
(rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
(rst-normalize-cursor-position, rst-get-decoration)
(rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
(rst-rstrip, rst-toc-insert-find-delete-contents)
(rst-shift-fill-region, rst-compute-bullet-tabs)
(rst-debug-print-tabs, rst-debug-mark-found)
(rst-shift-region-guts, rst-shift-region-right)
(rst-shift-region-left, rst-use-char-classes)
(rst-font-lock-keywords-function)
(rst-font-lock-indentation-point)
(rst-font-lock-find-unindented-line-begin)
(rst-font-lock-find-unindented-line-end)
(rst-font-lock-find-unindented-line)
(rst-font-lock-adornment-point, rst-font-lock-level)
(rst-adornment-level-alist): Removed functions and variables.
(rst-compare-adornments, rst-get-adornment-match)
(rst-suggest-new-adornment, rst-get-adornments-around)
(rst-adornment-complete-p, rst-get-next-adornment)
(rst-adjust-adornment, rst-display-adornments-hierarchy)
(rst-straighten-adornments): Standardized function names to
use "adornment" instead of "decoration". Corrected callers.
Similar standardizing happened in many places.
(rst-update-section, rst-adjust, rst-promote-region)
(rst-enumerate-region, rst-bullet-list-region)
(rst-repeat-last-character): Corrected use of `interactive'.
(rst-classify-adornment, rst-find-all-adornments)
(rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
(rst-find-leftmost-column, rst-repeat-last-character):
Refactored functions.
(rst-find-title-line, rst-reset-section-caches)
(rst-get-adornments-around, rst-adjust-adornment-work)
(rst-arabic-to-roman, rst-roman-to-arabic)
(rst-insert-list-pos, rst-insert-list-new-item)
(rst-insert-list-continue, rst-insert-list, rst-forward-line):
New functions.
(rst-all-sections, rst-section-hierarchy)
(rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
New variables.
(rst-toc-return-wincfg, rst-toc-quit-window): Using window
configuration instead of only buffer. Changed where necessary.
(rst-line-tabs, rst-compute-tabs, rst-indent-line)
(rst-shift-region, rst-adaptive-fill): New functions for
indentation and filling.
(rst-comment-line-break, rst-comment-indent)
(rst-comment-insert-comment, rst-comment-region)
(rst-uncomment-region): New functions for handling comments.
(rst-compile): Shell arguments are quoted.
(rst-compile-pdf-preview, rst-compile-slides-preview):
Temporary files are deleted after use.
2012-05-07 19:51:25 +00:00
|
|
|
|
(if (zerop prevcol) fill-column prevcol)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
)) )
|
|
|
|
|
(end-of-line)
|
|
|
|
|
(if (> (current-column) rightmost-column)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Shave characters off the end.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(delete-region (- (point)
|
|
|
|
|
(- (current-column) rightmost-column))
|
|
|
|
|
(point))
|
2012-05-29 20:14:18 +00:00
|
|
|
|
;; Fill with last characters.
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(insert-char (preceding-char)
|
|
|
|
|
(- rightmost-column (current-column))))
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun rst-portable-mark-active-p ()
|
2012-05-29 20:14:18 +00:00
|
|
|
|
"Return non-nil if the mark is active.
|
|
|
|
|
This is a portable function."
|
2008-06-20 16:00:33 +00:00
|
|
|
|
(cond
|
|
|
|
|
((fboundp 'region-active-p) (region-active-p))
|
2011-01-04 04:47:39 +00:00
|
|
|
|
((boundp 'transient-mark-mode) (and transient-mark-mode mark-active))
|
|
|
|
|
(t mark-active)))
|
2008-06-20 16:00:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(provide 'rst)
|
2012-05-29 20:14:18 +00:00
|
|
|
|
|
|
|
|
|
;; LocalWords: docutils http sourceforge rst html wp svn svnroot txt reST regex
|
|
|
|
|
;; LocalWords: regexes alist seq alt grp keymap abbrev overline overlines toc
|
|
|
|
|
;; LocalWords: XML PNT propertized referencable
|
|
|
|
|
|
|
|
|
|
;; Local Variables:
|
|
|
|
|
;; sentence-end-double-space: t
|
|
|
|
|
;; End:
|
|
|
|
|
|
|
|
|
|
;;; rst.el ends here.
|