diff options
| author | Stefan Merten | 2017-01-08 11:09:10 +0100 |
|---|---|---|
| committer | Stefan Merten | 2017-01-08 11:09:10 +0100 |
| commit | 3d418bd46fb89bec035394b71fa17ac4bfbebbc5 (patch) | |
| tree | ea6038586ad89a75a26d82b9f80dea11cba214db | |
| parent | 952d0f2ce4c262f45d19acffb107c7167cd5e07f (diff) | |
| download | emacs-3d418bd46fb89bec035394b71fa17ac4bfbebbc5.tar.gz emacs-3d418bd46fb89bec035394b71fa17ac4bfbebbc5.zip | |
* lisp/textmodes/rst.el: Fix rst-forward-indented-block.
* rst.el (rst-cvs-header, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev)
(rst-package-emacs-version-alist): Maintain version numbers.
(rst-forward-indented-block): Fix. Start searching at next
line again. Fixes fontification of comments continuing on the
same line they started.
| -rw-r--r-- | lisp/textmodes/rst.el | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index edc48850609..06f969d2784 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el | |||
| @@ -244,7 +244,7 @@ and before TAIL-RE and DELIM-RE in VAR or DEFAULT for no match." | |||
| 244 | ;; Use CVSHeader to really get information from CVS and not other version | 244 | ;; Use CVSHeader to really get information from CVS and not other version |
| 245 | ;; control systems. | 245 | ;; control systems. |
| 246 | (defconst rst-cvs-header | 246 | (defconst rst-cvs-header |
| 247 | "$CVSHeader: sm/rst_el/rst.el,v 1.1058.2.3 2017/01/03 21:56:29 stefan Exp $") | 247 | "$CVSHeader: sm/rst_el/rst.el,v 1.1058.2.9 2017/01/08 09:54:50 stefan Exp $") |
| 248 | (defconst rst-cvs-rev | 248 | (defconst rst-cvs-rev |
| 249 | (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+" | 249 | (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+" |
| 250 | " .*" rst-cvs-header "0.0") | 250 | " .*" rst-cvs-header "0.0") |
| @@ -258,22 +258,22 @@ and before TAIL-RE and DELIM-RE in VAR or DEFAULT for no match." | |||
| 258 | ;; Use LastChanged... to really get information from SVN. | 258 | ;; Use LastChanged... to really get information from SVN. |
| 259 | (defconst rst-svn-rev | 259 | (defconst rst-svn-rev |
| 260 | (rst-extract-version "\\$" "LastChangedRevision: " "[0-9]+" " " | 260 | (rst-extract-version "\\$" "LastChangedRevision: " "[0-9]+" " " |
| 261 | "$LastChangedRevision: 8011 $") | 261 | "$LastChangedRevision: 8015 $") |
| 262 | "The SVN revision of this file. | 262 | "The SVN revision of this file. |
| 263 | SVN revision is the upstream (docutils) revision.") | 263 | SVN revision is the upstream (docutils) revision.") |
| 264 | (defconst rst-svn-timestamp | 264 | (defconst rst-svn-timestamp |
| 265 | (rst-extract-version "\\$" "LastChangedDate: " ".+?+" " " | 265 | (rst-extract-version "\\$" "LastChangedDate: " ".+?+" " " |
| 266 | "$LastChangedDate: 2017-01-03 22:56:17 +0100 (Tue, 03 Jan 2017) $") | 266 | "$LastChangedDate: 2017-01-08 10:54:35 +0100 (Sun, 08 Jan 2017) $") |
| 267 | "The SVN time stamp of this file.") | 267 | "The SVN time stamp of this file.") |
| 268 | 268 | ||
| 269 | ;; Maintained by the release process. | 269 | ;; Maintained by the release process. |
| 270 | (defconst rst-official-version | 270 | (defconst rst-official-version |
| 271 | (rst-extract-version "%" "OfficialVersion: " "[0-9]+\\(?:\\.[0-9]+\\)+" " " | 271 | (rst-extract-version "%" "OfficialVersion: " "[0-9]+\\(?:\\.[0-9]+\\)+" " " |
| 272 | "%OfficialVersion: 1.5.1 %") | 272 | "%OfficialVersion: 1.5.2 %") |
| 273 | "Official version of the package.") | 273 | "Official version of the package.") |
| 274 | (defconst rst-official-cvs-rev | 274 | (defconst rst-official-cvs-rev |
| 275 | (rst-extract-version "[%$]" "Revision: " "[0-9]+\\(?:\\.[0-9]+\\)+" " " | 275 | (rst-extract-version "[%$]" "Revision: " "[0-9]+\\(?:\\.[0-9]+\\)+" " " |
| 276 | "$Revision: 1.1058.2.3 $") | 276 | "$Revision: 1.1058.2.9 $") |
| 277 | "CVS revision of this file in the official version.") | 277 | "CVS revision of this file in the official version.") |
| 278 | 278 | ||
| 279 | (defconst rst-version | 279 | (defconst rst-version |
| @@ -297,6 +297,8 @@ in parentheses follows the development revision and the time stamp.") | |||
| 297 | ("1.4.2" . "24.5") | 297 | ("1.4.2" . "24.5") |
| 298 | ("1.5.0" . "26.1") | 298 | ("1.5.0" . "26.1") |
| 299 | ("1.5.1" . "26.2") | 299 | ("1.5.1" . "26.2") |
| 300 | ("1.5.2" . "26.2") | ||
| 301 | ;; Whatever the Emacs version is this rst.el version ends up in. | ||
| 300 | )) | 302 | )) |
| 301 | 303 | ||
| 302 | (unless (assoc rst-official-version rst-package-emacs-version-alist) | 304 | (unless (assoc rst-official-version rst-package-emacs-version-alist) |
| @@ -4148,25 +4150,26 @@ Return extended point or nil if not moved." | |||
| 4148 | (defun rst-forward-indented-block (&optional column limit) | 4150 | (defun rst-forward-indented-block (&optional column limit) |
| 4149 | ;; testcover: ok. | 4151 | ;; testcover: ok. |
| 4150 | "Move forward across one indented block. | 4152 | "Move forward across one indented block. |
| 4151 | Find the next non-empty line which is not indented at least to | 4153 | Find the next (i.e. excluding the current line) non-empty line |
| 4152 | COLUMN (defaults to the column of the point). Moves point to | 4154 | which is not indented at least to COLUMN (defaults to the column |
| 4153 | first character of this line or the first of the empty lines | 4155 | of the point). Move point to first character of this line or the |
| 4154 | immediately before it and returns that position. If there is no | 4156 | first of the empty lines immediately before it and return that |
| 4155 | such line before LIMIT (defaults to the end of the buffer) | 4157 | position. If there is no such line before LIMIT (defaults to the |
| 4156 | returns nil and point is not moved." | 4158 | end of the buffer) return nil and do not move point." |
| 4157 | (let (fnd candidate) | 4159 | (let (fnd candidate) |
| 4158 | (setq fnd (rst-apply-indented-blocks | 4160 | (setq fnd (rst-apply-indented-blocks |
| 4159 | (point) (or limit (point-max)) (or column (current-column)) | 4161 | (line-beginning-position 2) ; Skip the current line |
| 4160 | #'(lambda (_count _in-first _in-sub in-super in-empty _relind) | 4162 | (or limit (point-max)) (or column (current-column)) |
| 4161 | (cond | 4163 | #'(lambda (_count _in-first _in-sub in-super in-empty _relind) |
| 4162 | (in-empty | 4164 | (cond |
| 4163 | (setq candidate (or candidate (line-beginning-position))) | 4165 | (in-empty |
| 4164 | nil) | 4166 | (setq candidate (or candidate (line-beginning-position))) |
| 4165 | (in-super | 4167 | nil) |
| 4166 | (or candidate (line-beginning-position))) | 4168 | (in-super |
| 4167 | (t ; Non-empty, same or more indented line. | 4169 | (or candidate (line-beginning-position))) |
| 4168 | (setq candidate nil) | 4170 | (t ; Non-empty, same or more indented line. |
| 4169 | nil))))) | 4171 | (setq candidate nil) |
| 4172 | nil))))) | ||
| 4170 | (when fnd | 4173 | (when fnd |
| 4171 | (goto-char fnd)))) | 4174 | (goto-char fnd)))) |
| 4172 | 4175 | ||