From: tomo Date: Mon, 21 Jan 2008 08:32:55 +0000 (+0000) Subject: (chise-tex-decode-region): Decode \`, \', \^, \~, \=, \., \" and \d. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=beb2ec8be86f86571f37b2dbfcdac9a9f0184de0;p=chise%2Fomega.git (chise-tex-decode-region): Decode \`, \', \^, \~, \=, \., \" and \d. --- 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)