summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-07-11 18:36:31 +0200
committerBastien Guerry <bzg@altern.org>2012-07-11 18:36:31 +0200
commit94b9bec27c23c67398dd8e30ba6ac4c04656ed13 (patch)
tree71c0dc00d25505dd86a8891f7dee3b5b9a895764
parentdadc19949144fe24b12a0a58b7fe4fbd89f3f500 (diff)
parente886c548e4a057326d1ac434f39f06a6c00e260f (diff)
downloadorg-mode-94b9bec27c23c67398dd8e30ba6ac4c04656ed13.tar.gz
Merge branch 'master' of orgmode.org:org-mode
-rw-r--r--lisp/org-entities.el49
1 files changed, 23 insertions, 26 deletions
diff --git a/lisp/org-entities.el b/lisp/org-entities.el
index b1c8ad4..2387655 100644
--- a/lisp/org-entities.el
+++ b/lisp/org-entities.el
@@ -497,34 +497,31 @@ Kind can be any of `latex', `html', `ascii', `latin1', or `utf8'."
;; Helpfunctions to create a table for orgmode.org/worg/org-symbols.org
(defun org-entities-create-table ()
- "Create an org-mode table with all entities."
+ "Create an Org mode table with all entities."
(interactive)
- (let ((ll org-entities)
- (pos (point))
- e latex mathp html latin utf8 name ascii)
+ (let ((pos (point)) e latex mathp html latin utf8 name ascii)
(insert "|Name|LaTeX code|LaTeX|HTML code |HTML|ASCII|Latin1|UTF-8\n|-\n")
- (while ll
- (when (listp e)
- (setq e (pop ll))
- (setq name (car e)
- latex (nth 1 e)
- mathp (nth 2 e)
- html (nth 3 e)
- ascii (nth 4 e)
- latin (nth 5 e)
- utf8 (nth 6 e))
- (if (equal ascii "|") (setq ascii "\\vert"))
- (if (equal latin "|") (setq latin "\\vert"))
- (if (equal utf8 "|") (setq utf8 "\\vert"))
- (if (equal ascii "=>") (setq ascii "= >"))
- (if (equal latin "=>") (setq latin "= >"))
- (insert "|" name
- "|" (format "=%s=" latex)
- "|" (format (if mathp "$%s$" "$\\mbox{%s}$")
- latex)
- "|" (format "=%s=" html) "|" html
- "|" ascii "|" latin "|" utf8
- "|\n")))
+ (mapc (lambda (e) (when (listp e)
+ (setq name (car e)
+ latex (nth 1 e)
+ mathp (nth 2 e)
+ html (nth 3 e)
+ ascii (nth 4 e)
+ latin (nth 5 e)
+ utf8 (nth 6 e))
+ (if (equal ascii "|") (setq ascii "\\vert"))
+ (if (equal latin "|") (setq latin "\\vert"))
+ (if (equal utf8 "|") (setq utf8 "\\vert"))
+ (if (equal ascii "=>") (setq ascii "= >"))
+ (if (equal latin "=>") (setq latin "= >"))
+ (insert "|" name
+ "|" (format "=%s=" latex)
+ "|" (format (if mathp "$%s$" "$\\mbox{%s}$")
+ latex)
+ "|" (format "=%s=" html) "|" html
+ "|" ascii "|" latin "|" utf8
+ "|\n")))
+ org-entities)
(goto-char pos)
(org-table-align)))