diff options
| author | Stefan Merten | 2012-05-14 11:31:08 +0200 |
|---|---|---|
| committer | Stefan Merten | 2012-05-14 11:31:08 +0200 |
| commit | 51fa99f1e6af73a1118b832e16fdb6f196480db8 (patch) | |
| tree | 3621b7d21cd3aa5a551c2be091fcb6ac163404b4 | |
| parent | 2d21d7f6764a7885aac8ac91a4b64a8fa0e0a084 (diff) | |
| download | emacs-51fa99f1e6af73a1118b832e16fdb6f196480db8.tar.gz emacs-51fa99f1e6af73a1118b832e16fdb6f196480db8.zip | |
(rst-re-alist): Fix loading (bug#11462).
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/textmodes/rst.el | 23 |
2 files changed, 16 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 75fc7f5884d..3d5485b39b9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-05-14 Stefan Merten <smerten@oekonux.de> | ||
| 2 | |||
| 3 | * textmodes/rst.el (rst-re-alist): Fix loading (bug#11462). | ||
| 4 | |||
| 1 | 2012-05-14 Wolfgang Jenkner <wjenkner@inode.at> | 5 | 2012-05-14 Wolfgang Jenkner <wjenkner@inode.at> |
| 2 | 6 | ||
| 3 | * image-mode.el: Fit to width/height for rotated images (bug#11431). | 7 | * image-mode.el: Fit to width/height for rotated images (bug#11431). |
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 1fefe6e2e28..262a49e2668 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el | |||
| @@ -422,17 +422,6 @@ in parentheses follows the development revision and the timestamp.") | |||
| 422 | Each entry consists of the symbol naming the regex and an | 422 | Each entry consists of the symbol naming the regex and an |
| 423 | argument list for `rst-re'.") | 423 | argument list for `rst-re'.") |
| 424 | 424 | ||
| 425 | (defconst rst-re-alist | ||
| 426 | ;; Shadow global value we are just defining so we can construct it step by | ||
| 427 | ;; step | ||
| 428 | (let (rst-re-alist) | ||
| 429 | (dolist (re rst-re-alist-def) | ||
| 430 | (setq rst-re-alist | ||
| 431 | (nconc rst-re-alist | ||
| 432 | (list (list (car re) (apply 'rst-re (cdr re))))))) | ||
| 433 | rst-re-alist) | ||
| 434 | "Alist mapping symbols from `rst-re-alist-def' to regex strings.") | ||
| 435 | |||
| 436 | ;; FIXME: Use `sregex` or `rx` instead of re-inventing the wheel | 425 | ;; FIXME: Use `sregex` or `rx` instead of re-inventing the wheel |
| 437 | (defun rst-re (&rest args) | 426 | (defun rst-re (&rest args) |
| 438 | "Interpret ARGS as regular expressions and return a regex string. | 427 | "Interpret ARGS as regular expressions and return a regex string. |
| @@ -492,6 +481,18 @@ After interpretation of ARGS the results are concatenated as for | |||
| 492 | (error "Unknown object type for building regex: %s" re)))) | 481 | (error "Unknown object type for building regex: %s" re)))) |
| 493 | args))) | 482 | args))) |
| 494 | 483 | ||
| 484 | ;; FIXME: Remove circular dependency between `rst-re' and `rst-re-alist'. | ||
| 485 | (defconst rst-re-alist | ||
| 486 | ;; Shadow global value we are just defining so we can construct it step by | ||
| 487 | ;; step | ||
| 488 | (let (rst-re-alist) | ||
| 489 | (dolist (re rst-re-alist-def) | ||
| 490 | (setq rst-re-alist | ||
| 491 | (nconc rst-re-alist | ||
| 492 | (list (list (car re) (apply 'rst-re (cdr re))))))) | ||
| 493 | rst-re-alist) | ||
| 494 | "Alist mapping symbols from `rst-re-alist-def' to regex strings.") | ||
| 495 | |||
| 495 | 496 | ||
| 496 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 497 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 497 | ;; Mode definition. | 498 | ;; Mode definition. |