aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/unicode-tokens.el
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2009-05-26 09:38:44 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2009-05-26 09:38:44 +0000
commit4770ff0da323eaf522df333177f4a3c7cac2ce9d (patch)
tree4384b2e89333aafabd5f86e64fc5bff63981b533 /lib/unicode-tokens.el
parent66c2143268db98df27b6fd629016e6871469bb90 (diff)
unicode-tokens-symbs-to-props: Allow multiple properties to work. Note: font prop must be given first
Diffstat (limited to 'lib/unicode-tokens.el')
-rw-r--r--lib/unicode-tokens.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/unicode-tokens.el b/lib/unicode-tokens.el
index b200223a..09634d0f 100644
--- a/lib/unicode-tokens.el
+++ b/lib/unicode-tokens.el
@@ -1,6 +1,6 @@
;;; unicode-tokens.el --- Support for control and symbol tokens
;;
-;; Copyright(C) 2008 David Aspinall / LFCS Edinburgh
+;; Copyright(C) 2008-2009 David Aspinall / LFCS Edinburgh
;; Author: David Aspinall <David.Aspinall@ed.ac.uk>
;; License: GPL (GNU GENERAL PUBLIC LICENSE)
;;
@@ -278,13 +278,11 @@ Token symbol is searched for in `unicode-tokens-hash-table'."
(font-lock-fontify-buffer))
(defun unicode-tokens-symbs-to-props (symbs &optional facenil)
- (let (props p)
+ (let (props ps)
(dolist (s symbs)
- (setq p (car-safe
- (cdr-safe (assoc s unicode-tokens-fontsymb-properties))))
- (if (consp p)
- (setq props (cons (car p) (cons (cadr p) props)))
- (setq props (cons p props))))
+ (setq ps (cdr-safe (assoc s unicode-tokens-fontsymb-properties)))
+ (dolist (p ps)
+ (setq props (append p props))))
(if (and facenil
(not (memq 'face props)))
(setq props (append '(face nil) props)))
@@ -391,7 +389,8 @@ Calculated from `unicode-tokens-token-name-alist' and
(message "Inserted %s" ins)))
(defun unicode-tokens-annotate-region (name)
- "Annotate region with region markup tokens for scheme NAME."
+ "Annotate region with region markup tokens for scheme NAME.
+Available annotations chosen from `unicode-tokens-control-regions'."
(interactive (let ((completion-ignore-case t))
(list (completing-read
"Annotate region with: "