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

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

Re: poor additions in quail/latin-ltx


From: Stefan Monnier
Subject: Re: poor additions in quail/latin-ltx
Date: Thu, 10 Mar 2005 17:15:51 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> However, as far as I remember, it needn't be confined to GTK.  I think
> the Lucid and Motif menus should be able to display utf-8 in a utf-8
> locale, at least with recent enough XFree86/X.org for Lucid.  I don't
> recall the details, though, and I think the Lucid menu code needs
> fixing in some way.  It should at least try not to display junk, as it
> currently does if you use text that isn't encodable in the locale.

What I currently see in my Lucid menu is a question mark.  Is that what you
mean by "junk"?  Or maybe it depends on your locale and other Mule settings.
In any case, it would be great to get utf-8 support in the Lucid menu, even
if it's only when you're running under a utf-8 locale.

> By the way, the AUCTeX menu has the same problem as mine with text
> mode menus -- you don't get type-able keys for most of the items, and
> they're obviously useful to have in the absence of a mouse.  I think
> TMM should avoid non-ASCII characters for that, e.g. not do this:

> Possible completions are:
> 0==>±  (plus-minus sign)         ∓==>∓  (minus-or-plus sign)
> 1==>×  (multiplication sign)     2==>÷  (division sign)
> −==>−  (minus sign)              ∗==>∗  (asterisk operator)
> ⋆==>⋆  (star operator)                   ○==>○  (white circle)
> •==>•  (bullet)                          3==>·  (middle dot)
> ∩==>∩  (intersection)            ∪==>∪  (union)
> ⊎==>⊎  (multiset union)                  ⊓==>⊓  (square cap)
> ⊔==>⊔  (square cup)              ∨==>∨  (logical or)
> ∧==>∧  (logical and)             ∖==>∖  (set minus)
> ≀==>≀  (wreath product)

How 'bout the patch below to maths-menu.el (which also fixes your code so
you get paren-matching when inserting a paren-like char).


        Stefan


diff -u -b /u/monnier/src/elisp/misc/maths-menu.el.orig 
/u/monnier/src/elisp/misc/maths-menu.el
--- /u/monnier/src/elisp/misc/maths-menu.el.orig        2005-03-10 
17:10:24.279261870 -0500
+++ /u/monnier/src/elisp/misc/maths-menu.el     2005-03-10 17:09:05.582045901 
-0500
@@ -51,15 +51,19 @@
        (define-key-after map (vector (intern name)) (cons name pane-map))
        (dolist (elt pane)
          (define-key-after pane-map
-           (vector (intern (string (car elt)))) ; convenient unique symbol
-           (cons (format "%c  (%s)" (car elt) (cadr elt))
+           (vector (intern (cadr elt))) ; convenient unique symbol
+           (list 'menu-item
+                 (cadr elt)
                  ;; Using a string here doesn't work.  You get a
                  ;; `Wrong type argument: commandp,' error.
                  ;; That looks like a bug, since
                  ;;   (commandp "a") => t
                  `(lambda ()
+                    ,(format "Insert the character `%c'." (car elt))
                     (interactive)
-                    (insert ,(car elt))))))))
+                    (let ((last-command-char ,(car elt)))
+                      (call-interactively 'self-insert-command)))
+                 :keys (string (car elt)))))))
     map))
 
 (defvar maths-menu-menu




reply via email to

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