bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64212: 29.0.91; \Phi missing in TeX input method


From: Stefan Monnier
Subject: bug#64212: 29.0.91; \Phi missing in TeX input method
Date: Thu, 22 Jun 2023 10:42:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

>> The TeX input method is missing \Phi that should give GREEK CAPITAL
>> LETTER PHI.  I am surprised I never stumbled upon this previously.  But
>> apparently that's what it is (with emacs -Q).
> Why do you need that letter in a TeX context?

FWIW, the TeX input method uses a lot of such Greek letters already.

> TeX input method is more for typing scientific text in TeX and its
> variants, and there they use a different codepoint for the symbol.

I don't see any better code point for capital phi.

>> (There is a special treatment of variants of the greek letter phi in
>> latin-ltx.el that goes beyond my knowledge of how input methods are
>> implemented.)
>
> If all that's needs to be added to the input method is
>
>    ("\\Phi" ?Φ)
>
> then I can do that.

That would work, but I think the problem was in the regexp and the patch
below should fix it The Right Way.  Should I push it to `master` or are
we still considering such fixes for `emacs-29`?


        Stefan


diff --git a/lisp/leim/quail/latin-ltx.el b/lisp/leim/quail/latin-ltx.el
index 21a01c85737..9be3d722504 100644
--- a/lisp/leim/quail/latin-ltx.el
+++ b/lisp/leim/quail/latin-ltx.el
@@ -244,7 +244,8 @@
     ;; (which is \varphi) are reversed in `ucs-names', so we define
     ;; them manually.  Also ignore "GREEK SMALL LETTER EPSILON" and
     ;; add the correct value for \epsilon manually.
-    (unless (string-match-p "\\<\\(?:PHI\\|GREEK SMALL LETTER EPSILON\\)\\>" 
name)
+    (unless (string-match-p "\\<GREEK SMALL LETTER \\(?:EPSILON\\|PHI\\)\\>"
+                            name)
       (concat "\\" (funcall (if (match-end 1) #' capitalize #'downcase)
                             (match-string 2 name)))))
   "\\`GREEK \\(?:SMALL\\|CAPITA\\(L\\)\\) LETTER \\([^- ]+\\)\\'")






reply via email to

[Prev in Thread] Current Thread [Next in Thread]