From: Stefan Merten Date: Mon, 14 May 2012 09:31:08 +0000 (+0200) Subject: (rst-re-alist): Fix loading (bug#11462). X-Git-Url: https://git.hcoop.net/bpt/emacs.git/commitdiff_plain/51fa99f1e6af73a1118b832e16fdb6f196480db8 (rst-re-alist): Fix loading (bug#11462). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 75fc7f5884..3d5485b39b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-05-14 Stefan Merten + + * textmodes/rst.el (rst-re-alist): Fix loading (bug#11462). + 2012-05-14 Wolfgang Jenkner * 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 1fefe6e2e2..262a49e266 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -422,17 +422,6 @@ in parentheses follows the development revision and the timestamp.") Each entry consists of the symbol naming the regex and an argument list for `rst-re'.") -(defconst rst-re-alist - ;; Shadow global value we are just defining so we can construct it step by - ;; step - (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.") - ;; FIXME: Use `sregex` or `rx` instead of re-inventing the wheel (defun rst-re (&rest args) "Interpret ARGS as regular expressions and return a regex string. @@ -492,6 +481,18 @@ After interpretation of ARGS the results are concatenated as for (error "Unknown object type for building regex: %s" re)))) args))) +;; 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 + ;; step + (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.") + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Mode definition.