summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Merten <smerten@oekonux.de>2012-05-14 22:39:14 +0200
committerStefan Merten <smerten@oekonux.de>2012-05-14 22:39:14 +0200
commit3a427266b688e084e908ae2ede9b6e373d8b0032 (patch)
tree2a430b2273437a2766441d185ed48a7ac9bf92fa
parent985584aed1505c40f97b0cfc983f4a5e05b127d8 (diff)
parent51fa99f1e6af73a1118b832e16fdb6f196480db8 (diff)
downloademacs-3a427266b688e084e908ae2ede9b6e373d8b0032.tar.gz
(rst-re-alist): Fix loading (bug#11462).
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/textmodes/rst.el23
2 files changed, 16 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0d1c3529a14..d91fc5d0b22 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2012-05-14 Stefan Merten <smerten@oekonux.de>
+
+ * textmodes/rst.el (rst-re-alist): Fix loading (bug#11462).
+
2012-05-14 Stefan Monnier <monnier@iro.umontreal.ca>
* net/rlogin.el (rlogin-mode-map): Fix last change.
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.")
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.