aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Merten2012-05-14 22:39:14 +0200
committerStefan Merten2012-05-14 22:39:14 +0200
commit3a427266b688e084e908ae2ede9b6e373d8b0032 (patch)
tree2a430b2273437a2766441d185ed48a7ac9bf92fa /lisp
parent985584aed1505c40f97b0cfc983f4a5e05b127d8 (diff)
parent51fa99f1e6af73a1118b832e16fdb6f196480db8 (diff)
downloademacs-3a427266b688e084e908ae2ede9b6e373d8b0032.tar.gz
emacs-3a427266b688e084e908ae2ede9b6e373d8b0032.zip
(rst-re-alist): Fix loading (bug#11462).
Diffstat (limited to 'lisp')
-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 @@
12012-05-14 Stefan Merten <smerten@oekonux.de>
2
3 * textmodes/rst.el (rst-re-alist): Fix loading (bug#11462).
4
12012-05-14 Stefan Monnier <monnier@iro.umontreal.ca> 52012-05-14 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * net/rlogin.el (rlogin-mode-map): Fix last change. 7 * 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.")
422Each entry consists of the symbol naming the regex and an 422Each entry consists of the symbol naming the regex and an
423argument list for `rst-re'.") 423argument 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.