From 91554659b87da48b5373471ca4ac9245b68b1e54 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 8 Feb 2013 10:48:36 -0500 Subject: [PATCH] * leim/quail/latin-ltx.el: Add greek superscripts. --- leim/ChangeLog | 4 ++++ leim/quail/latin-ltx.el | 18 +++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/leim/ChangeLog b/leim/ChangeLog index b07102d44ba..b6591afb75f 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,3 +1,7 @@ +2013-02-08 Stefan Monnier + + * quail/latin-ltx.el: Add greek superscripts. + 2012-12-04 Stefan Monnier * quail/latin-ltx.el: Avoid deprecated chars for \langle and \rangle. diff --git a/leim/quail/latin-ltx.el b/leim/quail/latin-ltx.el index e686d7bc04b..2179e6264a2 100644 --- a/leim/quail/latin-ltx.el +++ b/leim/quail/latin-ltx.el @@ -248,14 +248,18 @@ system, including many technical ones. Examples: (string (if (match-end 2) ?^ ?_) basechar)))) "\\(.*\\)SU\\(?:B\\|\\(PER\\)\\)SCRIPT \\(.*\\)") - ("^\\gamma" ?Ë ) - ((lambda (name char) - (let* ((base (format "LATIN %s LETTER %s" - (match-string 1 name) (match-string 2 name))) - (basechar (cdr (assoc base (ucs-names))))) - (when (latin-ltx--ascii-p basechar) - (string ?^ basechar)))) + (let* ((basename (match-string 2 name)) + (lbase (format "LATIN %s LETTER %s" + (match-string 1 name) basename)) + (gbase (format "GREEK %s LETTER %s" + (match-string 1 name) basename)) + tmp) + (cond + ((assoc gbase (ucs-names)) (concat "^\\" (downcase basename))) + ((latin-ltx--ascii-p (setq tmp (cdr (assoc lbase (ucs-names))))) + (string ?^ tmp)) + (t (message "Unknown modifier letter %s" basename))))) "MODIFIER LETTER \\(SMALL\\|CAPITAL\\) \\(.*\\)") ;; ((lambda (name char) (format "^%s" (downcase (match-string 1 name)))) -- 2.39.5