From 1145322a114bb7359fcfdbdce6ccb7d9d44c82ba Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Tue, 30 Aug 2016 20:30:46 +0200 Subject: [PATCH] Fix rules for \phi and \varphi which were reversed * lisp/leim/quail/latin-ltx.el: Special-case phi/varphi because those are reversed in ucs-names. Also remove FIXME stating sigma/varsigma were reversed which is not true (anymore?). --- lisp/leim/quail/latin-ltx.el | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lisp/leim/quail/latin-ltx.el b/lisp/leim/quail/latin-ltx.el index c265add83c1..fb3d2ba4902 100644 --- a/lisp/leim/quail/latin-ltx.el +++ b/lisp/leim/quail/latin-ltx.el @@ -239,10 +239,15 @@ system, including many technical ones. Examples: "\\`\\([^- ]+\\) SIGN\\'") ((lambda (name char) - (concat "\\" (funcall (if (match-end 1) #' capitalize #'downcase) - (match-string 2 name)))) + ;; "GREEK SMALL LETTER PHI" (which is \phi) and "GREEK PHI SYMBOL" + ;; (which is \varphi) are reversed in `ucs-names', so we define + ;; them manually. + (unless (string-match-p "\\" name) + (concat "\\" (funcall (if (match-end 1) #' capitalize #'downcase) + (match-string 2 name))))) "\\`GREEK \\(?:SMALL\\|CAPITA\\(L\\)\\) LETTER \\([^- ]+\\)\\'") + ("\\phi" ?ϕ) ("\\Box" ?□) ("\\Bumpeq" ?≎) ("\\Cap" ?⋒) @@ -628,12 +633,17 @@ system, including many technical ones. Examples: ("\\vDash" ?⊨) ((lambda (name char) - (concat "\\var" (downcase (match-string 1 name)))) + ;; "GREEK SMALL LETTER PHI" (which is \phi) and "GREEK PHI SYMBOL" + ;; (which is \varphi) are reversed in `ucs-names', so we define + ;; them manually. + (unless (string-match-p "\\" name) + (concat "\\var" (downcase (match-string 1 name))))) "\\`GREEK \\([^- ]+\\) SYMBOL\\'") + ("\\varphi" ?φ) ("\\varprime" ?′) ("\\varpropto" ?∝) - ("\\varsigma" ?ς) ;FIXME: Looks reversed with the non\var. + ("\\varsigma" ?ς) ("\\vartriangleleft" ?⊲) ("\\vartriangleright" ?⊳) ("\\vdash" ?⊢) -- 2.39.2