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

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

bug#30513: Unicode Character Name is misspelled (MATHEMATICAL ITALIC SMA


From: Noam Postavsky
Subject: bug#30513: Unicode Character Name is misspelled (MATHEMATICAL ITALIC SMALL LAMDA)
Date: Sun, 18 Feb 2018 10:54:21 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

tags 30513 + patch
quit

Michael Grünewald <michipili@gmail.com> writes:

> What would be the preferred way to enter math symbols without fumbling over 
> such small
> oddities? Is there any possibility of adjusting the auto-completion method so 
> that it
> is not so picky about the difference between LAMDA and LAMBDA?  Are there 
> other better
> approaches?
>
> (I think I am well aware of the LAMBDA vs. LAMDA detail now but what about 
> the huge crowd
> of Emacs users entering MATHEMATICAL ITALIC SMALL letters using C-x 8 RET? ;) 
> )

Yeah, this is fresh in my memory since I was recently playing with ucs-insert
and was a bit surprised to discover "LAMBDA" under the *old* name:

  name: GREEK SMALL LETTER LAMDA
  old-name: GREEK SMALL LETTER LAMBDA

Anyway, I think the following patch should smooth things over:

>From a7b40afd7fad41d55e7a43168c7febc9722ee3ac Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sun, 18 Feb 2018 10:43:42 -0500
Subject: [PATCH v1] Allow "lambda" spelling for ucs-insert (Bug#30513)

* lisp/international/mule-cmds.el (ucs-names): Add a "LAMBDA"
completion variant for every "LAMDA" name.
---
 lisp/international/mule-cmds.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 3468166263..2a995121dd 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2949,6 +2949,14 @@ ucs-names
                ;; higher code, so it gets pushed later!
                (if new-name (puthash new-name c names))
                (if old-name (puthash old-name c names))
+                ;; Unicode uses the spelling "lamda" in character
+                ;; names, instead of "lambda", due to "preferences
+                ;; expressed by the Greek National Body" (Bug#30513).
+                ;; Some characters have an old-name with the "lambda"
+                ;; spelling, but others don't.  Add the traditional
+                ;; spelling for more convenient completion.
+                (if (and (not old-name) new-name (string-match "LAMDA" 
new-name))
+                    (puthash (replace-match "LAMBDA" t t new-name) c names))
                (setq c (1+ c))))))
         ;; Special case for "BELL" which is apparently the only char which
         ;; doesn't have a new name and whose old-name is shadowed by a newer
-- 
2.11.0


reply via email to

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