From beb2ec8be86f86571f37b2dbfcdac9a9f0184de0 Mon Sep 17 00:00:00 2001 From: tomo Date: Mon, 21 Jan 2008 08:32:55 +0000 Subject: [PATCH] (chise-tex-decode-region): Decode \`, \', \^, \~, \=, \., \" and \d. --- chise2otf/elisp/chise-tex.el | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/chise2otf/elisp/chise-tex.el b/chise2otf/elisp/chise-tex.el index 3288e19..fc0f13b 100644 --- a/chise2otf/elisp/chise-tex.el +++ b/chise2otf/elisp/chise-tex.el @@ -1,6 +1,6 @@ ;;; chise-tex.el --- Coding-system based chise2otf like tool -;; Copyright (C) 2004,2005,2006,2007 MORIOKA Tomohiko +;; Copyright (C) 2004,2005,2006,2007,2008 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Keywords: OTF package, pTeX, CHISE, Multiscript, Multilingual @@ -233,6 +233,27 @@ (narrow-to-region start end) (goto-char start) (let (macro code ret me rest spec) + (while (re-search-forward "\\\\\\(.\\){\\(.\\)}" nil t) + (when (and + (setq macro + (assq + (aref (match-string 1) 0) + '((?\` . ?\u0300) ; + (?\' . ?\u0301) ; + (?^ . ?\u0302) ; + (?~ . ?\u0303) ; + (?= . ?\u0304) ; + (?\. . ?\u0307) ; + (?\" . ?\u0308) ; + (?d . ?\u0323) ; + ))) + (setq ret + (cdr (assq (cdr macro) + (char-feature (aref (match-string 2) 0) + 'composition))))) + (delete-region (match-beginning 0)(match-end 0)) + (insert ret))) + (goto-char start) (while (re-search-forward "\\\\\\([a-zA-Z0-9]+\\){\\([0-9A-Fa-f]+\\)}" nil t) (setq macro (match-string 1) -- 1.7.10.4