[DRE-commits] [ruby-org] 260/303: Just changes util/gen-special-replace.el.
Jérémy Bobbio
lunar at alioth.debian.org
Fri Aug 9 17:34:09 UTC 2013
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository ruby-org.
commit 547d5840e2ce29a5ea161c482e2297d1376b6d04
Author: vonavi <ivvl82 at gmail.com>
Date: Sat Feb 2 16:07:25 2013 +0200
Just changes util/gen-special-replace.el.
---
util/gen-special-replace.el | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/util/gen-special-replace.el b/util/gen-special-replace.el
index 8ac7951..b2057b6 100644
--- a/util/gen-special-replace.el
+++ b/util/gen-special-replace.el
@@ -11,19 +11,18 @@
org-entities))
(to (if (string= what "html") 3
6))) ; use utf8 for textile
- (insert " " (capitalize what) "Entities = {")
- (dolist (entity ll)
- (when (listp entity)
- (let ((symb (nth to entity)))
- ;; escape backslashes and quotation marks
- (setq symb (replace-regexp-in-string "\\(\\\\\\|\\\"\\)" "\\\\\\&" symb))
- ;; escape percent marks from further formatting
- (setq symb (replace-regexp-in-string "%" "%%" symb))
- (insert "\n \"" (car entity) "\" => \"" symb "\","))))
- ;; remove last comma from the sequence
- (search-backward ",")
- (replace-match "")
- (insert "\n }\n")))
+ (insert " " (capitalize what) "Entities = {\n"
+ (mapconcat
+ (lambda (entity)
+ (let ((symb (nth to entity)))
+ ;; escape backslashes and quotation marks
+ (setq symb (replace-regexp-in-string "\\(\\\\\\|\\\"\\)" "\\\\\\&" symb))
+ ;; escape percent marks from further formatting
+ (setq symb (replace-regexp-in-string "%" "%%" symb))
+ (concat " \"" (car entity) "\" => \"" symb "\"")))
+ (remove-if-not 'listp ll)
+ ",\n")
+ "\n }\n")))
(defun generate-replace-header (what)
(insert
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-org.git
More information about the Pkg-ruby-extras-commits
mailing list