summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Andy Wingo2010-10-14 12:42:01 +0200
committerGravatar Andy Wingo2010-11-13 18:47:03 +0100
commit1a0ff53dfcc01e0ef607f88566ac4e932137dd02 (patch)
treed440c6ad86b72bfd7548397b1238004faa3ce0c4
parent73bd5c3a3ea4e07a0d9ecf309dda6274b8021077 (diff)
downloadtekuti-1a0ff53dfcc01e0ef607f88566ac4e932137dd02.tar.gz
tekuti-1a0ff53dfcc01e0ef607f88566ac4e932137dd02.zip
use a properly exported interface to define parsed entities
* tekuti/config.scm: Use the new define-parsed-entity! to define the character entities.
-rw-r--r--tekuti/config.scm22
1 files changed, 8 insertions, 14 deletions
diff --git a/tekuti/config.scm b/tekuti/config.scm
index 027f23c..189b257 100644
--- a/tekuti/config.scm
+++ b/tekuti/config.scm
@@ -1,5 +1,5 @@
;; Tekuti
-;; Copyright (C) 2008 Andy Wingo <wingo at pobox dot com>
+;; Copyright (C) 2008, 2010 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
@@ -26,6 +26,7 @@
(define-module (tekuti config)
#:use-module (tekuti util)
+ #:use-module ((sxml ssax) #:select (define-parsed-entity!))
#:export (*host* *port* *backlog* *git-dir* *git* *public-url-base*
*private-url-base* *debug* *admin-user* *admin-pass*
*css-file* *navbar-links* *navbar-infix*
@@ -48,16 +49,9 @@
(define *subtitle* "Just a blog, ok")
(define *name* "Joe Schmo")
-(define *character-entities* '((agrave . 224)
- (laquo . 171)
- (mdash . 8212)
- (nbsp . 160)
- (raquo . 187)
- (uacute . 250)))
-(use-modules (sxml ssax-simple) (sxml unicode))
-(for-each
- (lambda (pair)
- (set! ssax:predefined-parsed-entities
- (assoc-set! ssax:predefined-parsed-entities
- (car pair) (unichar->utf-8 (cdr pair)))))
- *character-entities*)
+(define-parsed-entity! 'agrave 224)
+(define-parsed-entity! 'laquo 171)
+(define-parsed-entity! 'mdash 8212)
+(define-parsed-entity! 'nbsp 160)
+(define-parsed-entity! 'raquo 187)
+(define-parsed-entity! 'uacute 250)