Subject: bug#7662: 24.0.50; Keybindings for menu items not aligned

From: Eli Zaretskii <[email-masked]>
Date: Tue, 21 Dec 2010 07:22:54 -0500

> From: Chong Yidong <[email-masked]>
> Cc: [email-masked]
> Date: Tue, 21 Dec 2010 14:53:11 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Some of the key bindings shown in in the menu-bar menus are not aligned
> > properly.  I saw 2: Edit->Copy ("M-w" is 1 column to the left from where
> > it should have been), and Lisp Interaction->Instrument Function for Debugging.
> > (The latter problem also shows on the emacs-23 branch.)
> 
> Could this be Windows-only?

I don't think so, since I see it in the DOS build as well (which uses
neither the Windows "toolkit" nor the w32 code that handles menus).

> I don't see anything out of the ordinary on a GTK build (screenshot
> attached).

Judging by the screenshot, it looks like GTK has its own ideas about
formatting the menu items: it flushes the end of the key sequences all
the way to the right.  If so, it's a small wonder that you don't see
the problem, which happens when the _beginning_ of the key sequences
should be aligned.  That is, I expect to see

  Undo     C-x u
  Cut      C-w
  Copy	   M-w
  Paste    C-y

but instead I see this:

  Undo     C-x u
  Cut      C-w
  Copy	  M-w    <<<<<<<<<<<<<<<<<<<<<<<<<
  Paste    C-y

I suggest to try with a less viral toolkit, or without any toolkit.
The latter should generally exhibit the same behavior as the DOS
build, since they both use the same code to create the menus.  (I
originally suspected that the Windows build hits this because it uses
a proportional font, but of course the DOS build does not, so that's
not it.)